Hi,
By following one of the threads in the pricetapestry.com forum I have filtered out the categories I don't want to show and only show the ones in category mapping.
The problem now is that after doing the slow import only a few of the mapped categories are showing on the site. Any reason why this is happening?
Thanks,
John
The site that I am working on is sort of a niche market in sports, but the products available for this niche is huge. So my feeds contain various sport products for other sports as well, which I don't want to appear on my site. In total the feeds have about 200k products (one which is massive) that need to filtered and be mapped into different categories.
The problem I have with product mapping is that not all related products are included even though I found them when searching in product mapping in admin. Is it possible not map the products and exclude the produts/categories I don't want?
Hello John,
There is an occasional situation where superfluous spaces in product / category names become "lost" between the helper tool and the Alternatives box on the mapping configuration page because of the way web browsers handle multiple spaces.
There is an easy work-around to this which is to strip any sequence of 2 or more spaces back to a single space in all product and category names during import. To do this, if you edit includes/admin.php (of your Price Tapestry installation) and look for the following comment at line 218:
/* apply user filters */
...and REPLACE with:
$importRecord["name"] = preg_replace('/[ ]{2,}/',' ',$importRecord["name"]);
$importRecord["category"] = preg_replace('/[ ]{2,}/',' ',$importRecord["category"]);
/* apply user filters */
Re-import all feeds, and you should find that far more mappings have then been applied, assuming this the root cause.
- Don't forget that you can manually assign a product to any category on the configuration page for a Product Mapping. You would only need to do this if a product didn't happen to get categorised as required through normal Category Mapping.
So if you can relatively easily reach the point where you have a Category Mapping entry for every category that you _actually_ want to feature on your site, and every product is categorised as required, then you can implement a "category" version of Niche Mode - e.g. only products that are in categories set-up in Category Mapping will be imported. To do this, look for the following comment at line 317 in includes/admin.php:
/* niche mode */
...and REPLACE with:
/* category niche mode */
if (!in_array($importRecord["category"],$admin_importCategoryMappings)) return;
/* niche mode */
Hope this helps!
Cheers,
David.
--
PriceTapestry.com
Hi John,
A category set-up as a Category Mapping doesn't guarantee that it will appear on the site. It would only appear on the site if at least 1 product that triggers that mapping has been imported, or a product has that category already (i.e. no mapping required), so it sounds like filters may have been added that have resulted in the products that would have triggered the mapping being dropped, resulting in the categories having been mapped.
It sounds like you're working on a niche site; and what a number of users do is actually to switch the order in which Category Mapping and Product Mapping are applied during import, and then include a modification to make Category Mapping also look at the product `name` field as well as the `category` field.
So having worked on Product Mapping to match up all the merchants different names for "Blue Widget", and you wanted this product in the "Widgets" category, you would simply create a new Category Mapping entry for "Widgets", and enter "Blue Widget" in the Alternatives box on the configuration page for the mapping.
Finally, you can then enable niche mode so that only the products set-up in Product Mapping are imported, which you can enable by changing line 53 in config.advanced.php as follows:
$config_nicheMode = TRUE;
(applied at import time only, so full re-import required after changing)
I'll email you a patch for the modification as described above for you to try;
Cheers,
David.
--
PriceTapestry.com