You are here:  » Product Mapping


Product Mapping

Submitted by stevewales20 on Mon, 2013-08-05 12:56 in

Hi David,

I'm starting to map some of the products and i'm using the new product mapping helper as well as the custom category. I'm not sure it is working correctly though. Do i need to make adjustments to the admin.php script? Not sure where to check if it's installed correctly.

Also i have the subcategory mapping working, so i'd like to be able to map to sub category instead of category and allow the admin script to import the category name as well.

I'm having one or two issues where a few products are being placed in the wrong category and i'm having trouble finding out why. Is there a way to track it down?

Thanks for your help,
Steve

Submitted by support on Mon, 2013-08-05 16:38

Hi Steve,

Product Mapping is only applied at import time, so having modified or added new Product Mapping entries any affected feeds will need to be re-imported - so you can either do that manually / immediately, or wait for the next CRON job to run.

If you want to have the custom category field on Product Mapping update your `subcategory` (assuming that is exactly what it is called - adjust the code below if not) instead of `category`, that's no problem - in includes/admin.php look for the following code around line 307:

if ($admin_importProductMappingsOverrides[$importRecord["name"]]["category"]) $importRecord["category"]
  = $admin_importProductMappingsOverrides[$importRecord["name"]]["category"];

...and REPLACE with:

if ($admin_importProductMappingsOverrides[$importRecord["name"]]["category"]) $importRecord["subcategory"]
  = $admin_importProductMappingsOverrides[$importRecord["name"]]["category"];

(just the one instance of "category" changed to "subcategory".

One way to check categorisation of products is to temporarily display a product record's category in the Price Comparison table on the product page. To do this, if you edit html/prices.php and look for where the merchant's original name is displayed around line 12:

  <td><?php print $product["original_name"]; ?></td>

...and REPLACE with:

  <td><?php print $product["original_name"]; ?> (".$product["category"].")</td>

You'll then be able to see which categories each instance of the product is in, and use that information either to create a Category Mapping to correct it as required...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by stevewales20 on Mon, 2013-08-05 19:00

Cheers david,

I located where some of the issues are happening. I've tried getting the = to work in category mapping, but it fails. Without it the mapping is doing quite broad mapping, for example i have the word 'bra' which of course maps quite a few categories throughout the site. How can i implement the = character to be used?

Steve

Submitted by support on Mon, 2013-08-05 19:12

Hi Steve,

I know that you've been using the script for many years so just so that I'm up to date, please could you email me your current includes/admin.php and I'll check that Category Mapping =exact match code is in place and case insensitive for you...

Cheers,
David.
--
PriceTapestry.com