You are here:  » Wordpress plugin support for category hierarchy mappping

Support Forum



Wordpress plugin support for category hierarchy mappping

Submitted by sociallyfamous on Thu, 2015-04-02 23:57 in

Hi David,

I remember you were still working on the WP support for category hierarchy mapping.

I think that the most important thing is that we get to organize the subcategories in the PT installation to sort through the product categories and to have a tool to structure it. If these subcategories are not shown as actual subcategories in WordPress is actually not that important if we are talking about drilling down and narrowing down search results, as the filter dropdowns would show only the few relevant categories for a specific search anyways and whether they are subcategories of a parent or not is actually not that important as long as they show.

The best and probably a lot simpler way to make this useful, would be to treat PT subcategories as normal categories in WP.

I would like to know your thoughts on that. Maybe that could be an intermediate release. Or maybe I am already losing the big picture zooming in too much on my problems.

Kind Regards

Submitted by support on Fri, 2015-04-03 09:13

Hi,

> The best and probably a lot simpler way to make this useful, would
> be to treat PT subcategories as normal categories in WP.

A very easy way to do this, without requiring any changes to the plugin would be to set the normal category value to the category hierarchy subcategory at import time. If you'd like to give this a go, edit includes/admin.php and look for the following comment at line 360:

    /* capture original catalogue product name prior to mapping */

...and REPLACE with:

    global $admin_importCategoryHierarchy;
    if (isset($admin_importCategoryHierarchy[$importRecord["categoryid"]]))
    {
      $importRecord["category"] = $admin_importCategoryHierarchy[$importRecord["categoryid"]]["name"];
    }
    /* capture original catalogue product name prior to mapping */

And then look for the following code at line 594:

   $admin_importCategoryHierarchyMappings = array();

...and REPLACE with:

    global $admin_importCategoryHierarchy;
    $admin_importCategoryHierarchy = tapestry_categoryHierarchy();
    $admin_importCategoryHierarchyMappings = array();

Full support for the category hierarchy will be in the final release of the next version of PriceTapestry.org for WordPress, currently in beta.

Cheers,
David.
--
PriceTapestry.com