Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

Shopify Function With Product Discount API Critical Limitation

abdul81
Shopify Partner
20 1 2

We have successfully deployed our Shopify function for volume discounts. e.g.

 

  • Buy 2 get 10% Off
  • Buy 3 get 15% Off

Now the issue is 

DiscountApplicationStrategy

is limiting discount application to only 1, even if more than 1 line items are eligible for discount. Is there any work around this? What is the actual benefit of this field?

 

Looking forward to more information, or a possible solution.

 

Thank you

Product Manager at Developer's Capital

  • Creator of App Quantity & Volume Discounts
  • Was my reply helpful? Click Like to let me know!
  • Was your question answered? Mark it as an Accepted Solution
,new value=Product Manager at Developer's Capital
  • Creator of App Quantity & Volume Discounts
  • Was my reply helpful? Click Like to let me know!
  • Was your question answered? Mark it as an Accepted Solution
Reply 1 (1)

_Zak_
Shopify Partner
4 0 0
DiscountApplicationStrategy

is just the strategy that's applied to the list of discounts. (the first satisfied condition discount or the maximum reduction discount)

The line items that are eligible for discount are defined in discounts.

Ex: If you want the targets of discount A is product B, product C, just define them (B,C) in targets and discount value (A) in value