Jump to content

Csv Import - Unable Assign Product To Category


oorbx

Recommended Posts

Hi gentlemen,

 

I already read some topics regarding problems with CSV import, but no solution.

 

I am using prestashop 1.5.3.1

 

First i import categories.csv (it cames without any problems and it input categories properly)

 

Now i want to import products but still no way how to assign to category.

 

 

My family tree is

 

MAIN CATEGORY

SUB CATEGORY

SUB SUB CATEGORY

 

I try to wrote to csv as main category,subcategory,subsubcategory but still all products assign to HOME. i dont understand, no error during import (only friendly url rewrote)

 

i tried :

main category,sub category,sub sub category

main category, sub category, sub sub category

main-category, sub-category, sub-sub-category

 

but anyhow it assign only to HOME.

 

 

Second, how to import images ?

 

i insert urls as:

 

http://mydomain.com/img/picture-name/1.jpg, http://mydomain.com/img/picture-name/2.jpg, http://mydomain.com/img/picture-name/3.jpg

 

(in browser i can open this image correctly, but prestashop didnt import anything)

 

 

Can anybody help me and take me advice ?

 

Many thanks

Edited by oorbx (see edit history)
Link to comment
Share on other sites

Finally after 8 hours i find solution !

 

For anybody who have problem with CSV import -

 

products not assign to category &

 

Product n°x: the picture cannot be saved

 

Here is solution:

 

Based on my using of prestashop 1.5.3.1

 

First download this file and upload to your FTP to exact directory:

 

https://github.com/P...1b65e94a4c1e59c

 

(controllers/admin/AdminImportController.php)

 

Second, be sure your PHP.ini is configured for :

 

safe_mode - off

allow_url_fopen - on

 

Third

 

Your folder atribute of images have to be 755 or maybe 777 is ok, my is 755

 

Fourth

 

Into your products.csv to categories (x,y,z...) you can wrote

 

Main category, Sub category, Sub sub category

 

or ID of categories which you want

 

3,5,7

 

(Doesnt matter about spacing after or before comma)

 

AFTER THAT YOU SUCCESFULLY ASSIGN YOUR PRODUCTS TO CATEGORIES WITHOUT ANY ERROR

 

For images, check column IMG URL and type like this:

 

http://www.yourdomain.com/img/picture-folder/1.jpg

 

and after that wrote comma a u can or cannot make free space and again FULL PATH!

 

Other paths are not working for me. / Only full path with HTTP://WWW!!!

 

Path accepts also MINUS "-" then dont worry

 

:-)

Edited by oorbx (see edit history)
  • Like 3
Link to comment
Share on other sites

  • 3 weeks later...

Finally after 8 hours i find solution !

 

For anybody who have problem with CSV import -

 

products not assign to category &

 

Product n°x: the picture cannot be saved

 

Here is solution:

 

Based on my using of prestashop 1.5.3.1

 

First download this file and upload to your FTP to exact directory:

 

https://github.com/P...1b65e94a4c1e59c

 

(controllers/admin/AdminImportController.php)

 

Second, be sure your PHP.ini is configured for :

 

safe_mode - off

allow_url_fopen - on

 

Third

 

Your folder atribute of images have to be 755 or maybe 777 is ok, my is 755

 

Fourth

 

Into your products.csv to categories (x,y,z...) you can wrote

 

Main category, Sub category, Sub sub category

 

or ID of categories which you want

 

3,5,7

 

(Doesnt matter about spacing after or before comma)

 

AFTER THAT YOU SUCCESFULLY ASSIGN YOUR PRODUCTS TO CATEGORIES WITHOUT ANY ERROR

 

For images, check column IMG URL and type like this:

 

http://www.yourdomain.com/img/picture-folder/1.jpg

 

and after that wrote comma a u can or cannot make free space and again FULL PATH!

 

Other paths are not working for me. / Only full path with HTTP://WWW!

 

Path accepts also MINUS "-" then dont worry

 

:-)

 

got it resolved

Edited by cutecat (see edit history)
Link to comment
Share on other sites

it doesn't work again..... i tried to input in everything that you have stated, i am still getting Product n°1: the picture cannot be saved: error plus when i try to upload the CSV, it gave me a blank page. I have revert back to normal.

 

can anyone help?

Link to comment
Share on other sites

Still can't associate products to categories. I tried all of these with:

"Home, Root Category, Sub Category"

"Root Category, Sub Category"

"Root Category"

"Home, Root Category"

 

All products are ALWAYS associated to Home Page ONLY after import.

 

I even tried to import the CSV examples available on PrestaShop Admin, the ones with iPods and Laptops: i imported categories first (deleting all existing categories) and then all products. All of them were associated to Homepage.

 

Any ideas?

Thank you very much,

TZ

Edited by tobia.zanarella (see edit history)
Link to comment
Share on other sites

  • 4 months later...

Product n°x: the picture cannot be saved

 

Here is how i solved the problem

 

after 10 hours of finding what was the reason that stopped working CSV import of pictures

 

and tried a different server setup, read all forum threads on this issue

 

the solution was very simple

 

to completely clear the sql table "ps_image" and "ps_image_lang"

 

and it's magic! work again!

Link to comment
Share on other sites

i still do not get it on how to place the img url when i am importing category.csv

 

here is my product.csv

591 1 Dress Dresses, New Arrivals 19 XXXX YYY 0.21 10 Material: 1 1 1 new

 

How do i place the img link in category.csv? I have placed the same url in my product.csv, but I am unable to have the image tie in to the category

 

this would be the img link for product csv

 

http://test.com/img/clothes/Dresses/test.jpg, http://test.com/img/clothes/Dresses/test-1.jpg

Edited by cutecat (see edit history)
Link to comment
Share on other sites

Hi cutecat, please make sure that the links provided do not lead to inappropriate or offensive content. This post was reported by other members. I removed the links in post #7

 

noted. but the link is a dummy link.

 

I have change the link to another dummy link :)

Link to comment
Share on other sites

  • 1 year later...

This is old post but seems relevant to me.

 

PS Version: 1.6.0.11

I have to import around 1000 products. I have created all the categories with CSV import successfully and currently my category tree looks like below;

 

Home

-Category X

--SubCategory A

---SubSubCategory P

---SubSubCategory Q

--SubCategory B

--SubCategory C

-Category Y

--Subcategory L

--SubCategory M

-Category Z

--SubCategory N

--SubCategory O

 

Now when i add Category X,SubCategory A,SubSubCategory P in category column of CSV of particular product, and after importing the CSV, apart from the categories mentioned in category column in CSV, the products get also assigned to Home category automatically.

 

Can anyone please tell me how to assign products only to category, SC and SSC and not to home category.

Link to comment
Share on other sites

  • 1 year later...

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
×
×
  • Create New...