Coupon till special date
Hi there,
can I create a coupon that stays till a special date? and is it possible to set that date, via my own backend, without using dreamweaver?
Cheers
Denis
Hi there,
can I create a coupon that stays till a special date? and is it possible to set that date, via my own backend, without using dreamweaver?
Cheers
Denis
you would need to create a table in your database with a column for the coupon code and the end date.
Then create a recordset to lookup the entered coupon code.
Use the set session variable behavior to store the Coupon code and Expiration date from the recordset. On the Server behaviors panel, click the plus button and select eCart -> General -> Set Session Value.
Set the triger to Coupon lookuyp recordset not empty.
Set the name to couponCode
next to value, click the lightning bolt and select the couponCode column from the recordset.
Create another session, using the same trigger, but this time set the name to expDate, for the value, select the expiration date column from your database.
Now when creating the discount rule, set the trigger to:
Session variable couponCode exists
AND
Session variable expDate exists
AND
If today is before a certain day:
if today is before '$_SESSION['expDate']'
Hi Jason,
Would the recordset be put on the cart.php page? (if that's the page the customer is entering the coupon code).
Yes, the recordset will be created on the same page the coupon code is entered on.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.