While importing my products from .csv, I have noticed that (it appears) that if my product code is longer than 31 characters then it does some crazy stuff on import. It ends up putting the product on the site 10 times with 6 of them not having images. Not sure why it does this buggy behavior or if anyone else has experienced it but thought I would pass it along.
I have quite a few product codes that are over 31 characters so it appear I will need to go through and manually change them unless someone knows how to fix this???
[quote name=‘IsItFast’]While importing my products from .csv, I have noticed that (it appears) that if my product code is longer than 31 characters then it does some crazy stuff on import. It ends up putting the product on the site 10 times with 6 of them not having images. Not sure why it does this buggy behavior or if anyone else has experienced it but thought I would pass it along.
I have quite a few product codes that are over 31 characters so it appear I will need to go through and manually change them unless someone knows how to fix this???[/QUOTE]
It is caused by that the “product_code” field in the database has 32 symbols length.
You need to change it if you want to use longer code.
Is this an “easy” fix? Will it slow anything down?
I only have about 20 files I would need to rename if not. But if there is just a number I need to change in some code somewhere that would be even easier.
You’ll need to change this in your database, use PhpMyAdmin if you can. The field you need to change is ‘product_code’, there are three tables you need to edit:
- Table ‘order_details’
- Table ‘products’
- Table ‘product_options_inventory’
The dafault value is VarChar 32, change the 32 to what ever you need.
I went ahead and shortened all my “product code” to be under 32 characters in my csv file but CS doesn’t seem to be updating the data. When uploading I checked the box that says “delete all existing products before import”. I have re-uploaded the file twice just to make sure I didn’t skip it the first time and it is still loading the data from what appears to be the old csv file.
Suggestions?
You can’t change it like that because product code is a requirement for importing/exporting. Are you sure it did not create new items with the edited csv?
I guess I should have stated that the new shortened product-code products were imported but it didn’t get rid of the duplicates.
So I guess I need to go through and manually delete all the duplicate “messed up” products within the backend of CS?
Yep…