Jump to content

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

Change Product Codes Rate Topic   - - - - -

 
  • YFinder
  • Advanced Member
  • Members
  • Join Date: 12-Nov 14
  • 72 posts

Posted 23 July 2016 - 03:54 PM #1

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?



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

Posted 23 July 2016 - 04:29 PM #2

possibly this

 

http://marketplace.c...cart.html?sl=en


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


 
  • YFinder
  • Advanced Member
  • Members
  • Join Date: 12-Nov 14
  • 72 posts

Posted 23 July 2016 - 08:22 PM #3

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



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

Posted 23 July 2016 - 10:29 PM #4

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).


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.


 
  • YFinder
  • Advanced Member
  • Members
  • Join Date: 12-Nov 14
  • 72 posts

Posted 26 July 2016 - 05:15 PM #5

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.



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

Posted 26 July 2016 - 06:55 PM #6

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.


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.


 
  • happyhare
  • Advanced Member
  • Members
  • Join Date: 11-Jun 14
  • 56 posts

Posted 13 November 2016 - 11:08 PM #7

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

  •  


 
  • YFinder
  • Advanced Member
  • Members
  • Join Date: 12-Nov 14
  • 72 posts

Posted 14 November 2016 - 04:52 AM #8

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. 



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

Posted 14 November 2016 - 07:49 AM #9

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


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)

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

Posted 14 November 2016 - 06:12 PM #10

We too can implement this for you....


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.


 
  • happyhare
  • Advanced Member
  • Members
  • Join Date: 11-Jun 14
  • 56 posts

Posted 26 November 2016 - 09:23 PM #11

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