You are here:  » Combining several categories


Combining several categories

Submitted by KennethJ on Fri, 2015-07-24 08:11 in

Hi Dave,

First of all this is my first post here, so I'm sorry if this is already answered in the forums but I couldn't find the answer.

I just bought the script yesterday and have been playing around with the different import options and mapping features. Really powerful and I love the fact that you can use RegEx a lot of places.

Now I have a lot of different categories and some of them are quite similar. I would therefore like to combine a bunch of these categories into a new one. But how to do that? I'm sure the answer is simple, but i'm kinda stuck with this.

Regards,
Ken

Submitted by support on Fri, 2015-07-24 08:34

Hello Ken,

Thank you for your comments and welcome to the forum!

This is exactly the scenario for which Category Mapping is intended. It's rare that merchants use exactly the same category names for what is essentially the same category, or in some cases a merchant may use more resolution than required on your site so a number of individual merchant categories can be grouped in this way also.

What I normally do when working on Category Mapping is to open the Category A-Z page in a new window. Study the list to identify a group of similar categories and decide what single category name you would like to use on your site. Create a new Category Mapping with your preferred name, and then on the configuration page for the mapping, use the Category Search box to locate the individual feed categories and from the results select the items to add to the list and click << to add them to the Alternatives box as exact match alternatives (they will be preceded by = sign).

Save the mapping, and after the next import of all feeds (or at least all feeds affected by the mapping) you will now have only your single preferred category name instead of the multiple similar names from the feeds.

Cheers,
David.
--
PriceTapestry.com

Submitted by KennethJ on Fri, 2015-07-24 09:07

Hi there,

Thank you for a swift reply. I just found out that the search box for alternative names only finds the 6 first category names. I had like 35 similar category names and after each 6 I had to re-import the feed.

Seems silly that the search field only finds 6 names if there is more.

Can I somehow change that limit?

Thanks,
Ken

Submitted by support on Fri, 2015-07-24 09:35

Hello Ken,

The helper tool is limited to 6 results by default but this can be removed easily, to do this, edit admin/helper.php and look for the following code at line 22:

    $sql = "SELECT DISTINCT(".$field.") FROM `".$config_databaseTablePrefix."products` WHERE ".$field." LIKE '%".database_safe($q)."%' ORDER BY ".$field." LIMIT 6";

...and REPLACE with:

    $sql = "SELECT DISTINCT(".$field.") FROM `".$config_databaseTablePrefix."products` WHERE ".$field." LIKE '%".database_safe($q)."%' ORDER BY ".$field;

If you're not sure about making changes at all drop me an email and I'll forward the modified version for you, no problem at all. A number of people have asked about this limit recently (the same script is used for category / brand / product search throughout various admin tools) so i'm going to review this in the current beta and either remove or significantly increase it...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by KennethJ on Fri, 2015-07-24 10:03

Works like a charm!

Thanks,
Ken