Hi David.
I have a mercahtn which have two vouchers code actived, however, the are the same with the only different of the min_price (match_value and match_type is the same)
So, when I search for that /search.php?q=voucher:{merchant}:{code}, only the first one is picked as we are taking $voucher = $vouchers[0]; in search.php
Is any way I can "merge" both vouchers? Maybe when code is the same, order by min_price?
Thanks in advance!
Thank you, I love it, just a minor change and it works as expected.
Hi,
To merge by min_price at search time - edit search.php and look for the following code at line 179:
$voucher = $vouchers[0];
...and REPLACE with:
$voucher = $vouchers[0];
if (count($vouchers > 1))
{
foreach($vouchers as $v)
{
if ($v["min_price"] < $voucher["min_price"])
{
$voucher["min_price"] = $v["min_price"];
}
}
}
Hope this helps!
Cheers,
David.
--
PriceTapestry.com