vikky 0 Posted November 3, 2020 Report Share Posted November 3, 2020 Hi Greetings, Sir thank you for all the teaching and guidance and lots of appreciation for all the colleagues. Sir how can I implement coupon system in the second site as available in the popular sites ? Quote Link to post Share on other sites
Larry 428 Posted November 4, 2020 Report Share Posted November 4, 2020 Hey Vikky! To implement a coupon system, you'd want to start by creating a coupon table. A coupon would have a code, probably an expiration date, and then either be a percent off or a fixed-amount off. In more sophisticated systems, coupons may only apply to certain items or total order amount, etc. You may also want to track coupon usage. Then, as part of the checkout process, you'd need to add a field to accept a coupon. Your programming logic would need to verify that the coupon is valid, and adjust the order total accordingly. You'd want to update your orders table in the database to reflect use of a coupon. That's the basic framework for it; there are myriads permutations on how coupons could specifically be implemented. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.