Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Product Code - Can They Be Updated With A Product Import? Rate Topic   - - - - -

 

Posted 04 December 2018 - 10:09 PM #1

We somewhat regularly have manufacturers updating their product SKUs (Product code) for a product line - even if they are essentially the same product, same image, etc., and I was wondering if there is a simple/quick way to batch update the Product code (SKU - I renamed ours so customers know what it is) for a bunch of products in cs-cart? 

It seems like product imports are linked around the "Product code" variable (it would become a new product if the Product code doesn't already match a product in cs-cart) - even though Product ID's are also available and unique to each item. 

We recently had a manufacturer rename over a 1000 SKU's (Product codes), so a quick product import with the new SKU updated (or something similar - maybe even direct database manipulation) would save a TON of time instead of individually going through the affected products in the Admin products area.  I want to keep the existing product links for SEO purposes, even though it would be much faster to add these "new" products and remove the outdated ones with spreadsheets via exports and imports.  Am I missing anything here - Any suggestions?

Thanks!



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 22197 posts

Posted 05 December 2018 - 05:27 AM #2

Since product code is used as primary key, it is required to rework import feature according to your needs

 

As alternative, import new SKU for each item, for example, as promo text field. Then in phpMyAdmin move value from promo text to product code column


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • crazyshark20
  • Junior Member
  • Members
  • Join Date: 19-Aug 09
  • 346 posts

Posted 05 December 2018 - 10:37 AM #3

   -



 

Posted 05 December 2018 - 04:41 PM #4

Since product code is used as primary key, it is required to rework import feature according to your needs

 

As alternative, import new SKU for each item, for example, as promo text field. Then in phpMyAdmin move value from promo text to product code column

Thanks for the info!  I was pretty sure I would have to do it directly in the database, but just wanted to make sure I didn't miss any tricks in the admin area... :)



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12091 posts

Posted 05 December 2018 - 07:44 PM #5

We have an addon for exactly this purpose. We don't advertise it but if you contact me, I'll sell it to you for $20.

It works like this:

 

1) Do a normal export that includes product_Id and product_code in the 'Product id' and 'Product code' columns.

2) Change the value of 'Product code' to be whatever you want for each product you want to change.

3) Import via a custom import and it will set the product_code for each product_id to that which is in the CSV.

4) Optionally do a standard import to apply changes to other columns.

 

It's simply a special import that only makes the adjustments to the product_code for the product_ids in the CSV.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 

Posted 07 December 2018 - 01:02 AM #6

We have an addon for exactly this purpose. We don't advertise it but if you contact me, I'll sell it to you for $20.

It works like this:

 

1) Do a normal export that includes product_Id and product_code in the 'Product id' and 'Product code' columns.

2) Change the value of 'Product code' to be whatever you want for each product you want to change.

3) Import via a custom import and it will set the product_code for each product_id to that which is in the CSV.

4) Optionally do a standard import to apply changes to other columns.

 

It's simply a special import that only makes the adjustments to the product_code for the product_ids in the CSV.

Great, thanks!  I may take you up on the offer.  I'm going to try direct database manipulation first and if it starts to take up a little too much time or becomes a pain to do, I'll definitely want it.  I created a similar custom importer (same situation) with the last shopping cart we had, but I don't have enough time these days to do it again and am glad you already made one. :)

Where can I buy it from and what versions of CS-Cart does it work with?  (we'll probably be updating the cart in the spring once the season slows down some)



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12091 posts

Posted 07 December 2018 - 06:36 PM #7

You can email me at support at ez-ms.com and I'll give you purchase instructions.

It's very straight forward and is compatible with any V4 version of cs-cart.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • RSUP
  • Newbie
  • Trial users
  • Join Date: 30-Apr 18
  • 2 posts

Posted 20 May 2020 - 02:35 PM #8

I have tried this method, but it does not work for me in version 4.11. The update function works of the Product Code rather than Id to update. Is there something I am missing?



 

Posted 04 December 2020 - 11:51 PM #9

I'm not sure what happened to the forum text above (you can mostly read the original content by copying and pasting the entire page into Notepad and then do a Replace on     ass='searchlite'>     using the "Replace with" line BLANK - it will remove all the garbage content), but I was just re-visiting this one again. If you need to directly modify the database (MySQL or through phpMyAdmin), you can use the command below - it worked great for me, I created a spreadsheet and ran a whole batch of Product Codes I needed to change in one easy pass - each command on its own row:

 

UPDATE store_products SET product_code = "BLUE-17" WHERE product_id = 398;

 

(You will need to change BLUE-17 to be what you need the new Product Code to be that matches up with the corresponding Product ID # - in this example, it was 398)

 

Explanation: The command above will set the Product Code of Product ID #398 to become BLUE-17 instead of what it was before.

UPDATE store_products SET product_code = "<change to what you want>" WHERE product_id = <the matching Product ID of the Product Code that needs to change>;

(remove the <> comment characters too)

I'm sure there are many ways of getting it done, but this worked great for me and was reasonably quick to do...

 

Change three at the same time example:

UPDATE store_products SET product_code = "RED-5" WHERE product_id = 77;

UPDATE store_products SET product_code = "T-65B" WHERE product_id = 167;

UPDATE store_products SET product_code = "Wedge" WHERE product_id = 2;

 

I hope this helps, good luck!



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12091 posts

Posted 05 December 2020 - 09:26 PM #10

Again, there's an addon available that is a 1-button approach to the problem as stated in #7 above.  It uses the same exported file as you'd use for importing your products.  However, if a 'Product id' field is present, it will change the product_code related to that product_id.  It acts as  pre-filter.  I.e. it's run in advance of your running the standard import but uses the same data file.  It does nothing other than change the product_code if needed.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4952 posts

Posted 13 July 2021 - 11:50 AM #11

Again, there's an addon available that is a 1-button approach to the problem as stated in #7 above.  It uses the same exported file as you'd use for importing your products.  However, if a 'Product id' field is present, it will change the product_code related to that product_id.  It acts as  pre-filter.  I.e. it's run in advance of your running the standard import but uses the same data file.  It does nothing other than change the product_code if needed.

Is this still available for 4.5.2 Tony


Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12091 posts

Posted 13 July 2021 - 07:04 PM #12

No reason it shouldn't work on any V4 version of cs-cart or MVE that I can think of.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • leveltgp
  • Newbie
  • Trial users
  • Join Date: 07-Nov 16
  • 1 posts

Posted 09 August 2021 - 04:22 AM #13

I'm not sure what happened to the forum text above (you can mostly read the original content by copying and pasting the entire page into Notepad and then do a Replace on     ass='searchlite'>     using the "Replace with" line BLANK - it will remove all the garbage content), but I was just re-visiting this one again. If you need to directly modify the database (MySQL or through phpMyAdmin), you can use the command below - it worked great for me, I created a spreadsheet and ran a whole batch of Product Codes I needed to change in one easy pass - each command on its own row:

 

UPDATE store_products SET product_code = "BLUE-17" WHERE product_id = 398;

 

(You will need to change BLUE-17 to be what you need the new Product Code to be that matches up with the corresponding Product ID # - in this example, it was 398)

 

Explanation: The command above will set the Product Code of Product ID #398 to become BLUE-17 instead of what it was before.

UPDATE store_products SET product_code = "<change to what you want>" WHERE product_id = <the matching Product ID of the Product Code that needs to change>;

(remove the <> comment characters too)

I'm sure there are many ways of getting it done, but this worked great for me and was reasonably quick to do...

 

Change three at the same time example:

UPDATE store_products SET product_code = "RED-5" WHERE product_id = 77;

UPDATE store_products SET product_code = "T-65B" WHERE product_id = 167;

UPDATE store_products SET product_code = "Wedge" WHERE product_id = 2;

 

I hope this helps, good luck!

Hello, I have a question on your query. If we have about 2270 products, we put the ID seperated by comma? Or if theese products are products of a whole category, can this work and how?Thgank you very much.