Hello David,
What would be the easiest way to have PT only import products that have information in the category field? I have PT auto import a hundred feeds or so and want those products that have a blank category to be dropped.
Thanks for the help.
Mark
Hello Mark,
If you want to make this an "across the board" drop record, the quickest way is to add a single line to the import record handler function to check for the category field and abort if it is not set (just like the checks for the required fields are made).
If you look in includes/admin.php, search for the following comment on line 154:
/* check product record for minimum required fields */
You can then add the following on the next line:
if (!$record[$admin_importFeed["field_category"]]) return;
If you're comfortable enough with the PHP you could combine this with the other required fields check, but it's no problem to have it on its own line. That should do the trick!
Cheers,
David.