Hi David,
You helped me with something similar before, but I can't track down the solution !!
Looking to stop all products containing the word "Preowned" from being imported. Have other products which have other words which I would also like to have not imported. I have used the "Drop Record RegExp" filter for some merchant feeds but would like to do this for all feeds without having to apply a filter.
Is there any way of having a text box similar to admin/featured.php in the admin menu section containing specific words from the product name field which are not to be imported.
Hope this makes sense !!
Adrian
Hi David,
As a temporary solution, can you advise which file needs to be altered to allow this. I implemented this a while back and could scan the code and copy what I currently have (if I could find it !!)
Cheers
Adrian
Hi Adrian,
"hard coded" global filters would normally be placed into the import record handler function within includes/admin.php. Within that file, look for the following comment at around line 294:
/* create dupe_hash value */
...and immediately BEFORE that point, insert the following code to ignore records with a product name containing anything in the list....
$ignoreNames = array("Preowned","Pre owned","Used");
foreach($ignoreNames as $ignoreName)
{
if (strpos($importRecord["name"],$ignoreName)!==FALSE)
{
return;
}
}
Cheers,
David.
--
PriceTapestry.com
Hi Adrian,
Global Filters (which would enable you to apply Drop Record [RegExp] globally) is something I've been considering incorporating, and that together a couple of minor internal improvements that I have been meaning to merge in I'll look to expedite that which will enable you to achieve this via /admin/ without code modification...
Bear with me and I'll let you know when it's available for testing...
Cheers,
David.
--
PriceTapestry.com