Vote to Improve PrestaShop

PrestaShop Forum: Build a free online shop. Count on the Community!

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

PrestaShop Forum: Build a free online shop. Count on the Community!

Jump to content

Photo

Import error Prestashop 1.4!!!


  • Please log in to reply
40 replies to this topic
axel_afp

    PrestaShop Apprentice

  • Members
  • PipPip
  • 42 posts

Posted 02 April 2011 - 03:04 PM

.... 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 1765Warning: Function getIndexedCategories() is deprecated in X:\XXX\XXX\XXX\wwwroot\admin123\tabs\AdminImport.php on linein X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1765Notice: Undefined index: Line in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1767Warning: 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 442Notice: Undefined index: Line in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1765Warning: Function getIndexedCategories() is deprecated in X:\XXX\XXX\XXX\wwwroot\admin123\tabs\AdminImport.php on linein X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1765Notice: Undefined index: Line inX:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1767Notice: Undefined index: Line in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1765Warning: Function getIndexedCategories() is deprecated in X:\XXX\XXX\XXX\wwwroot\admin123\tabs\AdminImport.php on linein X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1765Notice: Undefined index: Line in X:\XXX\XXX\XXX\wwwroot\classes\Tools.php on line 1767X14 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 1XThere 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


dmp88

    PrestaShop Newbie

  • Members
  • Pip
  • 6 posts

Posted 05 April 2011 - 08:46 AM

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

axel_afp

    PrestaShop Apprentice

  • Members
  • PipPip
  • 42 posts

Posted 06 April 2011 - 09:16 AM

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


bruce-rez

    PrestaShop Apprentice

  • Members
  • PipPip
  • 361 posts

Posted 06 April 2011 - 04:06 PM

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

edrad80

    PrestaShop Newbie

  • Members
  • Pip
  • 4 posts

Posted 07 April 2011 - 02:03 PM

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

ben807

    PrestaShop Newbie

  • Members
  • Pip
  • 5 posts

Posted 09 April 2011 - 07:22 PM

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.

dmp88

    PrestaShop Newbie

  • Members
  • Pip
  • 6 posts

Posted 11 April 2011 - 05:24 PM

axel_afp you are a crak
Thanks a lot

monova

    PrestaShop Apprentice

  • Members
  • PipPip
  • 78 posts

Posted 12 April 2011 - 07:39 AM

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

Ecom

    PrestaShop Apprentice

  • Members
  • PipPip
  • 231 posts

Posted 13 April 2011 - 04:50 PM

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



monova

    PrestaShop Apprentice

  • Members
  • PipPip
  • 78 posts

Posted 13 April 2011 - 06:29 PM

After you upload your file the rest will come up :) Give it a go
Adi Maniur

www.media-link.ro

Ecom

    PrestaShop Apprentice

  • Members
  • PipPip
  • 231 posts

Posted 14 April 2011 - 06:15 AM

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.

monova

    PrestaShop Apprentice

  • Members
  • PipPip
  • 78 posts

Posted 14 April 2011 - 06:18 AM

Glad i could help
Adi Maniur

www.media-link.ro

Ecom

    PrestaShop Apprentice

  • Members
  • PipPip
  • 231 posts

Posted 27 April 2011 - 04:45 PM

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.

Ecom

    PrestaShop Apprentice

  • Members
  • PipPip
  • 231 posts

Posted 29 April 2011 - 05:44 AM

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.

S7 Media Ltd

    PrestaShop Apprentice

  • Members
  • PipPip
  • 152 posts

Posted 17 May 2011 - 09:32 AM

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.

sergiodik

    PrestaShop Apprentice

  • Members
  • PipPip
  • 113 posts

Posted 28 May 2011 - 02:28 PM

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:




Errorconsulta 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


XJR100

    PrestaShop Apprentice

  • Members
  • PipPip
  • 49 posts

Posted 10 June 2011 - 05:38 AM

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!

xrichardt

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts

Posted 20 August 2011 - 06:13 PM

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


Mind And Go

    PrestaShop Apprentice

  • Members
  • PipPip
  • 58 posts

Posted 26 April 2012 - 10:14 AM

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

thx2012

    PrestaShop Apprentice

  • Members
  • PipPip
  • 96 posts

Posted 12 November 2012 - 06:09 PM

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.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users