I made a discount code function. how do I issue this discount code to members when they buy a product? I got a coupon code generation function in the mall background, how can I specify the discount code when adding a product? (note: There are multiple different discount codes with the same denomination). then, the member buys the product at the front-end, how can I issue a discount code?
Reply to discussion (solution)
Is it a discount code or a coupon?
Why do I need to issue a discount code? (Refer to the Amazon mode) or I understand it incorrectly.
When you add a product, several discount codes are randomly generated (several can be customized) and saved to the database.
You can click a button at the front-end to find a discount code based on the product id.
The coupon code must have a status field. it indicates that the coupon code has not been obtained, has been obtained, has not been used, and has been used... depends on your own logic.
I have a discount code and a coupon here.
Isn't there a discount table?
Bind the member id.
Sorry, I am not here recently. now I am finishing the post.