You are here:  » Can brands be mapped same way as products?

Active Forum Topics


Can brands be mapped same way as products?

Submitted by clare on Wed, 2010-12-15 15:48 in

I was just wondering would it work if I were to create a table in the DB called brandsmap, same as productsmap.

Changed the references in the 3 following files to be for brandsmap
productsmap
productsmap_configure
productsmap_delete

and then added code for brandmap the same as is already there for the productsmap to
admin_menu
database_tool
feeds_import_slow
admin

Would I then be able to map the brands as well?

Submitted by support on Wed, 2010-12-15 16:30

Hi Clare,

Sure that would work - a slightly easier mod that serveral users have done is to also apply the category mapping to brands (so you just use the same Category Mapping admin tools to map both categories and brands).

To do this, simply copy the Category Mapping section in includes/admin.php (it begins with the comment /* apply category mappings */ at line 203 and extends to line 234) but change each instance of $importRecord["category"] to $importRecord["brand"] - that's it!

Cheers,
David.
--
PriceTapestry.com

Submitted by clare on Wed, 2010-12-15 16:37

Ah, that sounds alot simpler! Thanks.

Submitted by richard on Sun, 2013-08-25 20:56

Hi David

I hope you are well.

I am tidying up my old site, a very heavily modified 2009 PT vintage.

I would like to product map based on EAN codes. I have amended the database and the include/admin.php and admin/feeds register2 file.

Which files and what would I need to modify to use the new EAN field?

Regards

Richard

Submitted by support on Mon, 2013-08-26 07:40

Hello Richard,

With the `ean` field being registered and imported you will now be able to use the Product Mapping by UID scripts, full details in this thread, starting a Step 2 (since Step 1 refers to adding the new field based on later distributions)...

Cheers,
David.
--
PriceTapestry.com

Submitted by richard on Mon, 2013-08-26 09:41

Hi David,

Many thanks.

The version that I am operating does not have the config.advanced.php file. Can I add the code

<?php
 $config_uidField 
"ean";
?>
to the standard config.php file in step 2 without causing problems with later steps?

Regards

Richard

Submitted by support on Mon, 2013-08-26 09:48

That will be fine, Richard!

Cheers,
David.
--
PriceTapestry.com

Submitted by richard on Mon, 2013-08-26 12:18

Hi David

I have worked through the instructions...

The database is modified as desired by creating the ptuidfix table.

The uidmap.php appears to run ok, but how does the mapping work? The reason for asking is that products with the same EAN code are not being combined in the product results.

Regards

Richard

Submitted by support on Mon, 2013-08-26 12:55

Hello Richard,

uidmap.php runs in two phases, first by building up a database of UIDs (EANs in your case) against product name, and then from that table selecting one name and EAN pair and then updating the name field on the `pt_products` table for all records that have the EAN.

So it should take a few seconds to run - are you finding that it returns almost immediately?

Cheers,
David.
--
PriceTapestry.com

Submitted by richard on Mon, 2013-08-26 17:49

Hi David

Yes results are quite quick.

The output in the browser includes results such as:

Phase 1:INDESIT IWDE126 (2)
Phase 2:INDESIT IWDE126

In my database I have four instances of the washing machine "IWDE126". When I search for "IWDE126" I get two results, one containing three retailers and another for the other retailer.

So I am puzzled why all four are not under the one result.

Submitted by support on Tue, 2013-08-27 10:39

Hi Richard,

Please could you email me the associated includes/database.php from your installation and I'll follow up by email for you...

Cheers,
David.
--
PriceTapestry.com

Submitted by richard on Tue, 2013-08-27 11:52

Hi David

What I will do is upgrade to your latest release as you have some great new features.

In the meantime I will just do a manual product map otherwise I am just shifting demands on my time on to you! Also I note that feeds such as John Lewis do not always have the EAN code for all of their products.

After all these years I am still amazed by the product and the exceptional product support

Thanks again

Regards

Richard