[email protected] Posted November 2, 2017 Share Posted November 2, 2017 Hi, I have a prestashop 1.6.x solution, i use a customized theme (based on the default-bootstrap theme) for all my customizations. I've been customizing emails, and ran into issues with the shipping emails not containing the substituion values i need. in order to add the additional substitutions, i've made an override to the /classes/order/OrderHistory.php file similar to the code below; <?phpclass OrderHistory extends OrderHistoryCore{ public function addWithemail($autodate = true, $template_vars = false, Context $context = null) { if (!$context) $context = Context::getContext(); $order = new Order($this->id_order); $data = array( '{payment}' => Tools::substr($order->payment, 0, 32), ); if ($template_vars) $data = array_merge($data, $template_vars); return parent::addWithemail($autodate, $data, $context); }} ive placed this file (OrderHistory.php) in /themes/my-theme-folder/override/classes/order/ but it seems to not work I've cleared cache, and this makes no difference. Is there something wrong with the folder structure i've used ? Best Regards OhmegaStar Link to comment Share on other sites More sharing options...
NemoPS Posted November 2, 2017 Share Posted November 2, 2017 Yes, the override should go in the main override folder, the one you used is not a valid path Link to comment Share on other sites More sharing options...
[email protected] Posted November 6, 2017 Author Share Posted November 6, 2017 Hi Nemo, Ok, thanks for clearing that up, it was not what I hoped, as keeping overrides with the theme made for easier deployment and versioning between different environments. I'll try and move the override to the correct folder to see if it then works. Regrds, Henrik 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