How to Clear Attribute Values via Magento 2 Product Import

- Magento 2, Our extensions

Using Magento’s default import tool is associated with basic functionalities only. In a nutshell, you can import a limited amount of entities by applying a few changes to them. However, Magento 2 import can easily become a powerful instrument that not only saves your time but also lets you manage your e-commerce store on a completely new level. In the following article, we explain how to clear attribute values when you import products to Magento 2. You no longer have to do that manually. While this functionality is not available by default, you can easily get this precious time-saver with the Improved Import & Export Magento 2 extension. So, let’s see how to clear attribute values in Magento 2 while importing products. You can find more useful tips like this one in our Magento 2 Developer’s Cookbook

How to Clear Attribute Values via Magento 2 Product Import

All you need is love of course, but today we want to explore a more specific case. Therefore, all you need is Improved Import & Export for Magento 2. This extension introduces a new import procedure that offers numerous advantages over the default data transfer routine. For instance, it lets you clear attribute values when you import products to your website.

Follow these steps to clear attribute values via Magento 2 Import: 

  1. First of all, you need to create a new import job under System -> Improved Import/Export -> Import Jobs. Hit the “Add New Job” button.

  2. You are on the General Settings tab now. Enable your job, specify its title, and choose the update frequency if you want to automate your import process. You can also generate unique URLs for duplicates and enable automated re-index after import.

  3. Next, select Products as your import entity. Here, you can enable API transfers and a bunch of other options, including “Clear Attribute Values”.
    Magento 2 Products add edit import export
  4. Turn on the “Clear Attribute Values” option. Now, the extension will delete attribute values for attributes specified in your import file. 
  5. Configure other parameters and save your new import job.

That’s it. Now, you can use your new import job to clear attribute values when you import products to Magento 2. For further information, follow this link: The Complete Guide to Magento 2 Product Import.

Clear Attribute Values: The Option’s Definition & Impact

The “Clear Attribute Values” option provides the ability to delete values for ALL optional product attributes listed in the imported file. Let’s suppose you want to import a product that has optional attributes “color” and “size”. Your import table includes the “color” attribute. When you import this table, the values of the “color” attribute for all imported products will be reset if you enable the “Clear Attribute Values” option.

At the same time, the values of the “size” attribute are not changed because it is not available in your import table.

Therefore, you need to add all optional product attributes to the import table to delete their values while importing products. 

Improved Import & Export Features

In addition to the ability to clear attribute values during the Magento 2 product import, our extension offers lots of other advantages over the default import procedure. For instance, it supports numerous file formats, such as CSV, XML, JSON, ODS, and XLSX, while Magento’s default solution works with CSV only. In addition to that, you can rely on multiple file sources, such as Google Drive and Dropbox, not to mention FTP/SFTP import, direct file uploads, and URL import. 

Moreover, you can import products to Magento 2 straight from Google Sheets, clearing attribute values if applicable. Direct API data transfers are possible too. 

Magento 2 Products add edit import export

As we’ve just described above, Improved Import & Export also lets you create update schedules so that all data transfers are performed automatically. And to avoid any manual interactions, the extension delivers a set of mapping features. You can not only match third-party attributes to ones Magento 2 supports but also generate new ones along with default values. For further information, follow these links: