You are here:  » Voucher Code Match Criteria Search in 15/09A Beta


Voucher Code Match Criteria Search in 15/09A Beta

Submitted by bat on Sun, 2016-02-21 19:20 in

Hi David,
I've 15/09A Beta installed and I've noticed in the voucher code back end, where you add the codes, that when you select the merchant and then search for products to add to your Exact/Keyword match box that the results it brings up includes products from all the merchants, not just the one you've selected.
Is there any way please to bring up search results just for the selected merchant?

Thanks!

Submitted by support on Mon, 2016-02-22 09:46

Hello Bat,

Thanks for pointing this out - it should have in fact worked as you describe - the merchant value is passed through in the AJAX query but not actually used.

To correct this, in admin/voucher_codes_edit.php look for the following code at line 42:

    $where = "(".implode(" OR ",$wheres).")";

...and REPLACE with:

    $where = "(".implode(" OR ",$wheres).")";
    if ($merchant)
    {
      $where .= " AND merchant = '".database_safe($merchant)."' ";
    }

Cheers,
David.
--
PriceTapestry.com