Hi i would like to put a default image if is empty
and hide all the products with 0.00 price,
i try with a script that I read (with amazon.....) but not works :(
can you help me?
Hello,
Sorry to pull this post up, but is this information still active . I can't find this code line 275...
Thanks
Hi,
Instead of the above method (as the import process has changed in more recent distributions) look for the following code at line 342 of includes/admin.php
if (!$importRecord["merchant"]) return;
...and REPLACE with:
if (!$importRecord["merchant"]) return;
if (!$importRecord["image_url"]) $importRecord["image_url"] = $config_baseHREF."images/noimage.gif";
Cheers,
David.
--
PriceTapestry.com
Hello Enrique,
The easiest way to hide product with 0.00 price is not to import them. To do this, in includes/admin.php you will find this code on line 168:
$record[$admin_importFeed["field_price"]] = tapestry_decimalise($record[$admin_importFeed["field_price"]]);
...to make it not import the product if the price is zero, REPLACE that with:
$record[$admin_importFeed["field_price"]] = tapestry_decimalise($record[$admin_importFeed["field_price"]]);
if ($record[$admin_importFeed["field_price"]] == 0) return;
To make a default image show where there is no image from the feed, one way is to change everywhere that displays the image and make it use a default image, but it will be easier to, like above, do it at import time. To do this, on line 275 you will find:
database_safe(isset($record[$admin_importFeed["field_image_url"]])?$record[$admin_importFeed["field_image_url"]]:""),
...simply REPLACE this with:
database_safe(isset($record[$admin_importFeed["field_image_url"]])?$record[$admin_importFeed["field_image_url"]]:"/images/noimage.gif"),
...where
/images/noimage.gif
is the relative URL of your "no image" picture...Cheers,
David.