Jump to content

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

Convert Product Code To Product Id Rate Topic   - - - - -

 
  • HareRama
  • Advanced Member
  • Trial users
  • Join Date: 10-Mar 19
  • 70 posts

Posted 29 August 2019 - 10:17 AM #1

Some addon's I have base on Product ID, however my CSV file has only Product Code. Is it any function which will be "translated" Product Code to ID?



 
  • HareRama
  • Advanced Member
  • Trial users
  • Join Date: 10-Mar 19
  • 70 posts

Posted 29 August 2019 - 11:16 AM #2

Eventually is there any way to add new fields to product? Then I can import products and export with updated ID and field which I need for other import?



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

Posted 29 August 2019 - 01:45 PM #3

In the phpmyadmin run

UPDATE cscart_products SET product_code = product_id;

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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • HareRama
  • Advanced Member
  • Trial users
  • Join Date: 10-Mar 19
  • 70 posts

Posted 29 August 2019 - 03:45 PM #4

What if product code is numbers and letters?



 
  • HareRama
  • Advanced Member
  • Trial users
  • Join Date: 10-Mar 19
  • 70 posts

Posted 29 August 2019 - 03:49 PM #5

In CSV I have only product Code, I can't use ID instead.



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

Posted 30 August 2019 - 07:18 AM #6

In CSV I have only product Code, I can't use ID instead.

 

Right, product code is used as main key. Try to leave product id column and make all values in the product code column empty. Not tested, make backup


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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.