Add discount after adding to cart

Add discount after adding to cart

TrendBlend
Trailblazer
315 0 33

Schermafbeelding 2025-01-16 000020.png

I'm trying to code a volume bundle, I got this code for clicking the Add To Cart button: Jan 16 12:02 AM Codeshare. I want to set a discount of an additional 10% when buying 2 variants of 1 product and an additional 15% when buying 3 or more variants of 1 product. The discount should only be applied to the products added to cart, but it did not work when I tried doing it. Should I use the update cart api to update the cart, or should I do something else I really do not have a clue. Thanks if you want to look into this for me, URL: Glow Curtain: 400 LED Lights for a Magical Ambiance – InteriorGlows

Reply 1 (1)

EstherBui
Excursionist
275 39 42

Hi TrendBlend

 

When you want to adjust the code and use additional APIs from the theme, I recommend contacting the theme's developer to better understand how the Add to Cart functionality works. Incorrect modifications may cause theme errors and lead to issues with your store.

Best, 
Esther

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!