Add feature to automatically apply discount code to the product
Design
When no discount code is applied:
When the radio is selected:
When discount code is selected:
- [ ] When a product has an auto-applied discount code, show the discounted price everywhere:
- Preview on product edit page
- Discover
- Seller profile
- Product page
Discounted price should look similar to how it looks now when we apply a discount code through &code=<discount_code> query string:
If the buyer has supplied another discount code (through the URL), prioritize that over the product's default discount code.
- [ ] Track purchases made using the default discount code (can use
attr_json_data_accessoronPurchaseobject)
Hello !
I have a deep passion for being a part of this feature. I have reviewed the issue, as well as the conversation; and, I'm looking forward to working on this auto apply discount system with you.
I will be building a simple validation layer to verify eligibility rules on the client side and / or server side (depending on the design of the application) before the discount is automatically applied, once the eligibility conditions have been met. Also, I will build the logic in a way that allows for future enhancement with additional discount types.
While I am still getting to know the code base; however, I will complete this task and will be very thankful for any help or guidance that you may have. I'll also submit a PR with my proposed method to begin implementation once I have completed my plan.
Please let me know if there are any specific topics of interest or concern that you would like me to cover at this time.
Thanks, and I look forward to collaborating with you!