-
Posts
15 -
Joined
-
Last visited
About zelakioui
- Birthday 05/10/1990
Profile Information
-
First Name
zouhaire
-
Last Name
elakioui
Recent Profile Visitors
242 profile views
zelakioui's Achievements
Newbie (1/14)
1
Reputation
-
Custom page creation : controller not found
zelakioui replied to alexk345's topic in Ecommerce x PrestaShop [ARCHIVE BOARD]
I have the same problem,but in back-office. I developped new module in prestashop 1.6 in my local server, everything was nice.But when i installed it into my hosting server i get controller not found error when i click into module tab. I can enter to configure the module via prestashop configurer link, i get the configuration page and it works nice. I thought it comes from capitals letters, i check if all files names are identicals but i found everything are in good format. Really, a strong problem this one, i must to deliver the product today to the client i don't know what to do. Please, i need your help, everything can help, an idea , a link to tutorial, .... -
'controller Not Found' For Cms
zelakioui replied to _AlexG_'s topic in Configuring and using PrestaShop
I have the same error but i didn't find the solution yet. I developped new module in prestashop 1.6 in my local server, everything was nice.But when i installed it into my hosting server i get controller not found error when i click into module tab. I can enter to configure the module via prestashop configurer link, i get the configuration page and it works nice. I thought it comes from capitals letters, i check if all files names are identicals but i found everything are in good format. Really, a strong problem this one, i must to deliver the product today to the client i don't know what to do. Please, i need your help, everything can help, an idea , a link to tutorial, .... -
I developped new module in prestashop 1.6 in my local server, everything was nice.But when i installed it into my hosting server i get controller not found error when i click into module tab. I can enter to configure the module via prestashop configurer link, i get the configuration page and it works nice. I thought it comes from capitals letters, i check if all files names are identicals but i found everything are in good format. Really, a strong problem this one, i must to deliver the product today to the client i don't know what to do. Please, i need your help, everything can help, an idea , a link to tutorial, ....
-
Create custom Admin controller
zelakioui replied to enSysRanjit's topic in Addons, modules and themes developers
you should extends AdminController class, your class should be like this one : class AdminmymoduleController extends AdminController { public function __construct() { parent::__construct(); } public function renderForm(){ //some basics information, only used to include your own javascript $this->context->smarty->assign(array( 'mymodule_controller_url' => $this->context->link->getAdminLink('Adminmymodule'),//give the url for ajax query )); //what do we want to add to the default template $more = $this->module->display($path, 'view/mymodule.tpl'); return $more.parent::renderForm();//add you own information to the rendered template } } -
I am developing a module in prestashop 1.6. i extend AdminController class, everything is nice.but when i want to display the form that permit to add new instance an error message is displayed : Fatal error: Undefined class constant 'self::TYPE_STRING' in C:\xampp\htdocs\prestashop\classes\controller\AdminController.php on line 1418
-
When I extends adminController, and define values to display in $this->_select variable, Prestashop display this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' a.id_product, a.store_name FROM `ps_selstock_product` a LEF' at line 3 SELECT SQL_CALC_FOUND_ROWS , a.id_product, a.store_name FROM `ps_selstock_product` a LEFT JOIN `ps_product` al ON (al.`id_product` = a.`id_product`) WHERE 1 ORDER BY a.`id_selstock_product` ASC LIMIT 0,50 My $this->_select variable contains: $this->_select = 'a.id_product, a.store_name'; I know the query should be like this one, deleting ',': SELECT SQL_CALC_FOUND_ROWS a.store_name, a.id_product FROM `ps_selstock_product` a WHERE 1 ORDER BY a.`id_selstock_product` ASC LIMIT 0,50 But I don't know how to process because the query is built by prestashop I defined just the attributes to display
-
Module overriding class. Problem when reinstall. ReflectionException
zelakioui replied to serralta's topic in Core developers
Thinks, Thanks you have solved my problem with overriding controllers -
I am developping a module on prestashop 1.6, i am using this code to upload picture : if (!empty($_FILES)) { $name = reset(explode(".",$_FILES['coffretImg1']['name'])); $ext = end(explode(".",$_FILES['coffretImg1']['name'])); $filename = date('h:i:s A', strtotime('-1 hour'))." - ".$name.".".$ext; $tempFile = $_FILES['coffretImg1']['tmp_name']; $targetPath = $_SERVER['DOCUMENT_ROOT'] ."/prestashop/modules/coffretmod/uploads"; $targetFile = str_replace('//','/',$targetPath) . $filename; if (!file_exists ( $targetPath )) { mkdir(str_replace('//','/',$targetPath), 0755, true); move_uploaded_file($tempFile,$targetFile); echo $filename; } else { move_uploaded_file($tempFile,$targetFile); echo $filename; echo " moved ...$targetPath" ; } } else { echo 'Invalid file type.'; } everything is ok but i didin't find submitted file in uploads directory . i don't know where is the probleme please i need your help ! .
-
Hello, I am new in module developpement , i get error when creating module view . my frontcontroller is : class PrcustomeropinionDefaultModuleFrontController extends ModuleFrontController{ public function init() { $this->page_name = 'opinion'; // page_name and body id $this->display_column_left = true; $this->display_column_right = true; parent::init(); } public function initContent() { parent::initContent(); $this->setTemplate('default.tpl'); } } my default.tpl is in views/templates/front folder but i get 404 error (page not found ) when executing my controller I have added my module page in Preferences/SEO & URL in backoffice but the problem persist the cache is cleared PLease, i need your help !!
-
add custom php page prestashop 1.6
zelakioui replied to zalafa's topic in Configuring and using PrestaShop
Hello,I have the same problem but when i create module page I have created my own module in prestashop 1.6, but module page doesn't shown, prestashop gives me page not found . My frontController is : class PrcustomeropinionDefaultModuleFrontController extends ModuleFrontController{ public function init() { $this->page_name = 'opinion'; // page_name and body id $this->display_column_left = true; $this->display_column_right = true; parent::init(); } public function initContent() { parent::initContent(); $this->setTemplate('form.tpl'); } } form.tpl is in views/templates/front folder Please, i need your help !!!