PDA

View Full Version : Gift Certificate


mllco
03-Dec-2004, 01:15 PM
Hi,

I intend to propose to my customers to buy online gift certificates. Of course, they'll pay them with credit card.

After the purchase, I'll send to the buyer the gift certificate with a reference number. The recipient of the Gift certificate will use this number to place his order.

Now, in place of the credit card information, what have I to do to give to the person who as received the Gift certificate, the possibility to introduce the number of the gift certificate instead the credit card information?

Thank you very much,

Bruno

http://shop.belgianshop.com

DaveT
03-Dec-2004, 02:02 PM
Hello

I have done a similar thing to provide customers with a voucher if they take advantage of a first offer.

What I did was, they checkout, enter the voucher code and if it is the right code, I used some javascript in the checkout submit form to set a cookie containing the next Voucher code and their email address (ie VOUCHER=fred@bloggs.com), taken from the Invoice Address Email box.

Then I set the exit page (Page for Completed or Aborted Checkout) to a Perl script that tries to read that cookie. If it finds the right code, it sends them an email containing the new code and other important greetings.

Then after sending the email it returns to the home page.

If it does not find the cookie code, it simply returns them to the homepage without sending email.

Works like a charm. What I have not yet done is added a ClearCookie routine to the Cancel button.

The second voucher covers a certain amount, or else you could set to a discount of 100% if you want to give them everything free.

Would you like some help?