All things Shopify and commerce
I am trying to show the dollar amount saved on the Product info, when using Shopify's Compare at Price Feature.
I have used the code from https://community.shopify.com/c/shopify-discussions/show-amount-save-on-product-page-debut-theme/m-p... to implement this, and it has worked for all of my products with just one variant.
However when I add in 2 or more variants, then the calculation breaks and the wrong figure is shown. This resolves itself when I delete the second variant. You can see that the Superbly Stainless option (which has two variants) has the incorrect saving calculation, while the other two products which only have 1 product variant have the right saving calculation:
This issue occurs on all pages where the product card shows, including on the product page iteself.
Can anyone suggest how to adapt this code so that it works to correctly display the saving on products with multiple variants?
User | RANK |
---|---|
44 | |
41 | |
40 | |
28 | |
21 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023