Back to Top

Guide for Magento 2 Product Import Using XML URL

Updated 24 April 2024

Using the Magento 2 Product Import Using XML URL extension, the Magento 2 store admin will be able to create products in bulk using the XML file URL having the product data. The admin can create simple, virtual, and configurable products using this extension.

The admin just needs to add the XML file URL and then map the XML file column names with the Magento 2 store product column names. Then when the cron runs the products will get created automatically.

Also, if a new category is assigned to a product that is not available in the store then the category gets created and the product is assigned to the same.

Also, if you are looking to import and export the product reviews then you can check the Magento 2 Product Review Import Export extension.

Check the video mentioned below for an overview of the workflow of this extension:

Searching for an experienced
Magento 2 Company ?
Find out More
sg1JmQybRD0

Features

  • Import simple, virtual, and configurable products using XML URLs.
  • Import product using cron.
  • Map the product attribute in the admin configuration
  • Enable or disable the extension.
  • Category automatically created and product assigned if the category does not exist.
  • On selecting Weekely: Cron will run on the first day of the week.
  • On selecting Monthly: Cron will run on the first day of the Month.

Installation

#Download Module

Firstly, you need to log in to Webkul Store, go to My Account>My Purchased Products section, verify and then download and extract the contents of this zip folder on the system.

#Upload Folder

Once the module zip extracts, follow path src>app and then copy the app folder into the Magento 2 root directory on the server as shown below:

Magento 2 Product import via XML URL  Installation

# Run Commands

You need to run the following commands:

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento setup:static-content:deploy

php bin/magento indexer:reindex

php bin/magento cache:flush

composer require nicolab/php-ftp-client

Language Translation

For translating the module language, navigate through src/app/code/Webkul/ProductImportXMLUrl/i18n and edit the en_US.csv file. Thereafter, rename the CSV as “en_SA.csv” and translate all right side content after the comma in the Arabic language. After editing the CSV, save it.

Magento 2 Product import via XML URL   Language Translation

Now, upload it to the path src/app/code/Webkul/ProductImportXMLUrl/i18n where the installation of Magento 2 is on the server. The module translates into the Arabic Language. It supports both RTL and LTR languages.

The user can edit the CSV like the image below.

i18_file_transalation-1

Initial Configuration

To make the initial configuration settings for the Magento 2 Product Import Using XML URL extension, the admin will navigate through Stores->Configuration->Product Import XML.

192.168.15.188_magento_import_xml_url_CE246p3_pub_admin_admin_system_config_index_key_845b9b8aa84f555533717712b49eab6b699dcf50e2c88119cbf230e5ce7f98b6_asd

Here, the admin will –

  • Enable the module functionality as well as enable the side panel option “Product Import XML” for the extension.
  • Select the attributes of the Magento 2 store to be mapped with the XML file column names.
Screenshot-from-2023-11-03-18-56-18

The Magento 2 Attributes that can be mapped with the XML file column names –

  • Categories
  • Description
  • Image Gallery
  • Product Name
  • Price
  • Quantity
  • Short Description
  • SKU
  • Enable Product
  • Tax Class
  • Product Type and
  • Variations
  • Variation Images

Cron Frequency – Cron frequency can be set to Daily, Weekly, or Monthly as required.

Screenshot-from-2023-11-03-18-59-11
  • On selecting Weekly: Cron will run on the first day of the week.
  • On selecting Monthly: Cron will run on the first day of the Month.

Note:- The Apache2 server must have the “allow_url_fopen” function enabled in php.ini file.

Product Import XML Options

The admin will find two options under the Product Import XML side panel option.

Dashboard-Magento-Admin

Workflow

Note: If the XML file exists on the same server then just take the URL of that file and put it in the XML URL field.

For this demonstration, I’ll be using the XML file URL with one product(simple).

XML file:

localhost_simple.xmlasd-1

Now, navigate to the Add Product XML URL section, enter the XML URL of the file, and save it.

192.168.15.136_m24657_pub_admin_productimport_product_import_key_1dd75fa737ae783473c95994dbaedd1160de9a2ec8720b1a23d1d1735005d578_asd-1

After saving the file, a success message for the same is displayed, and the added XML URL gets added. Also, the column name Attribute Map Status for the newly added XML URL file shows the status as No.

192.168.15.136_m24657_pub_admin_productimport_product_index_key_2bd92bd492837234e377986fb00e193e8ce7e244701231015c21116f83ca5c53_asd

Now, we have to map the column names of the XML file with the Magento 2 attributes assigned from the configuration settings.

For the respective XML URL file, tap the Map Attribute option. Here, the admin also has the delete option to delete the XML URL from the list.

192.168.15.136_m24657_pub_admin_productimport_product_index_key_2bd92bd492837234e377986fb00e193e8ce7e244701231015c21116f83ca5c53_asd-1

This brings up the section where you have to go to the Map Attribute section and map the attributes as required. Lastly, tap the Save button to save the mapping.

192.168.15.136_m24657_pub_admin_productimport_product_import_id_31_key_1dd75fa737ae783473c95994dbaedd1160de9a2ec8720b1a23d1d1735005d578_asd

After saving the Mapping, a success message is displayed as shown below. Also, now the Attribute Map Status displays the status as Yes.

192.168.15.136_m24657_pub_admin_productimport_product_index_key_2bd92bd492837234e377986fb00e193e8ce7e244701231015c21116f83ca5c53_asd-2

After the above procedure, you need to run the below commands in the terminal.

php bin/magento cron:install

php bin/magento cron:run

After running the above commands, products will be created and you can check them in the backend and the storefront.

Backend:

192.168.15.136_m24657_pub_admin_catalog_product_index_key_d11cbf8485cf757997c47e6efa4a47ab4a44f1950000b6207b9e6ea71af3dc50_asd

Storefront:

192.168.15.136_m24657_pub_chronograph-watch.htmlasd

Also, if you want to import the categories into the Magento 2 store in bulk using a CSV/XML/XLS file format then check the Category Bulk Upload Using CSV/XML/XLS for Magento 2 extension.

Demonstration in case of a Configurable Product:

XML file:

For this demonstration, I’ll be using the XML file URL with one product(configurable).

Screenshot-from-2024-03-06-10-19-21

Now, navigate to the Add Product XML URL section, enter the XML URL of the file, and save it.

192.168.15.136_m24657_pub_admin_productimport_product_import_key_8858c0b31895fe87e16b57e0bad361cab226884512f102d366214cd911391106_asd

After saving the file, a success message for the same is displayed, and the added XML URL gets added. Also, the column name Attribute Map Status for the newly added XML URL file shows the status as No.

192.168.15.136_m24657_pub_admin_productimport_product_index_key_dba0c027177f4cd045eeb90f89ec6edd904a175fef5ed67e1feb5668a9c76eaa_asd

Now, we have to map the column names of the XML file with the Magento 2 attributes assigned from the configuration settings.

To do so, for the respective XML URL file tap the Map Attribute option.

192.168.15.136_m24657_pub_admin_productimport_product_index_key_dba0c027177f4cd045eeb90f89ec6edd904a175fef5ed67e1feb5668a9c76eaa_asd-1

This brings up the section where you have to go to the Map Attribute section and map the attributes as required. Lastly, tap the Save button to save the mapping.

192.168.15.136_m24657_pub_admin_productimport_product_import_id_32_key_8858c0b31895fe87e16b57e0bad361cab226884512f102d366214cd911391106_asd

After saving the Mapping, a success message is displayed as shown below. Also, now the Attribute Map Status displays the status as Yes.

192.168.15.136_m24657_pub_admin_productimport_product_index_key_dba0c027177f4cd045eeb90f89ec6edd904a175fef5ed67e1feb5668a9c76eaa_asd-2

After the above procedure, you need to run the below commands in the terminal.

php bin/magento cron:install

php bin/magento cron:run

After running the above commands, products will be created and you can check them in the backend and the storefront.

Backend:

192.168.15.136_m24657_pub_admin_catalog_product_index_key_59337a935339c4fa28f35dfe9fc57dfd27289bd7848f004cd23711df52b7c442_asd

Storefront:

Screenshot-from-2023-08-25-16-07-47

Demonstration of Virtual Product:

XML file:

For this demonstration, I’ll be using the XML file URL with one product(virtual).

localhost_simple.xmlasd-3

Now, navigate to the Add Product XML URL section, enter the XML URL of the file, and save it.

192.168.15.136_m24657_pub_admin_productimport_product_import_key_1f064c6d8e302a02521587859f63c1ecafb536338b42ebfcf2d4d8666d6a449d_asd

After saving the file, a success message for the same is displayed, and the added XML URL gets added. Also, the column name Attribute Map Status for the newly added XML URL file shows the status as No.

192.168.15.136_m24657_pub_admin_productimport_product_index_key_1a2ab4e308967931ecf1aaf5329110d6706a0f40218568f1c46f640a9aada5d8_asd

Now, we have to map the column names of the XML file with the Magento 2 attributes assigned from the configuration settings.

To do so, for the respective XML URL file, tap the available Map Attribute option.

192.168.15.136_m24657_pub_admin_productimport_product_index_key_1a2ab4e308967931ecf1aaf5329110d6706a0f40218568f1c46f640a9aada5d8_asd-1

This brings up the section where you have to go to the Map Attribute section and map the attributes as required. Lastly, tap the Save button to save the mapping.

192.168.15.136_m24657_pub_admin_productimport_product_import_id_33_key_1f064c6d8e302a02521587859f63c1ecafb536338b42ebfcf2d4d8666d6a449d_asd

After saving the Mapping, a success message is displayed as shown below. Also, now the Attribute Map Status displays the status as Yes.

192.168.15.136_m24657_pub_admin_productimport_product_index_key_1a2ab4e308967931ecf1aaf5329110d6706a0f40218568f1c46f640a9aada5d8_asd-2

After the above procedure, you need to run the below commands in the terminal.

php bin/magento cron:install

php bin/magento cron:run

After running the above commands, products will be created and you can check them in the backend and the storefront.

Backend:

192.168.15.136_m24657_pub_admin_catalog_product_index_key_7253ea4bb752ef32fc604efc710623d49354159ab5bed75efb190082835cd904_asd

Storefront:

192.168.15.136_m24657_pub_subscription-product.htmlasd

Import Product By FTP

Now Navigate to Product Import XML>Import Product By FTP and click on the same as given below.

Dashboard-Magento-Admin-1

On clicking the Import Product By FTP button you will come to the similar page below. You can see Two buttons Sample CSV and Add File Path, Click on Sample CSV and download a Sample CSV file in your local System.

7474

After Clicking on Sample CSV a CSV file will Download in your local System.

You have to fill the product details in the CSV file and store it in your local system.

Screenshot-from-2024-03-05-17-30-46

Next, click on the Add File Path button in the Import Product By FTP page as given below.

Import-Product-By-FTP-Product-Import-XML-Magento-Admin

After clicking the Add File Path you will land on the page as given below, then you have to fill up the column “Host, Port, Username, Password, File path”.

464

Now, after filling all the columns you have to press the Save button and a File Path Saved Successfully pop-up comes up.

33333

After the above procedure, you need to run the below commands in the terminal.

php bin/magento cron:install

php bin/magento cron:run

After running the above commands, products will be created and you can check them in the backend and the storefront.

Backend:

99999

Storefront:

212121

Support

That is all about the Magento 2 Product import Using XML URL extension. If you have any queries regarding the plugin, please contact us at Webkul Support System.

If you’re looking to create a custom e-commerce website, it’s a great idea to hire Magento developers who can help you build a powerful and scalable online store.

You can also check our complete Magento 2 extensions.

Current Product Version - 4.0.2

Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home

Table of Content