Guest Posted May 14, 2015 Share Posted May 14, 2015 (edited) Another weird issue. screenshots included as usual. I installed the free and official paypal module from PS. (v3.8.4) I then proceeded to try and override templates via the normal way. This did not work for view/templates/front/error.tpl or views/templates/hook/paypal.js Question 1: how can I override these? I really would prefer not having to mess with system code and having to redo everything after each module update. solution: Found workaround edit: this file also modules/paypal/paypal.php LINE 386: $process = '<script type="text/javascript">'.$this->fetchTemplate('js/paypal.js').'</script>'; [sOLVED 15/05] I then proceeded to temporarily comment out some code in the core module paypal.js file for testing purposes. My theme overrides have been removed. Now I'm stuck with a commented code in paypal.js which I can't seem to clean up. I tried several of the below steps more then once and not necessarily in this order. PS Cache is disabled (always on staging environment) smarty cache removed uininstall/reinstall paypal module edit file directly on server hard clean chrome cache for Chrome (http://superuser.com/questions/278948/clear-cache-for-specific-domain-name-in-chrome) - it's not a browser caching issue though, can replicate issue in all browsers Question 2: what can I do? I've done this many times before with other modules and I can always revert my edits. Question 3: is this module good enough? Don't mean to be disrespectful but this is mission-critical. Should I buy a module that works better? Any tips/tricks/preferences from your side? The module seems to just smack the JS code in the source code in stead of more neatly linking to it's source like other modules do. I want to squeeze all JS into one file on our production. YES - did more testing, it works beautifully. It is my own lack of knowledge that prevented me from fully using the plugin correctly. [sOLVED 15/05] screenshot info: kitty.jpg is a screenshot from vi -ing the file in centos console-debug shows the actual browser file output Edited May 18, 2015 by Guest (see edit history) Link to comment Share on other sites More sharing options...
las3r Posted May 15, 2015 Share Posted May 15, 2015 What you could do (although I might be going on a limb here) if that if you are using a staging environment is to setup xdebug. Use netbeans (free0 or visual studio 2013 express (free) + PHP Tools (free trial) to remotely debug your shop. That way you'll be able to step into and trace the different issues and see where they come from. I've fixed the most crazy bugs using a step-through debugger this way - it's a bit of a hassle to get it to work, but once this runs it's a unbelievably handy tool that will quickly become your favorite tool to debug issues rather than just trial and error.... ;-) Good luck Link to comment Share on other sites More sharing options...
Guest Posted May 15, 2015 Share Posted May 15, 2015 What you could do (although I might be going on a limb here) if that if you are using a staging environment is to setup xdebug. Use netbeans (free0 or visual studio 2013 express (free) + PHP Tools (free trial) to remotely debug your shop. That way you'll be able to step into and trace the different issues and see where they come from. I've fixed the most crazy bugs using a step-through debugger this way - it's a bit of a hassle to get it to work, but once this runs it's a unbelievably handy tool that will quickly become your favorite tool to debug issues rather than just trial and error.... ;-) Good luck Indeed, I should be debugging on the server, too. But I luckily found the issue with a fresh head. So I did a search on "paypal.js" in the whole paypal module folder and it turns out it is grabbing the paypal.js file from another location. modules/paypal/paypal.php LINE 386: $process = '<script type="text/javascript">'.$this->fetchTemplate('js/paypal.js').'</script>'; thanks for your input. That means Question2 is done. I'm updating OP. Link to comment Share on other sites More sharing options...
las3r Posted May 15, 2015 Share Posted May 15, 2015 Good to hear ;-) Sometimes some coffee is enough (along with some rest). As for Q1, not sure what to make of it as I haven't tried it before. 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