How to Convert Kilograms to Grams During Magento 2 Product Import 

- Magento 2, Our extensions

Chances are, you need to change the measurement unit during Magento 2 product import. However, it is impossible to do that if you transfer products with the default import tools. Let’s suppose you sell food supplements on your e-commerce website. Your partner provides an update table for different sorts of protein with the weight specified in kilograms. However, you display it in grams on your e-commerce storefront.
If you use the default import tool, it is necessary to edit the update table manually, converting kilograms into grams before importing the update. But there is a much easier way to change the measurement unit. You can effortlessly convert kilograms into grams or vice versa with the help of the Improved Import & Export Magento 2 extension.  

In the following article, we explain how to use our extension to automate the conversion process and avoid unnecessary manual editing. You will learn how to import products to Magento 2 and convert different measurement units between each other. For instance, we explain how to turn kilograms into grams and back on import. Also, you will find out how to calculate kilograms to pounds. For more tips like this one, follow our Developer’s Cookbook

How to import products to Magento 2, converting kilograms to grams

Improved Import & Export converts product weight during import according to the “Weight Factor” value in the import job settings. The default value is “1”. In this case, the weight value remains exactly the same as in the import table. To convert grams to kilograms during Magento 2 product import, set the value to “1000” because 1kg equals 1000g. 

convert kilograms to grams

How to import products to Magento 2, converting grams to kilograms

Improved Import & Export converts product weight during import according to the “Weight Factor” value in the import job settings. To convert grams to kilograms during Magento 2 product import, set the value to “0.001” since 1kg equals 1000g.

How to import products to Magento 2, converting pounds to ounces

Improved Import & Export converts product weight during import according to the “Weight Factor” value in the import job settings. To convert pounds to ounces during Magento 2 product import, you need to set the value to “16” since 1 pound equals 16 ounces.

How to import products to Magento 2, converting ounces to pounds

Improved Import & Export converts product weight during import according to the “Weight Factor” value in the import job settings. To convert ounces to pounds during Magento 2 product import, you need to set the value to “0.0625” 1 pound equals 16 ounces.

Note that the conversion from kilograms to pounds, pounds to kilograms, grams to ounces, and ounces to grams is approximate. It means that it is not 100% correct, since their ratios are irrational numbers.  

How to import products to Magento 2, converting kilograms to pounds

Improved Import & Export converts product weight during import according to the “Weight Factor” value in the import job settings. To convert kilograms to pounds during Magento 2 product import, you need to set the value to “2.20462” since 1 kg equals approximately 2.20462 pounds.

How to import products to Magento 2, converting pounds to kilograms

Improved Import & Export converts product weight during import according to the “Weight Factor” value in the import job settings. To convert pounds to kilograms during Magento 2 product import, you need to set the value to “0.453592” since 1 pound equals approximately 0.453592 kg.

How to import products to Magento 2, converting grams to ounces

Improved Import & Export converts product weight during import according to the “Weight Factor” value in the import job settings. To convert grams to ounces during Magento 2 product import, you need to set the value to “0.035274” since 1 ounce equals approximately 0.035274 g.

How to import products to Magento 2, converting ounces to grams 

Improved Import & Export converts product weight during import according to the “Weight Factor” value in the import job settings. To convert ounces to grams during Magento 2 product import, you need to set the value to “28.3495” since 1 ounce equals approximately 28.3495 kg.

Improved Import & Export Features

Converting units of measurement during product import to Magento 2 is not the only advantage of Improved Import & Export. Let’s see how it revamps the standard import and export procedures. 

Above all, the extension has a timetable component, which is necessary for regular data transfers. You may import data to your e-commerce website at any time using the scheduling area. It should be noted that this functionality is only available through Adobe Commerce, as Magento 2 Open Source does not enable scheduling.

The plugin also has a variety of mapping features. Third-party attributes can be mapped to Magento 2 attributes, or new attributes and values can be generated automatically when you import data to Magento 2.

Besides, import and export enhancements allow you to avoid time-consuming and unpleasant file conversions. Our plugin allows a variety of file formats, while Magento 2 only accepts CSV files. CSV, XML, JSON, ODS, and XLSX files may be imported and exported in their native form.

Additionally, different file sources are at your service, such as Google Drive, Dropbox, FTP/SFTP, direct file uploads, or URL uploads. Even Google Sheets Magento 2 import and export processes are possible. 

Magento 2 Products add edit import export

It is also worth mentioning that the Improved Import & Export extension supports API connections. The module approaches import and export procedures between Magento 2 and other systems in a whole new way, basically connecting your e-commerce website directly to external services. For further information, click on the following links: