Besens
Members-
Posts
19 -
Joined
-
Last visited
Profile Information
-
First Name
Sébastien
-
Last Name
Rufer
Recent Profile Visitors
198 profile views
Besens's Achievements
-
In fact just change add $isNewTheme = false in setMedia declaration and set $isNewTheme in parent::setMedia call. AdminDashboardController.php (# 43) public function setMedia($isNewTheme = false) { parent::setMedia($isNewTheme); $this->addJqueryUI('ui.datepicker'); $this->addJS(array( _PS_JS_DIR_.'vendor/d3.v3.min.js', __PS_BASE_URI__.$this->admin_webpath.'/themes/'.$this->bo_theme.'/js/vendor/nv.d3.min.js', _PS_JS_DIR_.'/admin/dashboard.js', )); $this->addCSS(__PS_BASE_URI__.$this->admin_webpath.'/themes/'.$this->bo_theme.'/css/vendor/nv.d3.css'); } I submited this correction on GitHub (https://github.com/PrestaShop/PrestaShop/pull/8588)
-
Exactly the same thing for me... But on ArchLinux : Apache/2.4.29 (Unix) PHP/7.2.0 Presta. 1.7.2.4
-
Création d'un module : erreur "Contrôleur introuvable"
Besens replied to Besens's topic in PrestaShop pour les développeurs
Grace à l'aide du post dans le forum anglais, j'ai réussi à résoudre mon problème. La solution en anglais ici : https://www.prestashop.com/forums/topic/537971-module-creation-error-controller-not-found/- 2 replies
-
- contrôler
- controller
-
(and 1 more)
Tagged with:
-
Module creation : error "Controller not found"
Besens replied to Besens's topic in Addons, modules and themes developers
I renamed my controller like that : /controllers/admin/test.php en /controllers/admin/AdminTestmoduleController.php And : class AdminTestmoduleController extends ModuleAdminController Then I made some modifications on the module class install function : public function install() { // Install Tabs $tab = new Tab(); foreach (Language::getLanguages() as $language) { $tab->name[$language['id_lang']] = 'My Module'; } $tab->class_name = 'AdminTestmodule'; // <-- NEW : My controller name in controllers/admin $tab->module = $this->name; $idParent = (int)Tab::getIdFromClassName('AdminParentCustomer'); // <-- NEW : AdminParentCustomer $tab->id_parent = $idParent; $tab->position = Tab::getNbTabs($idParent); // <-- NEW if(!$tab->save()) // <-- NEW return false; Configuration::updateValue('MYMODULE_ADMIN_TAB', $tab->id); // <-- NEW return parent::install(); } And now it's OK via the menu. I can call my controller with : http://monsite.dev/monadmin/index.php?controller=Myetickets&token=XXXX Thanks a lot for your help :-) -
Module creation : error "Controller not found"
Besens replied to Besens's topic in Addons, modules and themes developers
This is my ddd($tab) just befor return in the install() function : Tab Object ( [name] => Array ( [1] => My Module ) [class_name] => testModule [module] => testmodule [id_parent] => 37 [position] => [active] => 1 [hide_host_mode] => [id] => [id_lang:protected] => [id_shop:protected] => [id_shop_list] => [get_shop_from_context:protected] => 1 [table:protected] => tab [identifier:protected] => id_tab [fieldsRequired:protected] => Array ( [0] => class_name ) [fieldsSize:protected] => Array ( [module] => 64 [class_name] => 64 ) [fieldsValidate:protected] => Array ( [id_parent] => isInt [position] => isUnsignedInt [module] => isTabName [active] => isBool [hide_host_mode] => isBool ) [fieldsRequiredLang:protected] => Array ( [0] => name ) [fieldsSizeLang:protected] => Array ( [name] => 64 ) [fieldsValidateLang:protected] => Array ( [name] => isTabName ) [tables:protected] => Array ( ) [webserviceParameters:protected] => Array ( ) [image_dir:protected] => [image_format:protected] => jpg [def:protected] => Array ( [table] => tab [primary] => id_tab [multilang] => 1 [fields] => Array ( [id_parent] => Array ( [type] => 1 [validate] => isInt ) [position] => Array ( [type] => 1 [validate] => isUnsignedInt ) [module] => Array ( [type] => 3 [validate] => isTabName [size] => 64 ) [class_name] => Array ( [type] => 3 [required] => 1 [size] => 64 ) [active] => Array ( [type] => 2 [validate] => isBool ) [hide_host_mode] => Array ( [type] => 2 [validate] => isBool ) [name] => Array ( [type] => 3 [lang] => 1 [required] => 1 [validate] => isTabName [size] => 64 ) ) [classname] => Tab [associations] => Array ( [l] => Array ( [type] => 2 [field] => id_tab [foreign_field] => id_tab ) ) ) [update_fields:protected] => [force_id] => ) END -
Module creation : error "Controller not found"
Besens replied to Besens's topic in Addons, modules and themes developers
I tried with the Token but no effect. I uninstalled my module. I deleted the cache/class_index.php and I added your code in my install function and installed again my module, but nothing more. How I can debug that ? I don't understand... -
Module creation : error "Controller not found"
Besens replied to Besens's topic in Addons, modules and themes developers
I deleted the /cache/class_index.php but nothing changed. -
Création d'un module : erreur "Contrôleur introuvable"
Besens replied to Besens's topic in PrestaShop pour les développeurs
J'ai supprimé le fichier /cache/class_index.php mais cela n'a rien changé.- 2 replies
-
- contrôler
- controller
-
(and 1 more)
Tagged with:
-
Bonjour C'est bien par ce lien que j'ai commencé, mais la doc est peu fournie pour démarrer. J'ai fait pas mal de tutos, plutôt orientés PS 1.5. Je note en tous cas, que pas possible de mettre du "tag" dans un champ de conf. Ça veut dire qu'il faut plutôt que je mette "toto" dans la conf. puis le template affichera le decorum JS autour. Merci
-
Hello I continue my learning modules creation for Presta 1.6. I just created a minimalist test module with the following structure: testmodulecontrollersadmintest.php (class testmoduleTestAdminController extends ModuleAdminController) testmodule.php (class testModule extends Module) testmodule.php class testModule extends Module { public function __construct() { $this->name = 'testmodule'; $this->tab = 'administration'; $this->need_instance = 1; parent::__construct(); $this->displayName = $this->l('Test Module'); $this->description = $this->l('Juste un test sur les contrôleurs'); $this->version = '1.0.0'; $this->author = 'Besens'; } public function install() { return parent::install(); } public function uninstall() { return parent::uninstall(); } test.php class testmoduleTestAdminController extends ModuleAdminController { public function __construct() { parent::__construct(); } public function initContent() { parent::initContent(); } public function display() { parent::display(); } } The installation is successful. Then I try to call test.php controller like this: http://monsite.dev/monadmin/index.php?module=testmodule&controller=test But on display admin page I have the error "Controller not found". Please help me to understand why. Thanks in advance
-
Bonjour Je continue mon apprentissage de création de modules pour Presta 1.6 et je galère bien ;-) Je viens de créer un module de test complètement minimaliste avec la structure suivante : testmodulecontrollersadmintest.php (class testmoduleTestAdminController extends ModuleAdminController) testmodule.php (class testModule extends Module) testmodule.php class testModule extends Module { public function __construct() { $this->name = 'testmodule'; $this->tab = 'administration'; $this->need_instance = 1; parent::__construct(); $this->displayName = $this->l('Test Module'); $this->description = $this->l('Juste un test sur les contrôleurs'); $this->version = '1.0.0'; $this->author = 'Besens'; } public function install() { return parent::install(); } public function uninstall() { return parent::uninstall(); } test.php class testmoduleTestAdminController extends ModuleAdminController { public function __construct() { parent::__construct(); } public function initContent() { parent::initContent(); } public function display() { parent::display(); } } Jusque là tout va bien, l'installation se déroule correctement. J'essai ensuite d'appeler le contrôleur test.php de cette manière : http://monsite.dev/monadmin/index.php?module=testmodule&controller=test J'obtiens malheureusement le message "Contrôleur introuvable". Quelqu'un peut-il me donner une piste pour appeler ce contrôleur ? Merci
- 2 replies
-
- contrôler
- controller
-
(and 1 more)
Tagged with: