Tje123 Posted October 18, 2017 Share Posted October 18, 2017 (edited) I'm new to prestashop and i'm trying to develop new carrier module for my prestashop project. **Requirement :** customer allow to schedule delivery (add date time). **what i want to do :-** when customer select (`Schedule delivery`), i want to display calendar to select date. **So far what i did :-** i have crated new module for carrier (`Schedule delivery` carrier in image). created .tpl file inside `views/templates/front/Carrier.tpl`. Created class file inside `Controllers/front/Carrier.php`. **Carrier.tpl** <div id="mymodule_block_home" class="block"> <h4>Welcome!</h4> <div class="block_content"> <p>Calender</p> <ul> <li><a href="{$my_module_link}" title="Click this link">Click me!</a></li> </ul> </div> </div> **Carrier.php** class delivery_schedulerCarrierModuleFrontController extends ModuleFrontController { public function initContent() { parent::initContent(); $this->setTemplate('module:delivery_scheduler/views/templates/front/Carrier.tpl'); } } in main `delivery_scheduler.php`,i have added bellow code to import .tpl file.but nothing showing . public function hookUpdateCarrier($params) { return $this->display($this->_path.'views/templates/front/Carrier.tpl'); } Edited October 18, 2017 by Tje123 (see edit history) Link to comment Share on other sites More sharing options...
phinq1910 Posted October 18, 2017 Share Posted October 18, 2017 No, try with displayCarrierList or displayBeforeCarrier Link to comment Share on other sites More sharing options...
Tje123 Posted October 18, 2017 Author Share Posted October 18, 2017 (edited) i have added both displayCarrierList,displayBeforeCarrier like below.but nothing showing public function hookdisplayCarrierList() { return "Test"; } public function displayBeforeCarrier() { return "Test"; } At least i cant show "Test" message below to carrier option Edited October 18, 2017 by Tje123 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now