#oboxodo

1 messages · Page 1 of 1 (latest)

molten sinewBOT
stray vessel
#

Hi, taking a look here

#

That is correct, you're unable to add line_items level discounts and it only supports a single coupon. In this case, you'd need to 'bundle' these discounts to create one coupon.

1/ I can share this feedback with our product team for future product considerations.
2/ Let me think about this for a bit. Off the top of my head, we typically recommend that you 'bundle' the discounts and just pass in one coupon.

stone copper
#

1/ thanks. that'd be great.

#

2/ do you know if you guys have any sample code on "best practices" for bundling discounts?

stray vessel
#

By that, I meant that instead of applying three separate coupons for 5% off, you'd calculate that discount amount and add one coupon code on the entire checkout session.

stone copper
#

yeah, OK. We'll consider that option.

stray vessel
#

It looks like that would be the only option currently, however, I will pass your feedback to the team. Can you speak more into why you'd like to pass coupons on each line_items? I'd like to make sure that I capture your business use case entirely when I share this feedback.

stone copper
#

the reason to pass discounts to specific line items is because that discount would only qualify to that particular product.

I'm aware we could instead create a coupon with an applies_to value indicating the specific price objects it should apply. I don't recall right now why we didn't do it that way back then.

In any case, the fact that the session object supports only a single coupon means we wouldn't be able to apply two coupons, each applying to different line items in the checkout session. I think that might be a way more common need.

#

I'll give you a specific example:

stray vessel
#

Are these discounts for the same amount? Like 5% off both line_items 1 and line_items 2?

stone copper
#

we have product A which costs $999. But if you include product B which costs $25, we'll give you a $300 discount on product A. At the same time, you could have a referral code which gives you a 25% discount but we can't include product B on that discount.

stray vessel
stone copper
#

In my example above, you'd pay 999 - 300 - 25% for product A, plus 25 for product B. Plus taxes.

stray vessel
#

I see

stone copper
#

Yeah, we're considering the option of expanding each possible combination as a new price... damn it'll get messy, haha.

stray vessel
#

I'd highly encourage you to test this scenario on your end. It may be a heavy lift upfront to create these products and prices, but it also allows you to use Checkout that requires less coding.