How can I get the highest variant price discount of the product inside the collection page

Hi everyone, how can I get the highest variant price discount of the product on the collection page?

For example on a product, I have four options with different discounts. I want the product grid will show the highest discount option offer will show-up.

Please see the attached image of how I want it to look.

Thanks.

Hi @jmdev23 ,

We need to code in liquid and JS to assign the default price with the highest discount variant variable. If you don’t have technical coding knowledge, You need to hire a Shopify expert for that. It’s a bit complex query to solve for an ordinary person.

If you want us to assist in this, You can send a DM now.

Cheers :slightly_smiling_face:

Technika

Hello Technika,

Can you please assist me with the code that needs to be added and which file it should be added, please?

I will implement the changes on the draft theme first and see from there if the changes works.

Best Regards,

JM

Hi @jmdev23 ,

I would love to assist with the code but for that, I need to see the variable being used in the website to write the script according to them. For that, I will need access to the backend.

That’s why I asked to hire a Shopify Expert. And don’t worry about live theme disturbance. The job is always done in the draft theme and then we make that live after the complete testing. :slightly_smiling_face:

Regards,

Technika

Hi Technika, I am a developer by the way :slightly_smiling_face: I love to hear your insights to implement the request I mentioned.

You can put in the code here both liquid code and the script and I will check it from there.

Best Regards,

JM