Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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?
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
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
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.
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.
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.
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025