2

Currently Im using ho-nl/magento1-Ho_Import to import product information in Magento 1.9.2.

  1. I tried importing products using category path (eg: Computers/Keyboards) with success.
  2. Is there a way to import products in magento 1.9 using their category ID (eg: _category=1405)?.

I cannot find the answer in their github site or issues area. Any help appreciated.

EDITED---------------------------------------------------------- additional info. an example of a file that worked ok with category path:

_store,ho_import_profile,sku,_attribute_set,_type,store,_category,is_anchor,_product_websites,cost,price,location,country_of_manufacture,name,short_description,description,manufacturer,qty,weight,status,is_in_stock,tax_class_id,visibility,_media_attribute_id,_media_image,_media_lable,image,image_label,small_image,small_image_label,thumbnail,thumbnail_label,gallery,media_gallery

electronics,141565030710,Default,simple,admin,"Electronics/AV Accessories & Cables/Surge Protection & Filtration",Yes,base,98.94,98.94,"White Plains, New York",US,"Panamax M8-AV-PRO 8 Outlet Power Line Conditioner and Surge protector","Shop By Manufacturer Other Add my Store to your Favorites and receive my email newsletters about new items and special promotions! Panamax M8-AV-PRO …","Shop By Manufacturer Other Add my Store to your Favorites and receive my email newsletters about new items and special promotions! Panamax M8-AV-PRO 8 Outlet Power Line Conditioner and Surge protector --> Description Payment Information Shipping Information Terms & Conditions Item Condition: NEW Warranty: 1 year Brand: Panamax Features: total of 8 protected AC power outlets in two isolated banksi…",###EMPTY###,1,1,1,1,2,4,88,###EMPTY###,,/141565030710.jpg,"Panamax M8-AV-PRO 8 Outlet Power Line Conditioner and Surge protector",/141565030710.jpg,"Panamax M8-AV-PRO 8 Outlet Power Line Conditioner and Surge protector",/141565030710.jpg,"Panamax M8-AV-PRO 8 Outlet Power Line Conditioner and Surge protector",,

ANSWER-------------------------------------------------------------------

using '_category' => array(1, 3), if you want to assign products to multiple categories or

'_category' => '3', for single category must work.

0

1 Answer 1

1

Have you tried to just enter the ID and see what happens? I don't know Ho_Import well enough, but I know the underlying AvS_FastSimpleImport well, and in that it's possible. So I'd say it should work.

6
  • in my experience ho_import worked with complete path but I didn't make it using the id only. I will check documentation again. thank you for your excellent Avs_FastSimpleImport open source solution!.
    – s_h
    Feb 4, 2017 at 6:40
  • avs_fastsimpleimport displays the following example for category product relationship. using _category with ID will work? $data[] = array( '_root' => 'Default Category', '_category' => 'Test2/Test3', '_sku' => '0815', 'position' => 1 );
    – s_h
    Feb 4, 2017 at 19:24
  • 1
    Yes, it's supported. I agree it's not well documented. We have it in the test sample, see github.com/avstudnitz/AvS_FastSimpleImport/blob/master/…. Feb 4, 2017 at 21:21
  • Thank you. So we have to create a tree traversal hierarchy to pass that data in an array eg: '_category' => array(1, 3), on the other hand, using only the product category eg: _category => '3' directly will not work?, probably that is the reason ive failed
    – s_h
    Feb 4, 2017 at 21:33
  • array(1, 3) means that two categories with the IDs 1 and 3 are assigned, it's not a tree structure. If you just want one category, just the number (3) should be enough. Feb 5, 2017 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.