#B33fb0n3-promotion-code

1 messages ยท Page 1 of 1 (latest)

sullen coyote
atomic nimbus
sullen coyote
atomic nimbus
sullen coyote
#

Ahhhh, I see okay

#

Are you able to add 2 promotion codes in your use-case instead of mixing coupons and promotion codes?

atomic nimbus
#

The best case that can happen is, when I get somehow the promocodeapiid. Cause if I add an promotion code I need to provide this. So if the customer enters the readable code for example "FORFREE" than I gonna fetch the promotioncodeapiid and pass it into the update order.

#

think I got it... give me a second to confirm this..

atomic nimbus
glad raven
#

Hello ๐Ÿ‘‹
Taking over for two-shoes as they need to step away soon
Give me a moment to catch up and I'll respond as soon as I can

atomic nimbus
#

ah okii, sure.

glad raven
#

thanks for waiting. As far as I know we only support one promotion code to be applied per order.

#

let me reconfirm that

glad raven
#

Ah interesting! Let me take a look to see if we changed this recently

atomic nimbus
#

sure

glad raven
#

Can you try passing in discounts as an array?

  [promotion_code: 'AAAA'],
  [promotion_code: 'BBB'],
  [coupon: 'co_12'],
]```
atomic nimbus
#

sure, just a second...

#

not like this?

discounts: [
  {promotion_code: 'AAAA'},
  {promotion_code: 'BBB'},
  {coupon: 'co_12'},
]
```?
glad raven
#

Let's try both ๐Ÿ˜„ I haven't tested this personally

atomic nimbus
#

ur code is not executable with javascript ๐Ÿ˜‰

glad raven
#

lol yeah makes sense
Does your snippet work as an array of objects?

atomic nimbus
#

but it calculated the discount wrong I think ๐Ÿค”

#

one is with -20% and one with -10%
So -30%
1100 * 0,7 = 770. Stripe get 792

glad raven
#

nice, atleast the code works ๐Ÿ™‚

atomic nimbus
#

XD

#

well done XD

atomic nimbus
glad raven
#

yup ๐Ÿ™‚ I think it's going 20% of 1100 and then 10% of remaining amount

atomic nimbus
#

ahhh got it!

#

thanks for the nice help!
I wish u a great evening ๐Ÿ™‚