A bundle product presents a selection of items and allows customers to choose the ones they want to purchase. All the items that make up a bundle exist in the catalog as either Simple Products or Virtual Products. Typically, bundle products are created and updated from the Admin. However, you can also import data to create a bundle product or you can export existing bundle products, edit the data, and import them back into the catalog. The Sprite Yoga Companion Kit is a bundle product in the sample data that is used in the following examples.
There are two ways to change the order of items in a bundle product.
When working with a Bundle product from the Admin, you can drag and drop items and sections into position.
The best way to understand the structure of a bundle product is to export the product and examine the data in a spreadsheet. You can change the order of bundle items by exporting the product and adding a position parameter to the data for each item. The item data are in the
bundle_values column of the exported product. When opened in a spreadsheet, all the items associated with the product are in a single cell as a long string of text. The
bundle_values column contains the following elements for each item:
In this step, the Sprite Yoga Companion Kit is exported as a (CSV file. You can use any other bundle product that you have in your catalog.
On the Admin sidebar, go to System > Data Transfer > Export.
Under Export Settings, set Entity Type to
In the list of product attributes, scroll down to SKU and enter the SKU of the bundle product that you want to export.
The SKU is
24-WG080 for the product in this example.
Scroll down to the bottom of the section and click Continue.
In the Action column of the File name grid, click Select and choose
The file appears in the download location used by your browser.
Open the downloaded CSV file in a spreadsheet.
Scroll to the far right, until you can see the
bundle_values data, each element is separated by comma, and each bundle item is separated from the next with a vertical bar. (The last item does not end with a vertical bar.) Your exported bundle data should look similar to the following example:
To make it easier to edit, you can copy the
bundle_values data, and paste it into a text editor, Then, add a line break after each item, so each item is on a separate line.
After editing the data, carefully remove the line breaks and paste the edited data back into the
In the following illustration, a
position=[number] parameter is added to each yoga strap to change the order of the items in the store listing.
After editing the data, Save the CSV file.
On the Admin sidebar, go to System > Data Transfer > Import.
Under Import Settings, set Entity Type to
Set Import Behavior to
This option overwrites the previous data for your bundle product, rather than adding your changes as additional items.
Scroll down to the File to Import section and click Choose File.
Select the CSV file that you edited.
Click Check Data and wait a few moments for the data to be checked.
If the file is valid, click Import.
When the process is complete, go to System > Tools > Cache Management and click Flush Cache Storage.
This ensures that the updated product is immediately available in the storefront.