bazeboiee — 2012-03-26T09:13:12-04:00 — #1
Not sure if this is the right area to discuss this but here goes. I'm helping to create a marketing campaign for a client and one part of this is that we're using QR codes on the advertising. I was wondering if it would be possible to put a text string into the URL that would then take them to the checkout page and populate the Promotional Code text box with the relevant discount code?
mickyginger — 2012-03-26T11:39:14-04:00 — #2
If the url is something like: http://www.example.com?code=r4dxp9yt
$_GET['code'] will contain your promo code in PHP.
var code = window.location.href.match(/\\?code=([a-z0-9]+)/);
code will now contain your promo code.