Skip to main content
Inspiring
November 2, 2007
Question

session variables and coupons

  • November 2, 2007
  • 3 replies
  • 287 views
i am considering creating a coupon offer, whereby a previous customer can save x% on a transaction.

i am considering the following...

send an email to customer with code and link
when customer keys code into form field on link page, value (if correct) is stored as session variable, customer redirected to relevant page on site
when customer wants to add item to cart, page checks for session variable, if valid, coupon discount is applied, if not then no discount.
session variable used to check all items for potential discount.

is this a good approach ?

i appreciate the method is open to abuse if the coupon code is genetric to all, customers, but if targeted to individuals, with a time limit and once only use, i could make it very focussed.

regards



This topic has been closed for replies.

3 replies

spudserAuthor
Inspiring
November 5, 2007
Thanks for the advice.

This is my thinking, I think it corresponds to your comments, if not sorry if i missed something.

In principle using a session varible is a good approach to take.
As far as security/abuse was concerned, i could be very customer specific , and was considering having a database table containing customer id (email), unique voucher code (if i feel it necessary), voucher expiry date, voucher discount level, and possibly a flag to identify if the voucher had been used.
This would potentially allow me to give different levels of discount to different customers.

the session variable would be set as the voucher code sent to the customer and compared to the database.
whilst the session is active, all items put into the cart will be discounted
if the voucher id is recognised, , if not , cutomer is aware of this, and no discount applies.
November 5, 2007
Spudser,

I don't know what language you are using , but couldn't you carry the special code in the link that you would email the customer? Not sure if this is done only in CF. When they login, compare session or url or some kind of variable, and re-direct to the product page with the savings applied, all they have to do is add to cart and check out? I do something like this at work, but I don't work on the e-commerce end, just the promo end. I can carry a special code I make, through the url, using CF, through to the online store, where the user will land on a product page with a special discount highlighted in red, they just add to cart and check out. The on-line store is ASP.net. So, I'm sure there is a good, secure, solution to this .

Steve
Inspiring
November 4, 2007
Alternately, you could store the coupon in the user's profile, and check for
coupons at checkout. This approach would be more secure, IMHO.

HTH

Steve

"spudser" <webforumsuser@macromedia.com> wrote in message
news:fgf8l1$m69$1@forums.macromedia.com...
>i am considering creating a coupon offer, whereby a previous customer can
>save
> x% on a transaction.
>
> i am considering the following...
>
> send an email to customer with code and link
> when customer keys code into form field on link page, value (if correct)
> is
> stored as session variable, customer redirected to relevant page on site
> when customer wants to add item to cart, page checks for session variable,
> if
> valid, coupon discount is applied, if not then no discount.
> session variable used to check all items for potential discount.
>
> is this a good approach ?
>
> i appreciate the method is open to abuse if the coupon code is genetric
> to
> all, customers, but if targeted to individuals, with a time limit and once
> only
> use, i could make it very focussed.
>
> regards
>
>
>
>
>