...
The user should not be redirected to the menu page when applying a promotional code directly through the checkout page (for Offer Combo/Picker)
Add the offer item with the default selections for the Combo/Picker
Show the “edit” button on the cart offer item. The edit button should send the user to the menu page for the edited item
The behavior must be closely related to the legacy flow
/offer
page:The item added to the cart should be exactly as we are adding it through the legacy flow (sub-items, price, etc)
The item should be correct at Recent Orders or Email Receipt (like the legacy
/offers
flow). As this is an extension of the loyalty offers feature, we didn’t need to implement anything regarding this (I added a demonstration showing the receipt when adding a Combo/Picker)The offer item should not be available to add again to a new order after being used (blocked by the application by default)
Only one offer item can be added by default. If the user tries to add another offer (Combo, Picker/Offer Discount), a modal will ask if the user wants to replace the current added offer with the new one
If the user tries to apply the same code twice, the application should block this showing an error about “promo code already applied”
The feature should respect the rules from Sanity or the campaign platform. For example, if the user already finishes an order for a promo code that only has one available, they should not be able to reuse that promo code
The application should show the same errors that we already have for promotional codes (the old deprecated/removed CBA flow):
Unknown exception error
Code expired
Invalid code
Code already redeemed
Invalid Offer ID
Promo code already applied
...