We have one product, payment is by PayPal. Before going to PayPal need to apply a discount. We want to create a system where people can enter a gift certificate code to get product free (ie 100% discount) or enter some code to get a specific discount (ie SAVE10 – get a 10% discount).
Some codes will be just for one use (ie gift certificates), some can be used multiple times – ie SAVE10. Some will also have expiry dates.
Going to use MySQL and php to put together.
Has anyone out there already done this and put something together? or know of some code we can use to save time? Do not need entire shopping cart just the discount code parts..
Thank you.
This is essentially a one class functionality, really. You’d need a class interface that would look like this
The DB table could look like this
Note : The validation process could just be a simple
SELECTstatement :Then just use this class when validating checkout form. For example,
Well, that’s somewhat how I would do it.