babu_babu Posted July 27, 2012 Share Posted July 27, 2012 (edited) I try to override shop/modules/paypal/views/templates/front/paypal.tpl and tried to add a modyfied version in shop/themes/myTheme/modules/paypal/views/templates/front/paypal.tpl , but prestashop doesn't switch to the new file. How to do this? And how can I debug this? I'm running PrestaShop 1.4.3 and PayPal module v3.0.6. Thanks! Edited July 27, 2012 by babu_babu (see edit history) Link to comment Share on other sites More sharing options...
Médéric Posted July 27, 2012 Share Posted July 27, 2012 Hi, I think you can directly put the tpl in myTheme/modules/paypal/ Link to comment Share on other sites More sharing options...
babu_babu Posted July 27, 2012 Author Share Posted July 27, 2012 I think you can directly put the tpl in myTheme/modules/paypal/ Thanks, but it doesn't work. Link to comment Share on other sites More sharing options...
Arkadia Posted August 7, 2012 Share Posted August 7, 2012 Thanks, but it doesn't work. Did you ever figure this one out? I'm using a paypal pro module from egrove and overrides don't work. Just so everyone knows. I created a copy of the module folder and the tpl file I edited and placed it in the themes/mytheme/modules folder...so I did the override correctly but it just doesn't work. Only able to edit the tpl file from the root/modules folder which is obviously undesirable. Thanks! Link to comment Share on other sites More sharing options...
babu_babu Posted August 21, 2012 Author Share Posted August 21, 2012 Did you ever figure this one out? No, I'm sorry. Link to comment Share on other sites More sharing options...
Prestadget Posted September 29, 2012 Share Posted September 29, 2012 Hello, You cannot, because in the paypal module : public function fetchTemplate($path, $name, $extension = false) { if (_PS_VERSION_ < '1.4') $this->context->smarty->currentTemplate = $name; return $this->context->smarty->fetch(_PS_MODULE_DIR_.'/paypal/'.$path.$name.'.'.($extension ? $extension : 'tpl')); } They have hardcoded this instead use the Prestashop core function. I hope it's a bug, I may add it to their JIRA? 1 Link to comment Share on other sites More sharing options...
4mdev Posted December 4, 2012 Share Posted December 4, 2012 I don't have time to log this with them, but you can fix this by the following in PrestaShop 1.5 Line 320 of /modules/paypal/paypal_abstract.php, change: return $this->context->smarty->fetch(_PS_MODULE_DIR_.'/paypal/'.$path.$name.'.'.($extension ? $extension : 'tpl')); to: return $this->display('paypal', $path.$name.'.'.($extension ? $extension : 'tpl')); Then copy the tpl files from the Paypal module to your theme. For instance, I've copied: /modules/paypal/views/templates/front/express_checkout/express_checkout.tpl to: /themes/my-cool-new-theme/modules/paypal/views/templates/front/express_checkout/express_checkout.tpl Hope this helps someone. 1 Link to comment Share on other sites More sharing options...
melriks Posted December 13, 2012 Share Posted December 13, 2012 I can confirm that 4mdev's fix works on Prestashop 1.5.2. It's a sin that they hard coded it plus hard coded the style information directly onto the div making it impossible to update just your Global Style sheet. 4mdev, you should submit this as a fix to the GitHub repository. 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