kimutaku Posted March 22, 2011 Share Posted March 22, 2011 Hi guys! I've tried importing products through CSV files and used the product's barcode number as the ID. The barcode's length is 12 digits but the length specified in the product field (phpmyadmin) is only 10 and as a result, I was not able to import successfully. I've tested importing with only 10 digits and below in the ID and it successfully entered. So I really thought that it has something to do with the length of product ID specified in the phpmyadmin and changed the length to 12. But then again, it's showing an error. My question is, if it's possible to change the product ID's length to more than 10? If yes, what specific fields/tables/files should I modify? Please enlighten me on this one. Thanks! Link to comment Share on other sites More sharing options...
Burhan BVK Posted March 22, 2011 Share Posted March 22, 2011 Product id is of type "int", an int can not have more than 10 digits. You need to change the type to bigint for larger numbers. Link to comment Share on other sites More sharing options...
nadrisen Posted March 22, 2011 Share Posted March 22, 2011 Hi kimutaku,Id_Product is product's primary key used everywhere in the DB. It' an internal purpose field. Therefore my advice is : DO NOT TO ALTER DB layout. It may provide database inconcistencies you won't be able to manage.You may use "Reference" (32 character long) or "EAN13" as barcode field.Hope this help.Cheers Link to comment Share on other sites More sharing options...
kimutaku Posted March 22, 2011 Author Share Posted March 22, 2011 Product id is of type "int", an int can not have more than 10 digits. You need to change the type to bigint for larger numbers. Hmm I see, thanks for that! So do I just have to change the type only in the ps_product table? Or are there other tables I should modify?@nadrisenThank you. I'll keep that in mind. But as of now, I really need the 12-digit barcode as my product ID. Link to comment Share on other sites More sharing options...
kimutaku Posted March 23, 2011 Author Share Posted March 23, 2011 Bump! So I've tried altering it to bigint but it is still showing the error. Is is possible to just ignore the ID field in CSV importation? Will it successfully upload even if I don't include the ID field? I have a system that has a record of products together with the barcode number but since it does not accept the 12-digit barcode as the ID, maybe I should just ignore the ID field because it is such a hassle to assign IDs manually to the products data that came from the system. Is this possible? Thanks in advance! Link to comment Share on other sites More sharing options...
kimutaku Posted March 23, 2011 Author Share Posted March 23, 2011 Update: So I just looked at the phpmyadmin and it shows that the products that have the 12-digit barcode were successfully saved in my database. But they're not showing in my catalog list in the back office and in the customer site. I don't really have an idea what's the problem here. Link to comment Share on other sites More sharing options...
Recommended Posts