How To Add Product Quantity To The Existing Value During Magento 2 Product Import

- Magento 2, Our extensions

Imagine a situation when you need to upload a file provided by your supplier with the quantity of the products sent to your store. By default, Magento 2 will replace the existing quantity with the one specified in the import table. However, you need to ADD the provided new QTY value to the existing product stock. In the following article, we explain how to do that with the help of the Improved Import & Export extension. You will learn how to add product quantity to the existing value during Magento 2 product import instead of replacing it. Follow our Magento 2 Developer’s Cookbook for more useful tips.

Add Product QTY to Existing Value: The Option’s Definition & Impact

“Add Product QTY to Existing Value” is an important time-saver for situations when you need to upload a file with the quantity of the products sent to your store. In this situation, you may need to ADD the provided quantity (QTY) value to the existing product stock at your Magento 2. Otherwise, the import procedure will replace the existing quantity with the provided value instead of summing the two numbers.

Let’s suppose you have 76 items of product A in stock. Your supplier has sent you another 50 items of product A. In the case of the default import, your new stock for product A will be 50 items.

However, the “Add Product QTY to Existing Value” option will add the provided quantity to the existing one – 50+76 – so that you will get 126 items of product A. You only need to enable the “Add product QTY to existing value” setting inside the Import Settings section of the Import Job.

How To Add Product Quantity To The Existing Value During Magento 2 Product Import

The whole process is reduced to a single click. You can add product quantity to the existing value during Magento 2 product import instead of replacing it as described below: 

  1. Create a new import job (“Add New Job”) under System -> Improved Import/Export -> Import Jobs.
  2. Enable your job, set its title, and configure the update frequency if necessary (the General Settings tab).
  3. Choose Products as your import entity to unveil additional settings (the Import Settings tab).
    Magento 2 Products add edit import export

  4. Scroll down to the “Add product QTY to existing value” option and turn it on to add product quantity to the existing value during Magento 2 product import.
  5. Configure other parameters and save your import job.

Now, you can import products to Magento 2, adding product quantity to the existing value. For further information on how to import products to Magento 2, follow these links: The Complete Guide to Magento 2 Product Import & How to update Magento 2 product price and quantity using import and export.

Improved Import & Export Features

Summing product quantities isn’t the sole advantage of Improved Import & Export. The plugin, as previously said, completely redesigns Magento’s import and export operations. 

For instance, you will be able to avoid time-consuming and unpleasant file modifications.  Since Magento 2 only accepts CSV files, you should convert all other file types to this format. However, the Improved Import extension allows you to import and export files in CSV, XML, JSON, ODS, and XLSX formats.

Along with that, you can rely on numerous file sources, including Google Drive or Dropbox. It is also possible to rely on FTP/SFTP, direct file uploads, and URL uploads or import data straight from Google Sheets

Magento 2 Products add edit import export

And due to the broad API support, you may avoid utilizing third-party services. Import & Export enables direct API transfers to link your e-commerce website to external systems, bringing a whole new method to import and export operations between Magento 2 and external systems.

Scheduling is another useful innovation seen in every import and export profile. It enables you to automatically update your e-commerce website at predefined intervals. 

And the extension’s rich mapping capabilities allow you to convert third-party attributes to Magento 2 properties or even build new attributes and values as needed. For further information, see the following websites: