You are here:  » Do not display some seller in Featured


Do not display some seller in Featured

Submitted by Greg on Sat, 2013-03-30 21:14 in

Hello David,

I would like do not display some seller in Featured.

Example with a merchant called "79"

I use this in prices.php for do not display some seller in the price comparison :

<?php
 
foreach($prices["products"] as $product): 
?>

<?php
 
if ($product["price"]=="0.00") continue; 
?>

<?php
 
if ($product["merchant"]=="79") continue; 
?>

Result : Work good and merchant 79 isn t displayed.

But when i drop that line in Featured.php there is no effect and all merchants are taken into account to determine the best price to be displayed in the featured.

Result : Merchant 79 price is displayed in featured.

Could you help me to do not display a specific merchant in featured result ?

Regards.

Submitted by support on Sun, 2013-03-31 08:12

Hello Greg,

Sure - you can exclude the merchant via an additional WHERE clause in Featured Products SELECT SQL. In search.php, look for the following code within the SQL at line 53:

WHERE normalised_name IN (".$sqlIn.")

...and REPLACE with:

WHERE normalised_name IN (".$sqlIn.") AND merchant <> '79'

And if you wanted to exclude more than one merchant, a neater way to write SQL would be:

WHERE normalised_name IN (".$sqlIn.") AND merchant NOT IN ('79','80')

Cheers,
David.
--
PriceTapestry.com

Submitted by Greg on Sun, 2013-04-07 14:21

Hello David,

I m sorry to be so Newbie but i dont find in search.php line 53 : WHERE normalised_name IN (".$sqlIn.")

I dont find WHERE normalised_name IN (".$sqlIn.") anywhere in search.php

And i dont understand the relation between search.php and featured.php.

I need your help.

Thx again.

Submitted by support on Sun, 2013-04-07 17:15

My Apologies Greg, it's index.php where you'll find the above code...

Cheers,
David.
--
PriceTapestry.com