lianix Posted July 3, 2016 Share Posted July 3, 2016 Hi. I've installed a beatiful module that allow to costoumer to set a delivery day. The module is interesting, but in the order-detail.tpl i would show to costumer his choice. There is a way to show for each order detail the value stored in database? Thank you! Link to comment Share on other sites More sharing options...
shokinro Posted July 3, 2016 Share Posted July 3, 2016 I think the module has extended PrestaShop with new tables or new columns of existing table. You can try to read the code of the module to find out this or you may need to contact developer of module to find out where the data is saved. Link to comment Share on other sites More sharing options...
lianix Posted July 3, 2016 Author Share Posted July 3, 2016 I think the module has extended PrestaShop with new tables or new columns of existing table. You can try to read the code of the module to find out this or you may need to contact developer of module to find out where the data is saved. Hi tnx for reply. The data is loaded in another php file is in php, but i dont know ho to replicate in the tpl file order-detail.tpl. public function hookAdminOrder($params) { $order = new Order($params['id_order']); $days = array( 0 => $this->l('Sunday', 'main'), 1 => $this->l('Monday', 'main'), 2 => $this->l('Tuesday', 'main'), 3 => $this->l('Wednesday', 'main'), 4 => $this->l('Thursday', 'main'), 5 => $this->l('Friday', 'main'), 6 => $this->l('Saturday', 'main') ); if ($date = $this->dates->getDate($order->id_cart, false)) { $display_date = Tools::displayDate( $date['date'], version_compare(_PS_VERSION_, '1.5.0.0', '<')?$order->id_lang:null ); $text = $this->l('Asked delivery day:', 'main').' '.$display_date. ' ('.$days[(int) date('w', strtotime($date['date']))]. ') '.htmlentities($date['timeframe'], ENT_QUOTES | ENT_IGNORE, 'UTF-8'); if (version_compare(_PS_VERSION_, '1.6.0.0', '>=')) { $result = '<script>$(document).ready(function(){$("#shipping").prepend('. $this->samdha_tools->jsonEncode($text).')});</script>'; } else { $result = ' <br /> <fieldset style="width: 400px"> <legend><img src="'.$this->_path.'logo.gif" /> '.$this->l('Delivery day', 'main').'</legend> '.$text.' </fieldset>'; } return $result; } } Developer is disappeared :-( Link to comment Share on other sites More sharing options...
shokinro Posted July 3, 2016 Share Posted July 3, 2016 (edited) It is difficult to give advises with this piece of code. because some of the code is related to other part of the file or other file. for example: $this->dates is defined somewhere else and its method getDate() is also defined somewhere else. You may not be allowed to post all source code of the whole module here. so if you are not able to get help form the developer, you may have to try to figure our by yourself. or you may have to consider to hire someone to help you out. Edited July 3, 2016 by shokinro (see edit history) Link to comment Share on other sites More sharing options...
lianix Posted July 3, 2016 Author Share Posted July 3, 2016 Hi dont know what i can do. I have no money to pay someone. I will try myself...! Link to comment Share on other sites More sharing options...
shokinro Posted July 4, 2016 Share Posted July 4, 2016 The best way might try to catch the developer of the module. Good luck. 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