Personalized checkout and custom promotions with Shopify Scripts
I have this line at the top of my code:
if Input.cart.discount_code&.code == "CYBER2023" && !Input.cart.discount_code&.rejected?
However, if the code is rejected (like it has a minimum of $100 and the cart is $50), it rejects the code but applies everything that comes after the if statement above.
So, I have 2 questions:
- How can I make scripts not work if the code is not applied? (In production it simply passes that the code is not rejected even if it is)
- If that's not possible, how do I implement features like the discount only being used once per customer?
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024