Support fortnight digest #1 August 2022 Improved Import & Export for Magento 2 – customer use cases
Improved Import extension for Magento 2 has a lot of uses, in this fortnight digest we want to share with you:
- How the store owners utilize the extension
- How our support team can customize the extension for you
- How your business can benefit by using Improved Import for Magento 2
Every week brings new customers and new questions to solve, in this digest you will find the most interesting questions our customers contacted us with.
Table of contents
Importing products from Tuindeco and other dropshippers
Original request:
We have a Magento 2 store where we want to import all products from the brand Tuindeco. We have received a link from Tuindeco, but the structure of the file doesn’t match the Magento 2 required product structure
https://feed.tuindeco.shop/versions/1.1/json/full/key_bflabvttrpqdjegibgxib1xqzw0m0kkb/secret_s6z92e2gi1gn2ejqxwanl6irnuokqvw1
We want only to REPLACE certain attributes, like images, product description and pricealso we want to be able to import the amazonaws images into the products
During the work, the customer has identified that the images for the existing products should be replaced instead of updating.
Solution
As the communication got further we have identified that the customer only wanted the products that also existed at the store to be updated by the json file provided via API, however for the product images – they needed to be replaced instead of adding the new ones, which would have resulted in constantly adding new images to the server.
First, we have set up a custom code that has transcribed the Json file from the API into the Magento 2 readable format. Then, we had to split the product update into two different jobs: the one that updated the text attributes of the products, and another which would replace the product images.
For the first job, we have implemented ‘Only Update’ behavior for the import jobs that were aimed at the update of the product attribute updates. Meaning that product data, such as description, and some additional attribute values were updated but not overwritten.
For the second job the ‘Replace’ behavior has been set up, rewriting and reassigning the product images to the new ones supplied by the API.
When the tasks have been completed, the customer has identified that the product stock should also be updated. This was a quick one for our support team, as we only had to add a single attribute name to the existing import jobs, leaving another happy customer.
Adding order increment ID to every line of the order export file
Original request:
I am running on Magento 2.4.3-p1 and testing on the latest version of the magento module v3.7.2.
I am trying to run an order export using multiple entities: When I try with Order & Items of Order and there are more than 1 ‘Items of Order’ for an order the order fields do not populate. This seems like a bug in the export.
I can’t provide you with access to our instance for security reasons but attached is the export and screenshots of the setup. There I use the increment_id field from the Order entity id and 4 fields from the Items of Order field and the issue is there.
Solution
As a quick introduction, I would like to specify that Magento 2 only stores the order increment ID for the first product of the order. If there are more products in the order, each consecutive row goes without the product ID. The format was not just what our customer was looking for, so we have had to customize the extension adding the increment ID of the order to every row of the exported file for the orders with multiple products.
For the customer we have made a patch that has added the increment ID of the order in every row of the datatable, making the export of the orders with multiple products possible with the filter by order increment_id. In the screenshot above you can see how the order export file looked for the customer before and after the Firebear support team made the customization.
This customization has been made as a part of the technical support free of any charges.
Exporting products to the Google Sheets
Original request:
Improved Import & Export extension for Magento 2 allows you to export any data from your store directly to the specified Google Sheet out of the box, however, for one of our customers the export didn’t work and he get back to us with the following ticket:
I review the log error and it comes because of some permission issue.
but still does not work getting another error please check the error msg:
2022-07-22 03:36:58 : Entity products
2022-07-22 03:37:01 : {
“error”: {
“code”: 404,
“message”: “Requested entity was not found.”,
“errors”: [
{
“message”: “Requested entity was not found.”,
“domain”: “global”,
“reason”: “notFound”
}
],
“status”: “NOT_FOUND”
}
}
2022-07-22 03:37:01 : {
“error”: {
“code”: 404,
“message”: “Requested entity was not found.”,
“errors”: [
{
“message”: “Requested entity was not found.”,
“domain”: “global”,
“reason”: “notFound”
}
],
“status”: “NOT_FOUND”
}
and its extension-related error please check and let me know.
Solution
Customer has been getting an issue trying to export the product catalog to the Google Sheets directly.
This one has been quick to solve. Customer has forgotten to add the ID of the sheet into the export job settings.
The full documentation and explicit instructions on how to export any entity to Google Sheets can be found in the dedicated guide.
Also, during the conversation customer asked us why some of the products are exported multiple times and may take several rows inside the exported table?
By default Improved Import and Export extension for Magento 2 exports products from ALL store views. As the store views may have differences in the product details, every store view has a dedicated row in the exported file. The customer needed to select a specific store view inside the export job to get only relevant products exported a single time.
This is it for the first fortnight digest of the Firebear Studio support team. The next post will be coming up in the following weeking bringing you new use cases and questions from our customers, and the solutions our support team has offered.