Hi,
Is it possible to remove products that have no images using the Filter settings?
If so, does anyone know how to go about this please?
Thanks very much,
Arya Marafie.
Unfortunately, they seem to be putting in a url to a "no image" image so this doesn't work.
I remedied this with the worst culprit by have a drop record filter, but is it at all possible to remove it globally if "noimage" is in the url?
---------
Jill
Hi Jill,
Sure; to do this within includes/admin.php, immediately AFTER the block of code described in the first comment in this thread (but not as a replacement of it), add the following code;
if (strpos($record[$admin_importFeed["field_image_url"]],"noimage")!==FALSE)
{
$record[$admin_importFeed["field_image_url"]] = "";
}
..and that will empty the image_url field, meaning your theme's no image code can take over and display a local "no image available" image...
Cheers,
David.
Hello Arya,
Do you want to do this on a feed-by-feed basis, or globally?
Globally can be done quickly and easily by adding a condition to the import record handler function. In includes/admin.php you will find this starting at line 155:
/* check product record for minimum required fields */
if (!$record[$admin_importFeed["field_name"]] || !$record[$admin_importFeed["field_buy_url"]] || !$record[$admin_importFeed["field_price"]]) return;
To make images mandatory, change this to:
/* check product record for minimum required fields */
if (!$record[$admin_importFeed["field_name"]] || !$record[$admin_importFeed["field_buy_url"]] || !$record[$admin_importFeed["field_price"]] || !$record[$admin_importFeed["field_image_url"]]) return;
Cheers,
David.