-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commerce: Promo codes on checkout #77
Conversation
On bank wire only show US instructions. |
Make the credit card not collapsible and remove "CC", should say something like "Secure payments with .." |
Show discount on line in order summary after promo is applied |
Can you also add discount field when its mobile and order summary is collapsed? this is normal behavior also. |
Other updates look great |
moved Promo into it's own file: types/Promo util/formatPrice -> formatCurrencyValue;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments in util/promo-codes.ts
Create a task for yourself for post launch to do that. @erikrakuscek
@@ -0,0 +1,46 @@ | |||
'use server' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be the business of the Service, NOT some utitity somewhere to apply Promo codes.
There should be another optional argument to the impl, and getSingleton, and the ContextProvider, that is simply, 'promos'. For convenience, this can be pass in from @luxdefi/common/promos or something like that.
We have 2 different types of discounts:
percent
(eg. 20% off) andamount
(eg. $50 off).Each Promo has property
skus
, which is an array of product SKUs to which the discount applies. Ifskus
is undefined, the discount shall be applied to all items in the cart.Only 1 promo code per order is allowed.
Requires bump of hanzo/commerce