Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Export & import categories
 
F. P.
Member
 
Total Posts:  55
Joined:  2007-12-09
 

@Michael
Hi Michael,

could You please post it. Your script is working fine, but actually there is no chance to create those categories. It is no problem with given categories, but if the categories do not already exist, there is no way. Well, it is possible, thanks to Santosh, to import categories but only via admin import (Magento Dataflow or better to be called DataSlow).

Thank You for trying to help

F. P.

 
Magento Community Magento Community
Magento Community
Magento Community
 
michael_g08
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2009-03-06
Ukraine
 

Here You are smile

File Attachments
Category_direct.php  (File Size: 11KB - Downloads: 1161)
 
Magento Community Magento Community
Magento Community
Magento Community
 
F. P.
Member
 
Total Posts:  55
Joined:  2007-12-09
 

@Michael,

thank You for posting that script. I have an additional question with that script. Why is it necessary to use two databases? Isn’t it possible to use the temp table from the other script for the products, where all those necessary infos are already inside? The additional table from the other script (you named it stek_products) already contains the necessary infos (category1,category2, category3). It lacks only the category id’s which is somehow logical, because those ids should come from the original magento tables. So Magento needs first to create categories and than read those products into the categories. What I do not understand is that for the one script a temp table inside the database is sufficient and for the categories script there should be a second database?
Example: There is a product lets say Laserjet XL. In the stek_table the csv import has put all the information: product, name, price, weight, quantity a.s.o.. There are also those category names. Example: The Laserjet XL should go to category1 (Printers and Scanners), category2 (Printers), category3(Laser-Printer). Those informations are already in that stek_products (by csv import).
Why is it necessary to have a complete temp database just for the categories, while inside the temp table all the necessary informations to create those categories are already given?

F.P.

 
Magento Community Magento Community
Magento Community
Magento Community
 
michael_g08
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2009-03-06
Ukraine
 

@F.P.
It’s not necessary to use 2 DB. I don’t remember why I used that. You may use one magento DB.
2. About category columns:
- Category1 - 1st level categories
- Category2 and Category3 - 2nd and 3rd level categories.
Only names.
So it looks like that:
Category1 | Category2 | Category3
Name1 Name11 Name111
Name1 Name11 Name112
Name1 Name12 Name113

 
Magento Community Magento Community
Magento Community
Magento Community
 
F. P.
Member
 
Total Posts:  55
Joined:  2007-12-09
 

@ Michael
So because I actually use oscommerce and only evaluate magento the problem is not imminent. I will try to find out possibilities to make one script from the two scripts by the following way:
Magento needs to first read the categories. Then it should be possible to insert the products into that newly created categories. And with a little bit of brainwork it should be possible to tell magento something like:
If the necessary categories are available, then put those new products in those categories. And if not, first create all lacking categories and put those products, which belong to those categories , into the newly created ones.

Michael, thank You very much.

 
Magento Community Magento Community
Magento Community
Magento Community
 
8181
Jr. Member
 
Total Posts:  25
Joined:  2008-10-26
 

I got the import working, but the next step is to know what all the category ids are so can add them into the product import file by hand. How do I got about exporting the categories with the category ids?

 
Magento Community Magento Community
Magento Community
Magento Community
 
John Carlson
Jr. Member
 
Total Posts:  3
Joined:  2009-07-22
 

Hey guys,

John Here! they guy with the import/export custom options, tier prices, grouped products (associated products)..

I’m currently working on a category import/export module based somewhat on the code from this post and from my own experience with the other module.

I’ve got the export to work just fine.. accept that it doesn’t give me the store ID and I don’t have it exporting the image file path/names yet.
The import works with hierarchy using faux_id’s for initial import of categories, but doesn’t import image files for the category.

I’m looking for 2 people with sites that have many categories to test it.

email me: johncarlson21@gmail.com to give me your info, and I will send you the files and an example import file.

John

Image Attachments
import_cats.pngexport_cats.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1093
Joined:  2008-07-16
London, United Kingdom
 

hey john,

ive got a dev site with about 200+ categories with custom attributes for these categories.
i can have a go at it of you like. Just pm me the details

cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sudeshna
Jr. Member
 
Total Posts:  6
Joined:  2009-07-30
 

Hello brendan. ,
You have written that you can give the code . Please give it to me also .
Thanks
Sudeshna Kundu
Email : kundusudeshna@gmail.com
Country :: India

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
hey john,

ive got a dev site with about 200+ categories with custom attributes for these categories.
i can have a go at it of you like. Just pm me the details

cheers
Signature

magento 1.3.1.2
PHP Version 5.2.6
http://www.getstuff.com.au

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sparkasse
Jr. Member
 
Total Posts:  13
Joined:  2009-08-26
Germany
 

Thank you Santhosh Kumar, great work!

 
Magento Community Magento Community
Magento Community
Magento Community
 
rentown
Jr. Member
 
Total Posts:  29
Joined:  2009-03-01
 

hi,

i did a mini summary for newbies like me.

it took me 3 days to make this thing work and i’m finally relief that its working

hope that this will help someone that have been struggling like i did.

1) download the scripts here
http://www.magentocommerce.com/boards/viewthread/26022/P30/

ImpCat_Katalogdaten_importieren.tar (File Size: 27KB - Downloads: 569)
HowTo - ImpCat - Tool zum Importieren von Kategorien.txt (File Size: 1KB - Downloads: 534)
ImpCat - xml_fuer_advanced_profile_import_categories.txt (File Size: 1KB - Downloads: 462)

2) upload on the the zip files on ftp

3) on admin area. got to “system” ---> “import/Export” ---> “advanced Profiles”
4) click “add New Profile”
5) now under “profile name” type “import categories”
under “action XML” insert the following script:

-----------------------------------------------------------------------------------------------------------------------

<action type="dataflow/convert_adapter_io" method="load">
    <var 
name="type">file</var>
    <var 
name="path">var/import</var>
    <var 
name="filename"><![CDATA[Categories.csv]]></var>
    <var 
name="format"><![CDATA[csv]]></var>
</
action>
<
action type="dataflow/convert_parser_csv" method="parse">
    <var 
name="delimiter"><![CDATA[,]]></var>
    <var 
name="enclose"><![CDATA["]]></var>
    <var name="
fieldnames">true</var>
    <var name="
store"><![CDATA[0]]></var>
    <var name="
number_of_records">1</var>
    <var name="
decimal_separator"><![CDATA[.]]></var>
    <var name="
adapter">catalog/convert_adapter_category</var>
    <var name="
method">parse</var>
</action>

------------------------------------------------------------------------------------------------------------------------------------------

6) click save

7) create a csv file called “Categories.csv”

8) upload and run the “imported categories” that you created on “advanced profiles” in the admin area

 
Magento Community Magento Community
Magento Community
Magento Community
 
rentown
Jr. Member
 
Total Posts:  29
Joined:  2009-03-01
 

hi,

now that i uploaded all the categories.

does anyone know how to upload the products on the right categories?

i have tried to use the patch below to do that but it didnt work

http://www.magentocommerce.com/wiki/how-to/how_to_import_category_structure_with_products_using_dataflow

can anyone help me please?

 
Magento Community Magento Community
Magento Community
Magento Community
 
pezomatic
Sr. Member
 
Avatar
Total Posts:  190
Joined:  2008-11-05
 

..

 
Magento Community Magento Community
Magento Community
Magento Community
 
pezomatic
Sr. Member
 
Avatar
Total Posts:  190
Joined:  2008-11-05
 
rentown - 06 November 2009 11:27 PM

hi,

now that i uploaded all the categories.

does anyone know how to upload the products on the right categories?

i have tried to use the patch below to do that but it didnt work

http://www.magentocommerce.com/wiki/how-to/how_to_import_category_structure_with_products_using_dataflow

can anyone help me please?

I had a fair amount of success doing this about a year ago by manipulating the Magento MySQL database directly with a FileMaker Pro frontend. Hopefully I will have some time to work on this again. Here is a thread that I started related to this: http://www.magentocommerce.com/boards/viewthread/63148/

 
Magento Community Magento Community
Magento Community
Magento Community
 
rentown
Jr. Member
 
Total Posts:  29
Joined:  2009-03-01
 

hi
pezomatic

doenst the link below import categories?
http://www.magentocommerce.com/wiki/how-to/how_to_import_category_structure_with_products_using_dataflow
can you take a look and see if this is it?

and if yes how can be installed as i did install but its not working at all.

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top