Jump to content

[SOLVED] Paypal module - commented code in js file seems set in stone? General module issues.


Guest

Recommended Posts

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? 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

post-966205-0-40079200-1431644731_thumb.png

post-966205-0-18784900-1431644735_thumb.png

Edited by Guest (see edit history)
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...