vikky Posted November 3, 2020 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 ? Link to comment Share on other sites More sharing options...
Larry Posted November 4, 2020 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. Link to comment Share on other sites More sharing options...
Recommended Posts