Jump to content

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

Import Error Message Rate Topic   - - - - -

 

Posted 15 January 2014 - 07:21 PM #1

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:

ErrorDuplicate entry '245-p--pr-0' for key 'PRIMARY' (1062) INSERT INTO cscart_seo_names (`object_id`, `type`, `dispatch`, `lang_code`, `company_id`) VALUES (245, 'p', '', 'product_descriptions.lang_code', '.company_id')

Someone should rescue me please. Thank you so much.

 
  • insertcoin
  • Newbie
  • Members
  • Join Date: 22-Dec 11
  • 2 posts

Posted 22 January 2014 - 12:12 PM #2

hi, testing cs-cart 4 I have the same problem to only update my products with csv.
Database (error)
Error: Duplicate entry '1805-p--pr-0' for key 'PRIMARY' <b>(1062)</b>
Query: INSERT INTO cscart_seo_names (`object_id`, `type`, `dispatch`, `lang_code`, `company_id`) VALUES (1805, 'p', '', 'product_descriptions.lang_code', '.company_id')

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

 
  • sox
  • Member
  • Members
  • Join Date: 27-Sep 13
  • 27 posts

Posted 06 February 2014 - 10:47 AM #3

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.

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 06 February 2014 - 09:47 PM #4

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.

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.
Hire StellarBytes for CS-Cart Design & Development Services

 
  • yoyoman
  • Junior Member
  • Members
  • Join Date: 09-Nov 10
  • 16 posts

Posted 27 February 2014 - 05:30 PM #5

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

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

Posted 04 March 2014 - 12:49 PM #6

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

 
  • Guest_Nick_*
  • Guests

Posted 09 March 2014 - 02:15 PM #7

Did any one solve this? i get ErrorDuplicate entry '1-p--pr-0' for key 'PRIMARY' (1062) INSERT INTO cscart_seo_names (`object_id`, `type`, `dispatch`, `lang_code`, `company_id`) VALUES (1, 'p', '', 'product_descriptions.lang_code', '.company_id')

 
  • elogic
  • Member
  • Members
  • Join Date: 22-Nov 10
  • 73 posts

Posted 27 May 2014 - 09:28 PM #8

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
Thanks

 
  • CS-Cart team
  • CS-Cart support team
  • Moderators
  • Join Date: 04-Apr 11
  • 3810 posts

Posted 09 June 2014 - 11:20 AM #9

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

Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation