How to Import Products to Magento 2 & Remove Product Associations
Imagine that the Magento 2 product import not only transfers product data to your e-commerce website but also removes the unnecessary information that is already available on your storefront. If you use the default import tool, you can only imagine that. However, dreams come true, especially within the Magento community. Today, we’d like to draw your attention to some advanced capabilities associated with a product import process based on the Improved Import & Export extension. This module provides the ability to remove product associations for grouped products when you import them. Below, we explore this feature and highlight the extension’s advantages over the standard tools. So, let’s see how to import grouped products to Magento 2, removing the existing product associations. You can find more useful tips like this one in our Magento 2 Developer’s Cookbook.
How to Import Products to Magento 2 & Remove Product Associations
As we’ve just mentioned, you need the Improved Import & Export extension to get rid of product associations within just one click. The module introduces a new import procedure that offers numerous advantages over the default data transfer routine. And removing product associations is just one of multiple perks.
Follow these steps to import grouped products to Magento 2, removing the existing product associations:
- Create a new import job. Go to System -> Improved Import/Export -> Import Jobs and hit the “Add New Job” button.
- On the General Settings, turn on your job, type its title, and specify the update frequency if necessary. The extension also offers the ability to generate unique URLs for duplicates or run re-index automatically when the import procedure is over.
- Next, proceed to the Import Settings tab and select Products as your import entity. This section lets you enable API transfers and implement a bunch of other tactics, including “Remove Product Associations”.
- Turn on the “Remove Product Associations” option. Now, the extension will delete simple products assigned to grouped products on your website that are not available in your import file.
- Configure other parameters and save your import job.
That’s it. Now, you can leverage product import to clear product associations when you import grouped products to Magento 2. For further information on how to import products to Magento 2, follow this link: The Complete Guide to Magento 2 Product Import. And don’t forget to check our more specific tutorial: The Complete Guide to Magento 2 Grouped Products, and how to import them.
Remove Product Associations: The Option’s Definition & Impact
The two most important aspects of the “Remove Product Association” setting that you should know are:
- It works for grouped products only;
- It acts as the “replace” behavior.
That’s it! But let’s provide some more information.
If you enable the “Remove Product Association” setting, the Improved Import & Export extension takes the simple products assigned to grouped products in the import table and replaces the simple products associated with grouped products on your website with them.
In other words, all simple products that are not associated with grouped products in the import file are removed from the grouped product associations on your website.
For instance, you have grouped product A within an import file and on your website. On the storefront, the grouped product A is associated with simple products B, C, and D. However, you need to remove A’s association with D.
First of all, you need to specify products B and C as associated with the grouped product A in your import file. Then, enable the “Remove Product Association” behavior.
Now, the Improved Import & Export extension will import the grouped product A with two simple products assigned – B and C. The simple product D will be removed.
Improved Import & Export Features
In addition to the ability to remove product associations for grouped products during the Magento 2 import, our extension offers lots of other advantages over the default import processes. For instance, it supports numerous file formats, such as CSV, XML, JSON, ODS, and XLSX, while Magento’s default solution works with CSV only. It means that you no longer need to convert files to CSV to make them suitable for Magento 2.
In addition to that, Improved Import & Export lets you use multiple file sources, such as Google Drive and Dropbox, not to mention FTP/SFTP import, direct file uploads, and URL import. Or you can import products to Magento 2 straight from Google Sheets. Direct API data transfers introduce another approach to import and export processes.
In addition to that, Improved Import & Export lets you create update schedules so that all data transfers are performed automatically. And due to a set of mapping features, you can match third-party attributes to the corresponding Magento 2 attributes as well as generate new attributes along with default values on import. For further information, follow these links: