Change Product Codes

Hi Everyone,

We are currently in an effort to update our product codes and are on 4.3.7 so that we can start printing barcodes on our labels. Current product codes are more human friendly but the varying lengths don't fit on the smaller labels.

We are running Multi-Store and exported from each individual store. Note that the required fields when you are not on All Stores is only Product Code and Language.

However, we included Product ID, Product Code, Language and Product Name (no changes) so we could ensure we were modifying the correct product codes. This will apply to the product options as well that need the facelift.

Since all products have options, we've ended the parent (Product) with '0' like this N00200 and the corresponding child would be NP0211, NP0212, NP0213 for that child size and then NP0221, NP0222, NP0223 for the next size and so forth.

Starting only with the parent, we tried importing a single parent Product Code update. The result was a NEW product being created which is not the desired result. Our hopes were that by including the product ID, the new Product Code would over-write the previous.

Any Ideas as to how else to change a key field?

possibly this

http://marketplace.cs-cart.com/add-ons/site-management/product-code-generator-for-cs-cart.html?sl=en

Thanks Johnbol1,

We looked at that but it appears to be most helpful in generating new codes and we aren't really trying to randomize the codes we have. I know they look a mess but the location and digits do have meaning in our cross reference sheets.

Just wanted to check if there was an easier way to do this other than manually going to each product and its options and typing every single code in for so many sku's

One could do a relatively small my_changes script that would read the CSV and lookup the product_id and then change the product_code to what's specified in the import CSV. After that, the product_codes should be reset for the existing product_id leaving all your imagery, descriptions, etc. all still associated with the existing product_id.

The problem you are facing is that the product_code in the import is actually the primary_key. If THAT code exists, then the product is updated (regardless of what the product_id is) and if THAT code doesn't exist, then the product is created. (and I think it would then try to use the product_id but would error_out because it's already the primary key of the table).

That's what i suspected. You would think the product ID would be the primary key and then the Product_Code, Store, Language would be secondary keys. Ugh.

Not if you think about import/export being generic. Any primary_keys might be different between systems whereas the "object" (product code) is more appropriate for import/export between systems or sites.

Hi YFinder,

Did you ever get this problem sorted, as I am up against the same thing as well. I have thousands of product code updates. If I do it one by one in the admin panel then it works fine but I am trying to do it via a bulk CSV upload. But as you pointed out, done like this CS CART simply generates alot of new products instead.

any help appreciated, thanks

Hey Happy,

Unfortunately no :-(

I think the only real way would be to follow Tbirnseth's suggestion but i haven't had the time to find anyone to do the coding for it.

Hey Happy,

Unfortunately no :-(

I think the only real way would be to follow Tbirnseth's suggestion but i haven't had the time to find anyone to do the coding for it.

Feel free to contact us if you do not find a solution

We too can implement this for you....

Thanks guys....basically I need to upload a CSV which will replace the Product code with updated ones. I imagine that the CSV will contain columns.....Product code (which will be the new one) Product id (so that it knows it is a replacement not a new product.

I have sent a private message re a quote for this, thanks