If we do an email marketing campaign, instead of displaying the coupon code for people to retype, is there a way to place that coupon code as a string in the URL that AC7 can use?
Thanx,
Carlos
Is there a way to pass a coupon/discount code via the URL?
Re: Is there a way to pass a coupon/discount code via the URL?
You'd have to code that, but it's easily do-able. Grab the value by assigning it to a session variable in Global.asax:
We implement a generic persistable class that stores coupons and gift certificates passed in this way - if the user also signs in, the tokens are associated with their user id as well, with a nifty little control that lets them track basket balance and apply to a basket using a checkbox control:
Code: Select all
protected void Session_OnStart()
{
//SAVE THE REFERRER FOR USE BY THE ORDER MODULE
if (Request.UrlReferrer != null) Session["SessionReferrerUrl"] = Request.UrlReferrer.ToString();
// init any global behaviors found in the url or querystring
Session["_GlobalAccess"] = (Request.QueryString["ga"] != null && Convert.ToInt32(Request.QueryString["ga"]) == 1) ? 1 : 0;
Session["_ActiveVoucher"] = (Request.QueryString["v"] != null) ? Request.QueryString["v"] : "";
}
Nick Cole
http://www.ethofy.com
http://www.ethofy.com