PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

Import error Prestashop 1.4!!!

40 replies to this topic
#21
axel_afp

    PrestaShop Apprentice

  • Members
  • PipPip
  • 42 posts
.... 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


#22
dmp88

    PrestaShop Newbie

  • Members
  • Pip
  • 6 posts
me pasa lo mismo y no puedo avanzar, no se de donde proviene el error, es decir, que lo crea!!ayuda urgente ya!!!!

#23
axel_afp

    PrestaShop Apprentice

  • Members
  • PipPip
  • 42 posts
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:

Attached Files

  • Attached File  php.JPG   147bytes   579 downloads


#24
bruce-rez

    PrestaShop Apprentice

  • Members
  • PipPip
  • 177 posts
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.
Bruce
PrestaShop™ 1.5.4.1
Default theme

#25
edrad80

    PrestaShop Newbie

  • Members
  • Pip
  • 4 posts
having the same issue trying to import! Were is the help from the team? Wasting lots of time here :(

#26
ben807

    PrestaShop Newbie

  • Members
  • Pip
  • 5 posts

From 1302077763:

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.

#27
dmp88

    PrestaShop Newbie

  • Members
  • Pip
  • 6 posts
axel_afp you are a crak
Thanks a lot

#28
monova

    PrestaShop Apprentice

  • Members
  • PipPip
  • 55 posts

From 1300713396:

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.
Adi Maniur

www.media-link.ro

#29
Ecom

    PrestaShop Apprentice

  • Members
  • PipPip
  • 215 posts
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.

Attached Files



#30
monova

    PrestaShop Apprentice

  • Members
  • PipPip
  • 55 posts
After you upload your file the rest will come up :) Give it a go
Adi Maniur

www.media-link.ro

#31
Ecom

    PrestaShop Apprentice

  • Members
  • PipPip
  • 215 posts
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.

#32
monova

    PrestaShop Apprentice

  • Members
  • PipPip
  • 55 posts
Glad i could help
Adi Maniur

www.media-link.ro

#33
Ecom

    PrestaShop Apprentice

  • Members
  • PipPip
  • 215 posts
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.

#34
Ecom

    PrestaShop Apprentice

  • Members
  • PipPip
  • 215 posts
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.

#35
S7 Media Ltd

    PrestaShop Apprentice

  • Members
  • PipPip
  • 111 posts
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.

#36
sergiodik

    PrestaShop Apprentice

  • Members
  • PipPip
  • 113 posts

From 1302077763:

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


#37
XJR100

    PrestaShop Newbie

  • Members
  • Pip
  • 11 posts
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!

#38
xrichardt

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts
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);


#39
flotho

    PrestaShop Apprentice

  • Members
  • PipPip
  • 34 posts
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

#40
thx2012

    PrestaShop Apprentice

  • Members
  • PipPip
  • 38 posts
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, 12 November 2012 - 07:01 PM.