You are here:  » Hierarchy Category Mapping using keywords still lists products as unmapped in reverse mapping


Hierarchy Category Mapping using keywords still lists products as unmapped in reverse mapping

Submitted by bat on Mon, 2017-02-20 18:16 in

Hi David,
When I'm using keywords to Category Hierarchy map with, rather than exact matches, I've noticed that in Reverse Mapping it's still listing those products as unmapped despite them actually showing up in the correctly mapped category on the front end.

If I filter reverse mapping categories to show 'Unmapped Only', then those keyword category mapped products don't appear on the listing, which is correct and worked as it should do. So that's working correctly.

Is there any way that on the normal (unfiltered) Reverse Mapping page that those products that are mapped by keyword instead of exact match can state the actual category they've been mapped to?

Submitted by support on Tue, 2017-02-21 10:09

Hi,

Sure - keyword mapped feed categories can be indicated easily on the main Reverse Mapping page. To do this, edit admin/categories_hierarchy_reverse.php and look for the following code at line 133:

  $sql = "SELECT DISTINCT(category) FROM `".$config_databaseTablePrefix."products` WHERE category <> ''";

...and REPLACE with:

  $sql = "SELECT DISTINCT(category),categoryid FROM `".$config_databaseTablePrefix."products` WHERE category <> ''";

And then the following code at line 227:

    print "</tr>";

...and REPLACE with:

    print "<th>Keyword Mapped To</th>";
    print "</tr>";

And finally the following code at line 249:

      print "</tr>";

...and REPLACE with:

      print "<td>".(!$row["default"]&&$row["categoryid"]?$options[$row["categoryid"]]:"")."</td>";
      print "</tr>";

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Tue, 2017-02-21 11:40

That's champion, David. Thanks!