You are here:  » Importing ">" character in category field

Support Forum



Importing ">" character in category field

Submitted by thelegacy on Sat, 2011-02-26 17:26 in

Hi Dave,

I'm trying to import my lowest level category on some feeds ie: boots > brown > mens boots
Currently they'll read "boots brown mens boots"

I understand the category fields are now normalised during import, so the ">" character is stripped.
Somewhere about line 170 of includes/admin.php

I had used this once before, but am having some trouble with it in the new distribution. Is is just the includes/admin.php file I need modification in, along with the explode filter to bring me to the lowest level category in the feed? ie: explode character ">" -1

Thanks in advance,
Ray

Submitted by support on Sat, 2011-02-26 18:39

Hi Ray,

That's correct - in the latest version look for the following code at line 168 of includes/admin.php:

      $importRecord["category"] = tapestry_normalise($importRecord["category"]);

...and REPALCE that with:

      $importRecord["category"] = tapestry_normalise($importRecord["category"],">");

Then just the Explode filter from this thread added to your includes/filter.php. Then you can add a new Explode filter to the Category field for the feed, using ">" (without quotes) as the Explode Character or String, and -1 as the return index...

Cheers,
David.
--
PriceTapestry.com

Submitted by stevewales20 on Sat, 2011-02-26 22:26

Ah brilliant.

Any way to possibly map sub categories to the product?

I'd like to have the sub cats as well as the main category associated with the product so that i can setup some side navigation and have it like so:

category > sub > sub

If you know what i mean. I'm thinking i could possibly modify the explode and have it place the extra broke down cats into a sub_category field within the database.

any idea's on how best to go about it?

Cheers
steve

Submitted by support on Sun, 2011-02-27 10:41

Hi Steve,

Potentially, but category > sub-category support is something that I've intentionally not wanted to support in Price Tapestry due to there being no consistent category hierarchy data available in most affiliate product feeds. I'm concerned that most users who wouldn't have data available of sufficient quality would be dissatisfied with the results.

Bear with me as I am looking at an option to create a 2-level category hierarchy in conjunction with Category Mapping. What this would entail would be an additional field on the configuration page for a Category Mapping, in which you can enter a top level category for that category to fall under. Navigation can then be created by taking top level categories from the categories table, and then using the feed / products table category field as the second level....

Cheers,
David.
--
PriceTapestry.com

Submitted by stevewales20 on Sun, 2011-02-27 19:42

Hey David,

I totally understand it's never going to be the ideal solution for most users, especially those rolling out site's on a mass scale.

However those with niche markets that aim to utilize the script for one particular niche would definitely appreciate the mod your talking about.

My main categories will rarely change. However my sub categories may do from time to time.

I'll wait about for the solution whilst having a go myself at creating something similar as a temporary measure.

Thanks again for the amazing support. I appreciate the time you take to create individual mods that won't appeal to the masses.

Cheers
Steve