prestashop-1.6

Prestashop 1.6 get instance of module class

守給你的承諾、 提交于 2019-12-01 00:57:47
I have an overridden class OrderConfirmationControllerCore . I have a modul with class Abra . I need to get an instance of Abra class in the OrderConfirmationControllerCore My code is: class OrderConfirmationController extends OrderConfirmationControllerCore { public function init() { $abraSetDocs = new Abra(); parent::init(); } } This generates error: Fatal error: Class 'Abra' not found in /../override/controllers/front/OrderConfirmationController.php on line 39 How can I get the instance of the class? $abraSetDocs = Module::getInstanceByName('abra'); Note that 'abra' is the name of the

Show my module JS at footer in prestashop

ぐ巨炮叔叔 提交于 2019-11-28 01:44:17
I am developing a module in prestashop. I have a JS for configuration page for my module. I am using displayBackOfficeHeader hook to add my JS in header. But after installing my module when i configure my module it's give me Jquery issue because my JS in adding at top means before jquery.js Que 1) How to manage that my JS should add in header after Jquery.js ? Que 2) If we can't manage same as que Ist then how to add JS in footer? In most cases to add any asset (JavaScript or CSS) to a back-office (admin pages) you should use the hook actionAdminControllerSetMedia() . Full steps to register

Show my module JS at footer in prestashop

我的梦境 提交于 2019-11-26 21:59:25
问题 I am developing a module in prestashop. I have a JS for configuration page for my module. I am using displayBackOfficeHeader hook to add my JS in header. But after installing my module when i configure my module it's give me Jquery issue because my JS in adding at top means before jquery.js Que 1) How to manage that my JS should add in header after Jquery.js ? Que 2) If we can't manage same as que Ist then how to add JS in footer? 回答1: In most cases to add any asset (JavaScript or CSS) to a