Shopify themes, liquid, logos, and UX
I added the paypal pay in 3 messaging integration onto my product page via Custom Liquid, but when you choose a variant option, and the price increases, the price doesn't increase with the paypal messaging? It just stays the same. How can I fix this so it calculates and changes the price when you choose a variant?
Hi @JordanGBS
To make the PayPal Pay in 3 messaging update dynamically when a variant is selected, you’ll need to use JavaScript to refresh the PayPal widget each time the product variant changes.
Here’s a basic example:
document.querySelector('#variant-selector').addEventListener('change', function() {
paypal.Messages().render('#paypal-messaging-element');
});
Ensure to replace #variant-selector and #paypal-messaging-element with your actual element IDs.
If you have other questions, I am willing to answer them more.
Best regards,
Daisy
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