You are here:  » Voucher Codes - Match Types Question

Support Forum



Voucher Codes - Match Types Question

Submitted by npaitken on Fri, 2011-07-01 09:28 in

Hi David,

I've been using the Voucher Codes functionality (unmodified) for a while - works brilliantly BTW, excellent feature. I got a specific request from a merchant today which threw me a bit - 10% Off all products except XYZ brand!

The only way I can display this at present is by spelling it out in the discount text. This leads to a couple of issues 1) makes the text far too long and just doesn't look right 2) displays the wrong price for XYZ brand which the discount obviously doesn't apply to.

Can you think of a way around this?

Many thanks,
Neil

Submitted by support on Fri, 2011-07-01 11:59

Hi Neil,

It would be straight forward to add a conditional check. In includes/tapestry.php, look for the following code around line 197:

          if ($isValid)
          {

...and REPLACE with:

          if ($isValid)
          {
            if (($voucher["merchant"]=="Merchant Name") && ($voucher["code"]="ABC"))
            {
              if ($product["brand"] == "XYZ")
              {
                $isValid = FALSE;
              }
            }
          }
          if ($isValid)
          {

Replace Merchant Name, ABC (the voucher code) and XYZ (the brand name) as required...

Cheers,
David.
--
PriceTapestry.com