Jump to content
  • 0
axel_afp

Import error Prestashop 1.4!!!

Question

I cant import products to my store ...

APC PDU Rack , Swit (ID 2) Cannot be saved
Data truncated for column 'condition' at row 1
APC Acu pent (ID 3) Cannot be saved
Data truncated for column 'condition' at row 1


id_tax_rules_group (ID ) Invalid tax rule group ID, you first need a group with this ID.
Rewrite link for Array (ID 2)
Rewrite link for Array (ID 3)


...some help? THX.

Share this post


Link to post
Share on other sites

40 answers to this question

Recommended Posts

  • 0

C'mon , how can i set "condition" row if this is not listed on import products fields? Or why is data truncated? If i import categories>subcategories is working fine but with products bleah...i cant import anything. I am still waiting for some help!

Share this post


Link to post
Share on other sites
  • 0

i dont understand why to do this "Product code I ; I product description I ; I Product Price"(cuz is not working). On ps 1.3 this is working just fine but on ps 1.4 .0 .17 is not and is reported as bug also, so is not just me with this issue.....

Share this post


Link to post
Share on other sites
  • 0

1076 errors

AUQ7.35.0014 Cannot be saved
Data truncated for column 'condition' at row 1
AUQ7.35.0016 Cannot be saved
Data truncated for column 'condition' at row 1
AUQ7.43.0018 Cannot be saved
Data truncated for column 'condition' at row 1
AUQ7.43.0020 Cannot be saved
Data truncated for column 'condition' at row 1
AUQ7.43.0022 Cannot be saved
Data truncated for column 'condition' at row 1
AUQ7.35.0003 Cannot be saved
... etc

There are 1076 warnings

id_tax_rules_group (ID 0) Invalid tax rule group ID, you first need a group with this ID.
Rewrite link for Array a fost rescris ca auq7350014
id_tax_rules_group (ID 0) Invalid tax rule group ID, you first need a group with this ID.
Rewrite link for Array a fost rescris ca auq7350016
id_tax_rules_group (ID 0) Invalid tax rule group ID, you first need a group with this ID.
Rewrite link for Array a fost rescris ca auq7430018
id_tax_rules_group (ID 0) Invalid tax rule group ID, you first need a group with this ID.
Rewrite link for Array a fost rescris ca auq7430020

...etc .....


anyway thx for your help and any other suggestion are more than welcome....

Share this post


Link to post
Share on other sites
  • 0

It seems it is a bug, I have the same problem on version 1.4.0.17 but on the beta version or 1.3 versions works fine.

Example for every import:
# id_tax_rules_group (ID 0) Invalid tax rule group ID, you first need a group with this ID.
# Rewrite link for Array (ID ID) was re-written as test

Share this post


Link to post
Share on other sites
  • 0

.... and now i get this with latest prestashop 1.4.1.0 svn

Notice: Undefined index: Line in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1765

Warning: Function getIndexedCategories() is deprecated in X:\XXX\XXX\XXX\wwwroot\admin123\tabs\AdminImport.php on line
in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1765

Notice: Undefined index: Line in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1767

Warning: copy(2) [function.copy]: failed to open stream: No such file or directory in X:\XXX\XXX\XXX\wwwroot\admin123\tabs\AdminImport.php on line 442

Notice: Undefined index: Line in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1765

Warning: Function getIndexedCategories() is deprecated in X:\XXX\XXX\XXX\wwwroot\admin123\tabs\AdminImport.php on line
in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1765

Notice: Undefined index: Line inX:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1767

Notice: Undefined index: Line in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1765

Warning: Function getIndexedCategories() is deprecated in X:\XXX\XXX\XXX\wwwroot\admin123\tabs\AdminImport.php on line
in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1765

Notice: Undefined index: Line in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1767
X14 errors

   APC Acumulator pent (ID 3) Cannot be saved
   Data truncated for column 'condition' at row 1
   APC Acumulator pent (ID 4) Cannot be saved
   Data truncated for column 'condition' at row 1
   APC Extensie garant (ID 5) Cannot be saved
   Data truncated for column 'condition' at row 1
   Suport perete LCD/P (ID 8) Cannot be saved
   Data truncated for column 'condition' at row 1
   Suport perete Micro (ID 9) Cannot be saved
   Data truncated for column 'condition' at row 1
   Suport perete TV 17 (ID 10) Cannot be saved
   Data truncated for column 'condition' at row 1
   Suport perete TV 21 (ID 11) Cannot be saved
   Data truncated for column 'condition' at row 1

XThere are 8 warnings Hide warning

   Error copying image: 2
   Rewrite link for Array (ID 3) was re-written as apc-acumulator-pent
   Rewrite link for Array (ID 4) was re-written as apc-acumulator-pent
   Rewrite link for Array (ID 5) was re-written as apc-extensie-garant
   Rewrite link for Array (ID 8) was re-written as suport-perete-lcdp
   Rewrite link for Array (ID 9) was re-written as suport-perete-micro
   Rewrite link for Array (ID 10) was re-written as suport-perete-tv-17
   Rewrite link for Array (ID 11) was re-written as suport-perete-tv-21

Share this post


Link to post
Share on other sites
  • 0

There is no help on this forum...as u can see from 900 views only 1 (ONE) guy try to help me....no presta team, no one....!!! For this problem you have to go to your database "ps_product" and change "Condition" row in your database to something like that:

42225_KxNjF69iIOc3bNQb3YG7_t

Share this post


Link to post
Share on other sites
  • 0

I have the same problem and have already posted a new topic in the forum.
I tried many times to import my csv file with 459 products in PrestaShop™ 1.4.0.17 without success and I get 918 error messages.
I’ve already imported exactly the same csv file successfully in PrestaShop™ 1.4.0.9.
Is there any change or modification of csv Import in the PrestaShop™ 1.4.0.17 that I ignore?
Thank you for any help.

Share this post


Link to post
Share on other sites
  • 0
For this problem you have to go to your database "ps_product" and change "Condition" row in your database to something like that:
1

Thanks a lot, it's working.

+advice: import up to 100 products in one csv
i also have warnings, but products where imported.

Share this post


Link to post
Share on other sites
  • 0
It seems it is a bug, I have the same problem on version 1.4.0.17 but on the beta version or 1.3 versions works fine.

Example for every import:
# id_tax_rules_group (ID 0) Invalid tax rule group ID, you first need a group with this ID.
# Rewrite link for Array (ID ID) was re-written as test


This is not a bug, for the first warning, go to Payment > Taxes, and see what ID you have listed and in your csv simply type 1 or 2 or whatever ID you want from that Taxes list.

For the second warning, in your csv you probably do not have the field URL REWRITING, check that out, but still it will gonna work, presta will generate the url, even if it tells you that warning. Even in your warning it tells you that it was re-written to TEST.

Share this post


Link to post
Share on other sites
  • 0

Hi,
in my 1.4.0.17 version I have only this zone in import section. (upload)
Do you how it 's possible to have the rest?
Thank you.

42842_BZzTaUo4wnvMQHTBzEGI_t

Share this post


Link to post
Share on other sites
  • 0

Thank you monova,

I think, it's not logical, to have after upload information about the upload. (format file, fields etc...). Befor this was present, It's better.
have a nice day.

Share this post


Link to post
Share on other sites
  • 0

Hi,

Did you have this message some time. For test I imported only one line, and I got this error.

1. Filtre piscine a sable (ID ) ne peux être enregistré
2. Product->description : longueur > 400 pour la langue 2

Where we can define langage in the import product file?

Thank you for your help.

Share this post


Link to post
Share on other sites
  • 0

Hi,
I found the solution, go in 2 files:
Admin/Tabs/AdminProducts.php
Classes/Product.php
and replace 400 by the number of caracteres you need.
Thank you.

Share this post


Link to post
Share on other sites
  • 0

For anyone else having the TAX ID error, it may be because of your first row in the CSV file. My first row contains a name for each column, so for example, ID, Tax rate, Description etc.

When you import and get to the Import CSV screen, there's a box that says skip line. Type in 1, to skip the first row. That will skip the first row which contains the column names.

It's a silly mistake but easy to make. I was racking my brains for an hour trying to figure out why it wouldn't import.

Share this post


Link to post
Share on other sites
  • 0
There is no help on this forum...as u can see from 900 views only 1 (ONE) guy try to help me....no presta team, no one....!!! For this problem you have to go to your database "ps_product" and change "Condition" row in your database to something like that:



Error
consulta SQL:

ALTER TABLE  `ps_product` CHANGE  `condition`  `condition` ENUM( VARCHAR( 10 ) ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT  'NULL'

MySQL ha dicho: 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'varchar(10)) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'NULL'' at line 1 

Share this post


Link to post
Share on other sites
  • 0

Looks like it is the bug.
I also tried to import CSV into new stable 1.4.2.5 and got error messages:
-----------------------------------------
2 errors

1.description Cannot be saved
2.Data truncated for column 'condition' at row 1
-----------------------------------------

CSV file is very simple: just for test purpuses, after I was not able to import my 5000 products.

here is CSV content:
-------------------------
brand|product_num|part_number|description|part_description|msrp_retail|upc|weight|product_family
-------------------------

I've looked into AdminImport.php nothing for "condition" which set in database as enum. I think there must be fix for AdminImport.php. If someone already done this, please share the info.

Thanks!

Share this post


Link to post
Share on other sites
  • 0

There are two solutions for Data truncated for column 'condition' at row ... error.

(using Prestashop 1.4.2.5)

 

 

First, what is the cause of the error: product condition cannot be imported, yet, the import procedure effectively passes an empty string as condition which causes an error in MySQL where condition column of ps_product table is of enum('new','used','refurbished') type (and even if NULL value for the column is enabled, it still causes the same error, because empty string does not equal to NULL in MySQL)

 

 

Solution #1 (as suggested above): allow empty string for condition column i.e. change the type to: enum('new','used','refurbished','')

 

-> this solution seem to work, but is not ideal, because an empty condition state is not consistent with Prestashop – this can cause problems elsewhere ...

 

 

Solution #2: set default value for condition column in import method by adding line 'condition' => 'new' anywhere to self::$default_values method in AdminImport.php (around line 178) like this:

 

self::$default_values = array(
'id_category' => array(1),
'id_category_default' => 1,
'active' => '1',
'quantity' => 0,
'price' => 0,
'id_tax_rules_group' => 0,
'description_short' => array((int)(Configuration::get('PS_LANG_DEFAULT')) => ''),
'link_rewrite' => array((int)(Configuration::get('PS_LANG_DEFAULT')) => ''),
'condition' => 'new',
'online_only' => 0);

Share this post


Link to post
Share on other sites
  • 0

what is amazing for me is that with absolutely the same file, I made a test on linux and on windows with exactly the same database version/PS version and on linux I can import, on windows I can't.

 

In the AdminImport.php file, the default value is correctly set to new.

 

In attached, the file used for which I ignire the ID, the UPC and the state at the end.

 

regards

Share this post


Link to post
Share on other sites
  • 0

The image that axel_afp provides does not display.

Can you please tell me what you added/adjusted or re-post the image?

 

I've been trying to resolve this issue for a very long time and both versions 1.4.4.1 & 1.4.9.0 produce the same bug!

 

My bad, I just read xrichardt post.. I'll try and see if that resolves my issue and post update.

 

Thank you

Edited by thx2012

Share this post


Link to post
Share on other sites
  • 0

In both version 1.4.4.1 & 1.4.9.0 this error is still present. I attempted xrichardt suggestion, however in both versions, this has been addressed; so the above does not help my situation.

Version 1.5.2.0 works, however all my custom modules & them stop working.

Here is post: Error: Column function that depicts what i'm experiencing, however NO help has been provided :(

Edited by thx2012

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×