The script is very simple (3 PHP files), already developped and working well.
Does NOT use any database.
Does NOT use any complicated programming thing.
Is NOT a shopping cart or the like.
AND I do NOT ask you to add this possibility. Thanks !
Used to protect digital downloads (the payment processor is PayPal).
I need a promotional code feature to be integrated into this script.
The script has already a basic back end. The feature should be integrated also into the back end. Admin would be able to add/edit/delete promotional codes (unlimited number of codes, if possible, or at least 10 different).
Add/Edit a code :
- Code (min. 3 characters - max. 25, letters and numbers).
- Validity : expires mm/dd/yyyy, or unlimited.
- Same user can use the code 2/3/4 times ? Yes/No. An unlimited number of times ? Yes/No.
- Regular price.
- Discounted price.
- Maximum number of times the code can be used before expiring (admin can limit the validity to let's say the first 50 buyers only). Unlimited number of times should also be possible. Obviously, this number is counted AFTER the PayPal payment validation process, not before, and doesn't include false attempts !
The front end has 1 (one) sales page with a PayPal Buy Now button. ONLY 1 (one) product is sold on this page.
Very simple product. Very simple website. Very simple script.
Visitor enters his promo code (provided on another site, in a email, etc.) in a text box located below the PayPal button, then click the PayPal button.
. If the code entered matches one of the promo codes added by the admin in the back end AND is still valid, user is redirected to PayPal and pays the product at the regular price (set in the back end).
. If both don't match, an error message displays above the code text box (and not on a separate page) : "you've entered a wrong code blahblah", and the code text box content is cleared out (to prevent user to try again...)
. If the code has expired, an appropriate message displays (again, above the code box) : "Code has expired blahblah", and the code text box content is cleared out.
. If no promo code is entered, then user is redirected to PayPal and pays the public price (set in the back end too).
The current back end shows basic statistics (number of downloads, etc.) Would be good to include/integrate promo code statistics there.
Very long description, but very easy and job !
Thanks for reading !