Import Error Message

[color=#282828][font=arial, verdana, tahoma, sans-serif]Help Please…I have been trying so hard to import my csv product file to no avail. The latest is that I get the following error:[/font][/color]



Error[color=#B94A48][font=arial, verdana, tahoma, sans-serif]Duplicate entry ‘245-p–pr-0’ for key ‘PRIMARY’ [/font][/color]b[/b][color=#B94A48][font=arial, verdana, tahoma, sans-serif] INSERT INTO cscart_seo_names (object_id, type, dispatch, lang_code, company_id) VALUES (245, ‘p’, ‘’, ‘product_descriptions.lang_code’, ‘.company_id’)[/font][/color]



[color=#282828][font=arial, verdana, tahoma, sans-serif]Someone should rescue me please. Thank you so much. [/font][/color]

hi, testing cs-cart 4 I have the same problem to only update my products with csv.

[color=#333333]Database (error)[/color]

Error:[color=#333333] [/color][color=#333333]Duplicate entry '1805-p–pr-0' for key 'PRIMARY' b[/b][/color]

Query:[color=#333333] [/color][color=#333333]INSERT INTO cscart_seo_names (object_id, type, dispatch, lang_code, company_id) VALUES (1805, 'p', '', 'product_descriptions.lang_code', '.company_id')[/color]



csv file with minimum columns (Product code ,product id , Language, Product name) in utf or ainsi = database (error) logs are registred in backend but product are not updated



csv file without product id column = database (error) log are not registred in backend and product are not updated





is possible to update products with cs-cart 4 using csv files ?

whats the good way to do this?



thanks you so much

Check your product codes and id are unique and not duplicated. Or leave the Prod ID field out entirely and let cs-cart add it automatically.

I had great trouble importing products as it doesn't tell you which column/field is the problem. I wish cs-cart would produce a template with a check function like amazon do. I have created an excel sheet which converts the text inputs into the correct format for import - I then copy and paste the data into notepad. Its a bit novice and could do with a 'check function' but I can send you it to try out if you like.

[quote name='sox' timestamp='1391683624' post='176942']

I had great trouble importing products as it doesn't tell you which column/field is the problem. I wish cs-cart would produce a template with a check function like amazon do.

[/quote]

This!!! I think this function exists in almost every other ecommerce software I have ever worked with. Including the poor quality free carts. I almost never use the CSV export/import due to the poor implementation of it, with no way of knowing what the offending data is. Half the time I export and import the same file without changing anything and I end up with new products.

I am also experiencing this problem. It looks like they use an INSERT statement instead of a REPLACE. It used to work in version 3… although I had tons of importing problems there as well.



So add another person to the list of people who want this to be fixed… and I'll post here if I find a solution

Hello guys,



Are you still experiencing this problem? If so, could you please let me know the list of columns which are you using for import/export and which version of CS-Cart are you using? Perhaps I could find the clue of this problem if I could reproduce it on my store…



Thank you.

I'm getting this same import error. I am only updating products, not inserting any new.



Columns importing: Product id,Product code,Product name,Category,Price,Weight,Detailed image,Description,Taxes,Features,Options,Short description,Localizations,Status,Language



Version: 4.0.3

[color=“#6e6e6e”][size=4]Thanks[/size][/color]

Dear friends!



Thank you for all your messages.



Unfortunately, this issue is caused by a bug in CS-Cart or Multi-Vendor 4.0.3. In order to fix it, please follow these steps:


  1. Replace the following part of code:


'join_type' => 'LEFT'



with this one:


'join_type' => 'LEFT',
'import_skip_db_processing' => true




in the products.post.php file located in the app/addons/seo/schemas/exim directory of your CS-Cart or Multi-Vendor installation.



2. Replace the following part of code:


if (empty($object_name)) {
$object_name = reset($product_name);




with this one:


if (!is_array($object_name)) {
$object_name = array($lang_code => $object_name);




and replace the following part of code:



return fn_create_seo_name($object_id, $object_type, $object_name, $index, $dispatch, $company_id, $lang_code);




with this one:


$result = array(); foreach ($object_name as $name_lang_code => $seo_name) { if (empty($seo_name)) { $seo_name = reset($product_name); } $result[$name_lang_code] = fn_create_seo_name($object_id, $object_type, $seo_name, $index, $dispatch, $company_id, $name_lang_code); } return $result;




in the func.php file located in the app/addons/seo directory of your CS-Cart or Multi-Vendor installation.



Please check it.



Thank you.





Anastasiya Kozlova

CS-Cart Support team