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

Page 1 of 2
Import products with categories
 
Magentone
Jr. Member
 
Total Posts:  6
Joined:  2007-10-24
 

I try to import products with item category but I can’t do it
There is only one item to define categories “defult_category_id” but it doesn’t work
In export function, the item doesn’t show result and in import I can’t match the category name in DB with file csv category.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bigtuna
Jr. Member
 
Total Posts:  20
Joined:  2007-11-09
Atlanta, GA USA
 

I’m having the same issue. I’d like to assign a product to a category through some kind of batch process if possible. I imported over 500 products with no (major smile) issues, but now it seems as if I’ll need to assign manually through the admin?

I’m sure I can tool around with mySQL to make this work, but a mapping for categories would be a nice to have.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magentone
Jr. Member
 
Total Posts:  6
Joined:  2007-10-24
 

Any news about this problem ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jog
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2007-12-10
Herford / Germany
 

Hi there,

beneath you will find a wicked hack to set imported products in your category. [ Disclaimer: My English is pretty rusty. So you should a) know what you are doing and b) read carefully ... ]

You will need
* basic SQL-knowledge
* some tool to mess in ur magento-mysql-database
* a backup of ur database wink

If you want to link them to a certain category, you will need the category_id. In the admin panel go to “Catalog >> Manage Categories”. In the tree-view, click on the desired category and then have a look at the URL. You should see something like https://192.168.42.42/magento/admin/catalog_category/edit/id/5/ So in this case “5” is the category_id. Keep that in mind.

All imported products are stored in the mysql-table “catalog_product_entity”. Use phpMyAdmin or whatever to have a look there. If you want to add all products to one category, things are easy:

REPLACE INTO catalog_category_product (category_idproduct_idpositionSELECT 5,entity_id,0 from catalog_product_entity

What you do, is inserting all products listed in catalog_product_entity to appear in category “5”. If you just want to add certain products to a certain category, thats more difficult. As u see in catalog_product_entity, the only fields that you can use to filter your SELECT are “entity_id, entity_type_id, attribute_set_id, parent_id, store_id, type_id, sku, created_at, updated_at”. If your SKU lets u get the category, thats easy:

REPLACE INTO catalog_category_product (category_idproduct_idpositionSELECT 5,entity_id,0 from catalog_product_entity WHERE sku LIKE 'TOY%';
REPLACE INTO catalog_category_product (category_idproduct_idpositionSELECT 6,entity_id,0 from catalog_product_entity WHERE sku LIKE 'TOOL%';
REPLACE INTO catalog_category_product (category_idproduct_idpositionSELECT 7,entity_id,0 from catalog_product_entity WHERE (sku NOT LIKE 'TOOL%') AND (sku NOT LIKE 'TOY%');

All products with SKU like TOY001, TOY002, ... will be in Category “5” now, all products with SKU like TOOL001, TOOL_AB, ... will be in Category “6” and all others in Category “7”.

If you have more categories or wicked SKUs then I would rather import the products for each category with a delay of 5 minutes. Well, first import all toys, wait 5 min, import all tools, wait 5 min and so on ...

Then check the field catalog_product_entity “created_at” or “updated_at” and go on like this:

REPLACE INTO catalog_category_product (category_idproduct_idpositionSELECT 5,entity_id,0 from catalog_product_entity WHERE updated_at LIKE '2007-09-06 13:25%';
REPLACE INTO catalog_category_product (category_idproduct_idpositionSELECT 5,entity_id,0 from catalog_product_entity WHERE updated_at LIKE '2007-09-06 13:30%';

****

If all went well, your products are linked to a category now. Else ... dont blame me, but use ur backup…

****

EDIT: ignore below lines. u only use them if u are as stupid as me and forgot to choose the english store in the datra flow wizard ...

While importing, you cant import a value for the store_id. Means all ur imported products are not linked to a store (store_id = 1). Now u need to fix that, otherwise the products wont appear on the homepage. The english store_id is 1. So change all store_ids from 0 to 1 where they are needed:

REPLACE INTO catalog_product_store (store_idproduct_idSELECT 1,entity_id from catalog_product_entity
update 
`catalog_category_entityset store_id 1 where store_id 0

update 
`catalog_product_entityset store_id 1 where store_id 0;
update `catalog_product_entity_datetimeset store_id 1 where store_id 0;
update `catalog_product_entity_decimalset store_id 1 where store_id 0;
update `catalog_product_entity_galleryset store_id 1 where store_id 0;
update `catalog_product_entity_intset store_id 1 where store_id 0;
update `catalog_product_entity_textset store_id 1 where store_id 0;
update `catalog_product_entity_tier_priceset store_id 1 where store_id 0;
update `catalog_product_entity_varcharset store_id 1 where store_id 0;

Be aware, this is wicked hacking around. It will help you to test Magento with ur products. I dont garantee all is working too great. But it seemed to work fine for me…

*********************

Aside: a much more elegant way would be to create an attribute “my_store_id” as an integer field and import that as well. Get its attribute_id and the use the described method with an select from catalog_product_entity_int.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ibrown
Jr. Member
 
Total Posts:  10
Joined:  2008-02-26
 

Has anybody tried the import functionality with filter value such as attribute set. I don’t seem to make it working.

I hacked it by prepending all the products to export by a specific prefix but it would be nice to have it working fine, wouldn’t it?

Herve

 
Magento Community Magento Community
Magento Community
Magento Community
 
andyellis_2000
Member
 
Total Posts:  41
Joined:  2008-02-15
 
Magentone - 29 November 2007 01:46 AM

I try to import products with item category but I can’t do it
There is only one item to define categories “defult_category_id” but it doesn’t work
In export function, the item doesn’t show result and in import I can’t match the category name in DB with file csv category.

beta 0.9 fixes this, it exports and imports the category correctly. I have tested it. 

Then export and import work just fine, except taht on import you still have to upload the images again, for some reason they do not show on the front end and you have to edit the product and upload image again.  I upload just one, 400x400 and tick it for all 3 sizes.

 
Magento Community Magento Community
Magento Community
Magento Community
 
JoshBelke
Member
 
Total Posts:  64
Joined:  2008-02-12
NY, NY
 

“except that on import you still have to upload the images again”

for images, (we have about 1200 of them)
Found it much faster to have the links in the import preset: /n/0/n0bob.jpg

and then just upload all of the images into path:
media/catalog/product/

with:
n/0/n0bob.jpg
n/0/n0tim.jpg
s/1/s1done.jpg

I have noticed the exporting of the attribute_sets goes to Default as well.. and when you manually change them to ex: Parts and Modules and re-import it doesn’t update.

So you have to make a script to update the attribute sets, in this case we did it by “id” with all the Modules being between entries 2-245 and all the Parts between 246-1012.

~We will probably do the next upgrade after v1 is released due to Javascript issues with the latest .9

 
Magento Community Magento Community
Magento Community
Magento Community
 
andyellis_2000
Member
 
Total Posts:  41
Joined:  2008-02-15
 
josh_trivera - 21 March 2008 06:53 AM

“except that on import you still have to upload the images again”

for images, (we have about 1200 of them)
Found it much faster to have the links in the import preset: /n/0/n0bob.jpg

and then just upload all of the images into path:
media/catalog/product/

with:
n/0/n0bob.jpg
n/0/n0tim.jpg
s/1/s1done.jpg

I have noticed the exporting of the attribute_sets goes to Default as well.. and when you manually change them to ex: Parts and Modules and re-import it doesn’t update.

So you have to make a script to update the attribute sets, in this case we did it by “id” with all the Modules being between entries 2-245 and all the Parts between 246-1012.

~We will probably do the next upgrade after v1 is released due to Javascript issues with the latest .9

chuckle, I wish understood this. Does this solve the problme of images not showing after import?  They already are put in a folder that relates to the fist two chars of the photo name, like KTUltra.jpg will be in /media/catalog/images/K/T (not sure if /images is true but you get the point) and the exported csv shows them to be in /K/T with the proper name, yet the template when showing the front end does not put the img tag path there, instead it puts something like /placeholder/small.jpg or something like that.

Somebody else siad that is not happening to them, so lord only knows! Lets hope 1.0 has it all straight. for everyone.

 
Magento Community Magento Community
Magento Community
Magento Community
 
digitalcomputernetwork
Jr. Member
 
Total Posts:  11
Joined:  2009-05-29
 

Is there a way to import the categories and products together. It seems like such a pain to fist hack magento to import categories, then import the categories, then import the products, then hack magento again to put the categories and products together. 

If someone created an extension that imported the product and the category together, they would be a rich person very quickly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bolasevich
Sr. Member
 
Avatar
Total Posts:  235
Joined:  2008-03-04
Newington, CT USA
 

yes you can import categories on the fly with products. This extension will do exactly that.

http://www.commerceextensions.com/magento-product-import-export.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
pumkin
Jr. Member
 
Total Posts:  6
Joined:  2008-10-12
 

check this app out at this website

the guy kind of automated updates using .net - its quite quick and saved me a bit of time actually

 
Magento Community Magento Community
Magento Community
Magento Community
 
lesya
Jr. Member
 
Total Posts:  23
Joined:  2009-05-25
 
bigtuna - 30 November 2007 09:19 PM

I’m having the same issue. I’d like to assign a product to a category through some kind of batch process if possible. I imported over 500 products with no (major smile) issues, but now it seems as if I’ll need to assign manually through the admin?

I’m sure I can tool around with mySQL to make this work, but a mapping for categories would be a nice to have.

I say you check this listing http://www.magentocommerce.com/magento-connect/savajr/extension/1822/store-manager-for-magento/reviews#reviews There’s demo available. It enables to do what you’re looking for in two different ways:
1. You can export products to excel file, assign them to category and import back to store manager
or
2. Or you can map products to the corresponding category right in the store manager

 
Magento Community Magento Community
Magento Community
Magento Community
 
Grut
Sr. Member
 
Total Posts:  164
Joined:  2009-12-03
Ukraine
 

Agree with Lesya. The easiest way to import products with categories into Magento is “Import Products Wizard” of Store Manager for Magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Zaptech
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2010-09-30
Ahmedabad
 

Hello
I am importing bunch of data which quantity is in thousands, and i have succesfuly imported 8500 from 21000 but after that the process is was hanged, and i don’t know what to do in this case,

Is any body have faced the same problem and came up with the solutions.

Please help me to short out the problem. i have attached the screenshot where the process was stuck.

Help will be appreciated.

Thanks

Image Attachments
screen.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
brunomarshall
Guru
 
Avatar
Total Posts:  367
Joined:  2009-08-04
 
Magentone - 29 November 2007 01:46 AM

I try to import products with item category but I can’t do it
There is only one item to define categories “defult_category_id” but it doesn’t work
In export function, the item doesn’t show result and in import I can’t match the category name in DB with file csv category.

 
Magento Community Magento Community
Magento Community
Magento Community
 
KevinWillson
Jr. Member
 
Total Posts:  3
Joined:  2012-06-22
 

what really helped me out in a similar situation was an automated import service. the import was performed from csv file without any errors, data loss or duplicates. Much more productive than doing the process manually.
www. file2cart.com

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2