Replies: 1 comment
-
It sounds like you're looking to use promotions as a pseudo coupon where the user can apply them manually? In that case I would use the custom field as you described and apply the promotions related to the code using the example backend API call with The operator |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Client needs to run a day of discounts that is allows customers to apply multiple coupons to their carts using a code. Seems that the easiest way to apply this is by building a custom discount service that uses promotions with a custom field added to the promotions model for the coupon code itself. Then I validate the coupon code and add the the promotion to the cart using the backend api using
swell.post("/carts", {"promotion_ids": [{/*id of promotion validated by coupon code custom field etc*/}]}
, right?I have a couple of questions regarding disabling the default behaviour for promotions:
How can I create a basic percentage or fixed product/category promotion and not have it auto-apply before a user inputs the related code? This is an excerpt from @ericingram on another post:
I get the part about setting a very high "minimum order subtotal", but does that mean if the cart is still below that very high "minimum order subtotal" and I post it to my cart, will the discount apply correctly? If I recall correctly when I used "minimum order subtotal" on promotions in the past, if a customer passes that minimum threshold the promotions get's applied, but if they remove items that brings them back below the "minimum order subtotal", the promo stays on the cart but the discount is removed unless they bring the cart back over the "minimum order subtotal" threshold.
Also, what does
$promotions: true
do exactly, and where do I pass it? The majority of the integration uses the frontend-api for interacting with the cart, will this interfere with that at all?Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions