Add discount after adding to cart

Topic summary

A user is attempting to implement a volume-based discount system for product variants that applies after items are added to the cart. The desired discount structure is 10% off when purchasing 2 variants of the same product, and 15% off for 3 or more variants.

Technical Challenge:

  • The user has custom code for the Add to Cart button (shared via Codeshare link)
  • Discounts should only apply to the specific products added
  • Initial implementation attempts have failed
  • User is uncertain whether to use the update cart API or another approach

Response:
A community member recommends contacting the theme developer directly to understand the Add to Cart functionality before making modifications, warning that incorrect code changes could cause theme errors and store issues.

Status: The technical question remains unresolved, with no concrete solution provided yet.

Summarized with AI on November 2. AI used: claude-sonnet-4-5-20250929.

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