Post by sw!tch » Fri Feb 05, 2021 9:05 am

mikeinterserv wrote:
Fri Feb 05, 2021 7:47 am
In short replace line 17 and 18 in
catalog/view/theme/default/template/extension/module/pp_button.twig

Code: Select all

//--></script>
<script src="//www.paypalobjects.com/api/checkout.js" async></script>
With

Code: Select all

if (typeof window.paypal == 'undefined') {
  $.getScript('//www.paypalobjects.com/api/checkout.js');
}
//--></script>
or you can cut and paste the entire file from switches post above
I would not have found this solution myself so thanks again to switch
Just copy and paste from my post, there are other edits as well:

^ The code above will fix the "duplicate script", but if you require the confirm button to work with other payment methods, refer to my post in full which has both fixes. viewtopic.php?f=202&p=813089#p813087

Finally this is only valid on OC installs from 3.0.0.0 - 3.0.3.2, in later OC versions pp_button.twig was removed in favor of the the smart button.

-

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by mitrecyclers » Fri Feb 05, 2021 6:17 pm

Thanks Switch and mikeinterserv. I can confirm, It worked Absolutely fine.

For all of your Mobile phone needs.
https://mitrecyclers.com


Active Member

Posts

Joined
Tue Sep 25, 2018 5:34 pm

Post by khnaz35 » Fri Feb 05, 2021 6:20 pm

mitrecyclers wrote:
Fri Feb 05, 2021 6:17 pm
Thanks Switch and mikeinterserv. I can confirm, It worked Absolutely fine.
Kindly add the word [SOLVED] in beginning of your post title.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia
Who is online

Users browsing this forum: redactuk, Semrush [Bot] and 97 guests