pooranjoyb / popShop

eCommerce Shoping Platform (with Admin Panel) based on ReactTS & Daisy UI, integrating Supabase as BaaS
https://pop-shop-github.vercel.app/
MIT License
29 stars 66 forks source link

[BUG]: No functionality to the `Apply` Coupon Button #276

Closed abckhush closed 1 day ago

abckhush commented 1 week ago

Description

On clicking the apply button, no discount is being applied. The functionality I would like to add:

  1. Coupon Validation: When the user clicks the "Apply" button, validate the coupon code.
  2. Apply Discount: If the coupon is valid, discount the total price of the items in the cart.
  3. Feedback to User: Popup to show how much they are saving.

Screenshots

image

Any additional information?

I would like to know do you want me to hardcode the coupons?

What browser are you seeing the problem on?

Chrome

pooranjoyb commented 1 week ago

Congratulations, @abckhush! 🎉 Thank you for creating your issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work!

We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our contributing guidelines

AjayAsnani commented 6 days ago

We will discuss about this and let you know @abckhush

pooranjoyb commented 4 days ago

Hii @abckhush I think we can Implement that. Do one thing, use a static coupon and a discount Coupon object -> with a name and discount value as of now and on applying this coupon the discount should be applied on total :)

pooranjoyb commented 2 days ago

Update @abckhush ?

abckhush commented 1 day ago

Yes I'm working on it

pooranjoyb commented 1 day ago

Yes I'm working on it

Raise a PR by EOD.