You are here:  » Category hierarchy import


Category hierarchy import

Submitted by wilkins on Fri, 2020-05-01 15:25 in

Hi david

I think I used to import categories with hierarchies like Clothes>tops>black tops so that it only imported either the top or the bottem category and not the whole stucture. Is there a way or is it just that I am getting old?

Regards

Brent

Submitted by support on Wed, 2020-05-06 10:17

Hello Brent,

You can use the Explode filter to do this but first the ">" character needs to be permitted so that it can be used with the filter. To do this, edit includes/admin.php and look for the following code at line 198:

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

...and REPLACE with:

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

With that in place you can use an Explode filter against the category field using ">" (without the quotes) as the Explode Character or String, and either 0 (zero) for the highest level category or -1 for the lowest level...

Cheers,
David.
--
PriceTapestry.com