I have a lot of $0.00 prices showing up. I've followed the instructions on http://www.pricetapestry.com/node/1215 to display "Check price on site" but they are still showing up on featured items, and they are going to the top of the list in the price comparison. Is there anyway to simply ignore or skip 0.00 prices when ranking?
I would especially like to remove them from the front page features. They've invaded three on my homepage {link saved}
This may be related to my other post about fields getting mixed up during input.
Thanks,
-Wayman
Hi Wayman,
The brutal option of course is to drop products during import - this can be done quite easily in includes/admin.php by looking for the following code at line 274:
/* decimalise price */
$importRecord["price"] = tapestry_decimalise($importRecord["price"]);
...and REPLACE with:
/* decimalise price */
$importRecord["price"] = tapestry_decimalise($importRecord["price"]);
if ($importRecord["price"] == "0.00") return;
Removing zero prices from featured products shouldn't cause any problems - the products are selected by the following SQL created on line 53 of index.php:
$sql = "SELECT * , MIN( price ) AS minPrice, MAX( price ) AS maxPrice, COUNT( id ) AS numMerchants, ".$sqlCase." FROM `".$config_databaseTablePrefix."products` WHERE normalised_name IN (".$sqlIn.") GROUP BY normalised_name ORDER BY sequence";
...so you could REPLACE that with:
$sql = "SELECT * , MIN( price ) AS minPrice, MAX( price ) AS maxPrice, COUNT( id ) AS numMerchants, ".$sqlCase." FROM `".$config_databaseTablePrefix."products` WHERE price > 0.00 AND normalised_name IN (".$sqlIn.") GROUP BY normalised_name ORDER BY sequence";
However, to do the same in search results could have performance implications so I would try to avoid that if possible. I'm not sure why the mod from /node/1215 is not having the desired effect, but it may be worth trying a string comparison - from the replacement code, in place of:
if (!intval($product["price"]))
use:
if ($product["price"]=="0.00")
Hope this helps!
Cheers,
David.