Hi,
I would like to use the category field for some kind of tagging system like in this thread:
http://www.pricetapestry.com/node/1171
However, in my datafeed the category field is displayed as: |Populair|Animal Nature|Men|,
which on import is striped to: PopulairAnimal NatureMan. How can i go about getting this to import as: Popular, Animal Nature, Men?
I think the best way is to prevent the "|" being stripped on import for the category field and then replace it by using the replace filter (replace "|", with ", ").
Is this the best way to go about it, and how can this be done?
Thanks,
Hello Marco,
The pipe character is stripped by the tapestry_normalise() function on line 172 of includes/admin.php:
$record[$admin_importFeed["field_category"]] = tapestry_normalise($record[$admin_importFeed["field_category"]]);
To allow the pipe character, add the pipe character in the allow characters string, which is the optional second parameter to this function; like this:
$record[$admin_importFeed["field_category"]] = tapestry_normalise($record[$admin_importFeed["field_category"]],"|");
You can then go on to use Search and Replace as you suggest!
Cheers,
David.