Jump to content

Problem with CSV file import


fenmar

Recommended Posts

Hello 

I have got some problem with importing file... Well I donno how to do it exactly... 

Well do I have to have categories already made if I have got csv file like this:

10.png

 

 

this:

11.png

 

12.png

 

How should I create categories? in what format? how? how?

 

well dont know please help

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

The best u can do is to create a structure of categories like this:

category1

- sub1_category1

- - sub_sub1_category1

- - sub_sub1_category2

- - - sub_sub1_sub2_category1

- sub_category2

- sub_category3

 

And with that u will short your categories names.

 

Try that and say to me something.

 

 

 

 

 

U have another choice but I do not recommend to make that change for visual effect in the front office and may cause some problems in the database in a medium/long time of the live of the shop.....

 

The error is that the name off each group of the name of the category is to long must be between 0 and 64 if u what to jump that u need to go to the database and change the structure of the column "name" in the table "xxxxxx_category_lang" to about 200 because i see errors with 155 chars.

  • Like 1
Link to comment
Share on other sites

ok got it changed it to 200 but it still is the same:

4.png

 

5.png

 

but it's late and I don't know what do you mean by

" to create a structure of categories like this:

category1

- sub1_category1

- - sub_sub1_category1

- - sub_sub1_category2

- - - sub_sub1_sub2_category1

- sub_category2

- sub_category3"

 

In the csv file? in prestashop? mabey over here:

 

2.png

 

RubenMartins! It is war and we are going to win this battle! thanks for helping me bro!

 

 

Edit: Ok I'm going to make it! I didn't know that I need to edit those polls in prestashop importing editor (:P) over the "WORDS" to fit to those "WORDS" now it is everything cool. I need to do it right... I have got a lot of work that's why I didn't realize this obvois thing. :P  You helped me a lot! Thank you!

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

for the erro on line 2: "Property Category->name length(115) must be between 0 and 64"

It was my mistake. U need also to go to the file located in "folder_of_your_site/classes/Category.php" and for about the 110 line is something like this:

" 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64), "

Change it the "64" to the number u input in the database name structure size.

 

 

for the error on line 6: "Property Category->name not valid"

Change the chars encode of the file.csv to utf-8 or try to select the option ISO-8859-1 before import.

This will correct the "?" streng chars u are seeing when import.

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

hi Fenmar,

2 things:

 

1) product.csv - when you specify categories into csv you tell to pshop in which category associate item - here, you can't specify the categories structures

 

2) categories.csv - here you can define the categories structure.

 

so, best practices is create categories structure, then import items

 

hope helps...

 

:rolleyes:

Link to comment
Share on other sites

  • 2 weeks later...

Hi there! I hope you have resolved category structure issue by now since it's been some time. But in case you haven't and are in need of a solution, I'm with a webdev group testing out our new csv import addon we've created for PrestaShop versions 1.5.x and up. Our tool allows you to import your products AND specify the parent to sub category structure (including delimiters) in one feed. You won't need to run your feed in two imports just to import the products with a category structure (kind of defeats the purpose of automation, eh?).

 

We are looking for beta testers right now, and will provide a significant discount to people willing to give us some valuable feedback on how we can improve our tool. Our demo for the store is available here: http://demo.hostjars.com/prestashop/admin8472/index.php?controller=AdminModules&token=014eb212d10f8ab63969afdd963745f0&configure=csvimportpro&tab_module=others&module_name=csvimportpro (user/pw: [email protected]/demodemo). Feel free to upload your feed there any time to test it out.

 

In a nutshell, this is how you can import the parent to sub categories with this tool: http://hostjars.zendesk.com/entries/21816598-How-do-I-import-categories-. And here are some articles to help you with the import: http://hostjars.zendesk.com/forums/22581147-CSV-Import-PRO. Feel free to direct message us here if you have any questions or are interested in testing it out. 

Edited by hostjars (see edit history)
Link to comment
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
×
×
  • Create New...