bundle product import in magento

假如想象 提交于 2019-12-04 18:52:31

You'll need to use the Magento Dataflow (System -> Import/Export -> Dataflow - Advanced Profiles). Create a new profile, and add in the following for your Profile Actions XML:

<action type="dataflow/convert_adapter_io" method="load">
    <var name="type">file</var>
    <var name="path">var/import</var>
    <var name="filename"><![CDATA[name_of_file.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_productimport</var>
    <var name="method">parse</var>
</action>

Next you'll want to create a CSV file with the following fields: store, websites, attribute, type, sku, name, price, bundle_options, bundle_selections and any other fields you want to upload.

Now comes the tricky part: filling in those fields. The bundle options are in the following format: product1_name,selection_type,default_qty,position|product2_name,selection_type,default_qty,position. So it will look like product1,radio,1,0|product2,radio,1,0

Bundle_selections is a bit tougher, but looks like this:

product1_sku:0:0.0000:1:1.0000:0|product2_sku:0:0.0000:1:1.0000:

Edit:

Example CSV File

store,websites,attribute_set,type,category_ids,sku,name,price,short_description,description,value_offer,image,small_image,thumbnail,guarantee,weight,tax_class_id,po_box,status,visibility,grouped,bundle_options,bundle_selections,price_type,sku_type admin,"base",Default,bundle,7,product_sku,My Product Name,,"Really long description here","Another description bit here","value offer here",/image.png,/image.png,/image.png,"more text",19,None,no,Enabled,"Catalog, Search",,"Name1,radio,1,0|Name2,radio,1,0",Sku1:0:0.0000:1:1.0000:0|Sku2:0:0.0000:1:1.0000:,0,1

Have you tried using MAGMI? It supports bundles from recent time.

It is easy to import bundles with it. You can check official documentation in wiki.magmi.org

For example, the simplest syntax for importing bundle products:

 ....,bundle_skus,....
 ....,"CPU:sku001;CPU:sku002",....

And the advanced one

 ....,store,bundle_options,bundle_skus,....
 ....,en,"-*;CPU:Central Processing Unit:radio:1:0;RAM:Random Access Memory:SKU:1:1","CPU:sku001:1:0:1:0;CPU:sku002:1:0:0:1;RAM:sku1000;RAM:sku1001;RAM:sku1002",....

If you consider paid extensions there is a nice extension here, it's an ui wrap around MAGMI that also supports exporting product data in magmi format, not only import as plain magmi. It works with Google spreadsheets instead of CSV and exports data right into the csv columns with headers according to magmi syntax.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!