hi,
CJ datafeed category have a header stucture for ADVERTISERCATEGORY
MainSection > SubSection > RealCategory
PT would simply delete the > and make use of the whole line as the category.
Is it possible to automatically use the RealCategory only and ignore the MainSection, Subsection and the > symbol without applying a filter?
Thanks in advance!
Regards,
Alex
hi david,
i still cant get the MOD above to work. :(
Is it just posible to make the > convert to space.
my categories end up from
Main Section>Sub section>Category
to
Main-SectionSub-sectionCategory
I would be ok with just making the > into a space
Hi Alex,
Sorry - I just realised that the normalise call will be stripping the > character before the user filters are applied. Look for the following code beginning at line 170 of includes/admin.php:
if ($admin_importFeed["field_category"])
{
$record[$admin_importFeed["field_category"]] = tapestry_normalise($record[$admin_importFeed["field_category"]],">");
}
Now, you could comment out this section to permit the category field through unmodified; alternatively, REPLACE the above with the following code in order to permit the ">" field, which you can then use either with the Explode or Search and Replace filters if you just want to replace > with a space (or empty string as there are already spaces surrounding the character)...
Cheers,
David.
Hi Alex,
Sure - if you have not done so already, add the Explode filter from the first reply in this thread:
http://www.pricetapestry.com/node/2017
Then, add a new Explode filter to the category field, and enter ">" as the Explode Category or String, and -1 as the return index (using a negative number returns from the end rather than the beginning).
After the Explode filter, also add a "Trim" filter to tidy up the category value by removing any leading white space.
Hope this helps!
Cheers,
David.