PayPal Banner pay later on product page with variants

PayPal Banner pay later on product page with variants

MatteoB80
Tourist
6 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 4 (4)

Guleria
Shopify Partner
3150 616 883

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

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
MatteoB80
Tourist
6 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
3150 616 883

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.

 

 

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: 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.