Have your say in Community Polls: What was/is your greatest motivation to start your own business?

PayPal Banner pay later on product page with variants

PayPal Banner pay later on product page with variants

MatteoB80
Tourist
7 1 0

I've implemented the Paypal Banner Pay in 3 steps on my product page, but it doesn't update when you select a variant with a different price. I have to manually refresh the page to make it work.

 

here the script in mainproduct.liquid

{%- assign mao_price = product.selected_variant.price | money_without_currency | replace: ".", "" | replace: ",", "." -%}
<div
id="mao-paypal-price"
style="padding: 15px 10px 5px;margin-top: 0.5rem;margin-bottom: 1rem;background-color: #fff;border: 1px solid #eae7e4;"
data-pp-message
data-pp-style-layout="text"
data-pp-style-logo-type="inline"
data-pp-style-text-color="black"
data-pp-amount="{{ mao_price }}">
</div>

 

Can You help me?

Replies 5 (5)

Guleria
Shopify Partner
3684 740 1038

Hello @MatteoB80 ,

 

Follow the theme code which is use to change the price and other things on change  of the variant.

Just by following it, you can make it work.

 

Thanks

- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com Skype: live:navrocks1
- Try GEMPAGES a great page builder
MatteoB80
Tourist
7 1 0

I'm on Dawn Theme, where I can find it? I'm already display every SKU on variant change (custom liquid on product page), but can't make it work with Paypal banner

Guleria
Shopify Partner
3684 740 1038

You can use a custom function too to change it. 
Just get the price of the selected variant on change and update the PayPal code banner accordingly.  

Dawn theme JS found in theme.js or product-form.js.

 

 

- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com Skype: live:navrocks1
- Try GEMPAGES a great page builder

fastnetweb
Shopify Partner
3 0 0

Hi @MatteoB80 

Did you get this working?

I have the same issue and didn’t find any of the replies useful/helpful.

Klarna is refreshing on variant price change, but Paypal Pay in 3 stays the same.

Any help would be appreciated.

JordanGBS
Visitor
2 0 0

Did you manage to get it fixed? 
I'm having the same issue. When you refresh the page it updates, but customers aren't going to be refreshing the page.