Jado95 Posted August 6, 2021 Share Posted August 6, 2021 Hello all, this is my first time in this community. I hope I have chosen the right section. I have a store which works very well. Only as soon as I include the paypal button on a page, javascript goes completely crazy. I think it's because paypal script overwrites or sorts the javascript differently if it is included. I'm not too deep in prestashop and web development to solve the problem. Paypal support has not been able to provide a solution yet. Can you help me? (incl. details what I have to change) A collection of pictures of the problems is attached. Prestashop version: 1.7.6.4 Paypal: 5.4.4 Theme: at_movic (incl. Leo-Quick-Login, Apppage-Builder, etc.) Thanks a lot! Jado95 Link to comment Share on other sites More sharing options...
SmartDataSoft Posted August 7, 2021 Share Posted August 7, 2021 @Jado95 Is this official PrestaShop paypal module or any thirdparty module. Is your compress js is enable. Did you remove the cache after instal this module. The error indicate that many jsquery plugin function is not find. This occurs if any module load jquery again after all plugin js load. In that case custom js function call made problem. Please share your site url. We will check and try to give you a guide Thank you 1 Link to comment Share on other sites More sharing options...
Jado95 Posted August 7, 2021 Author Share Posted August 7, 2021 Hello, thank you for the feedback. It is , as far as I know, the official module of Paypal: https://addons.prestashop.com/en/payment-card-wallet/1748-paypal-official.html#overview By compression, do you mean the function: Smart Cache for Javascript - In Prestashop backend? This is off during development, but even when it is set to "on" it does not work as expected. In general, all options in the Performance section are disabled except Debug Mode and everything in the Optional Features section. I have cleared the cache more than once and also the browser cache. Yes I thought something like that, but I am not good enough in web development to re-sort or disable the javascript of modules. Besides, I don't know what the consequences will be if I disable the wrong script. (Money transactions via paypal, etc.) Thanks for your help. Here is the URL for my store: https://jandonovski.de/ Small hint: Sometime everything is loaded correctly. So even if something works please reload again or relaod with F5 and CONTROL without cache. The error does not always occur strangely. Kind regards Jan Link to comment Share on other sites More sharing options...
Jado95 Posted August 10, 2021 Author Share Posted August 10, 2021 Hello again, I don't want to rush you, but could you find a cause or do you need more information? Thank you very much. Jan Link to comment Share on other sites More sharing options...
SmartDataSoft Posted August 10, 2021 Share Posted August 10, 2021 First of all after debug the code and view source i found that this jquery-1.11.0.min.js jquery is inject in the site using javascript if (null == script) { var newScript = document.createElement('script'); newScript.setAttribute('src', '/js/jquery/jquery-1.11.0.min.js'); if (false === ('jq-lib-0'.search('jq-lib') === 0 && typeof jQuery === 'function')) { newScript.setAttribute('data-key', 'jq-lib-0'); scripts.push(newScript); } which must not. as theme may be add js. secondly some function is not found in yoursite/modules/appagebuilder/views/js/script.js TypeError: slider.slick is not a function TypeError: $(...).lazy is not a function I think this is the reason for site js break. It will better if you contact your paypal module developer about this jquery issue fix. i think this code comes from the payment module. In view source 760 line <!-- Start shortcut. Module Paypal --> code start Thank you Link to comment Share on other sites More sharing options...
Jado95 Posted August 10, 2021 Author Share Posted August 10, 2021 Thank you very much. I will contact Paypal support and give response if we fixed it.:) Link to comment Share on other sites More sharing options...
Jado95 Posted August 20, 2021 Author Share Posted August 20, 2021 Hello, it now works in my system. This has been changed on the part of the provider: Here is the answer of the dev about the changes: ------------------- Some errors like $(...).lazy() is not function I fixed by small modification of a module. I deleted/commented the line 89 in file modules/paypal/classes/Shortcut/ShortcutAbstract.php More information: The cause is that our module adds jq js lib which conflicts with jq js lib added by the merchant's theme. I removed the addition of lib from our side to avoid conflict with the theme. -------------------- Yours sincerely Jan Link to comment Share on other sites More sharing options...
SmartDataSoft Posted August 20, 2021 Share Posted August 20, 2021 1 minute ago, Jado95 said: Hello, it now works in my system. This has been changed on the part of the provider: Here is the answer of the dev about the changes: ------------------- Some errors like $(...).lazy() is not function I fixed by small modification of a module. I deleted/commented the line 89 in file modules/paypal/classes/Shortcut/ShortcutAbstract.php More information: The cause is that our module adds jq js lib which conflicts with jq js lib added by the merchant's theme. I removed the addition of lib from our side to avoid conflict with the theme. -------------------- Yours sincerely Jan Please change the title as [solve] ND do not forget to click the love icon for the solution 1 Link to comment Share on other sites More sharing options...
Jado95 Posted August 20, 2021 Author Share Posted August 20, 2021 How can I change the title? Cant find an option for that. Sorry! 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