So, you have to move a large pile of boxes to another location. You can carry them one by one or use a truck to transport them to the right place. Which option will you choose?
How do those boxes relate to your e-commerce website? Quite literally: if you need to make Magento import products to your storefront, there’s a better way to do it than adding them one at a time. Especially if you have lots of items in stock and want them to display correctly after the import. A tiny error during the process can cost you customers.
To avoid any possible issues, check this comprehensive guide on how to run Magento product import quickly and smoothly.
How to Import Products in Magento 2
There are a few steps to follow for import products in Magento 2. Let’s check each of them.
1. Log In to the Admin Panel
Before you start importing your products in the Magento store, you need to prepare data. To do so, go to your Admin Panel and enter your credentials:
After that, choose System → Data transfer → Import.
2. Prepare CSV File
Before importing products in Magento 2, you need to generate a CSV file with your product data. If you’re not sure what a final file should look like, download the Magento import products CSV sample first. Click on Download Sample File and open it:
Here’s what your file might look like:
Compare the structure and formatting of the sample with the CSV file you are going to upload to eliminate any possible errors.
Note! Double-check the CSV file to ensure everything is in its right place. This will help to avoid any possible issues during import.
In some cases, you may need to optimize images, especially if there are lots of them, and they are not stored in the /media/import folder.
Finally, review product descriptions and try to reduce them to 255 characters.
3. Transfer Data
So, your CSV file is OK and you can proceed to the import itself. To start, choose Products in the Entity Type field:
Make sure the size of the file you are going to import doesn’t exceed 2M:
Also, check if the images are in the right location. In case you store them in a separate directory on an external server, provide the full URL to it.
4. Choose the Import Behavior
You can select from the three approaches to import products:
- Add/Update. Using this option, you’ll be able to expand your old database with new data, as well as update any kind of fields except SKUs. What’s more, Magento automatically creates new tax classes, product categories, and SKUs if you specify them in the CSV file.
- Replace. This scenario allows you to overwrite product data. If you go this way, it’ll require your full attention, as the existing data will be removed.
- Delete. With this functionality, you can delete the current entities in your database if there are matching ones in the import file.
Here, you can also choose how Magento handles errors if any:
- Stop on error, which will abrupt the import.
- Skip error entries, when Magento will continue importing data.
You can set the number of errors in each case, and the system will perform the necessary action after reaching the limit.
5. Specify the Import File
Next, you can upload the file for import. To do this, follow these steps:
- Go to the File to Import section.
- Press Choose File to select your CSV file and click Open.
If your import file contains any images, specify the path to the local or external server to retrieve them from:
6. Check the Data and Finish the Import
Next, click the Check Data button in the upper right corner to validate your data.
If there are no errors or their number doesn’t exceed the Allowed Errors Count, you’ll be able to import your CSV file. To do so, press the Import button:
In case any error pops up during import, fix the issue and import the file once more.
You can always double-check the data you upload if you’ve chosen the Stop on Error option in the Import behavior.
Once the import is over, you’ll get a notification about it:
7. View the Import History
When you’re done, you can check a record with the history of your import process. This table contains all actions related to import for you to track them. To review the history, go to System → Data Transfer → Import History:
Watch Out for These Magento 2 Import Common Validation Errors
Now that you know how to bulk upload products in Magento 2, let’s address the most widespread errors you may encounter during import. Some of them may be resolved on your own, and some may require external help with your Magento store audit.
The problem may arise from the invalid values provided in the visibility field.
What can you do? To eliminate it, we recommend using regular Magento text values.
Invalid Separator or Format
It can happen when separators in your import file don’t match the import configuration.
What can you do? To resolve this issue, check your CSV file and add copy-paste separators to your import settings.
Different Number of Fields and Product Info
If the CSV file wasn’t processed correctly, it can result in such an error.
What can you do? You’ll need to review the initial file and add separators or double quotes to fix the problem.
Invalid Product Type
This means the product_type field contains invalid values.
What can you do? A possible way out is to check the CSV file or install a third-party module that will identify and add the necessary products.
Incorrect Value of the Select Fields
The reason for this issue may lie in different attribute values.
What can you do? To fix it, double-check your CSV file and compare these values with the ones from Stores → Attributes → Product. If the issue persists, there may be other reasons for that, and you might need to consult professional Magento developers.
How to Import Product in Magento: Wrapping It Up
As you can see, running a Magento product import isn’t rocket science. All you need to do is to follow the steps from this guide and devote enough time to the preparation stage.
Why are we so sure? Here, at Elogic, we’ve done product import multiple times, and we’re glad to share our insights with you in our case studies. Yet, if you still have some questions unanswered, you can leave them in the comments section below.