Pull request by Pieter Hoste, rewrites code that was optimized without need and which also lacked features.
Pull request by Pieter Hoste, reopens a MySQL connection that was closed due to inactivity.
As mentioned by Pieter Hoste, magento/magento2-base may not be available; in this case the official version detection will now be used.
Stronger getCategoryInfo check when fetching parent categories. Pull request by Duckↄhip.
An option to notify the extension M2EPro of changes to products.
In image-set-mode cached images were not removed when a new image was uploaded with the same name. They are now.
In the (default) mode where images are re-downloaded each import, the images were left in the temporary directory (even though they were not used again). This is now no longer the case. The images are removed after the import.
- An option, requested by Chris Astley, to create simple url_path attributes for generated categories (i.e 'corner-chairs' instead of the standard 'furniture/tables/corner-chairs'). This extends to the url_rewrite entry as well.
- The attribute
url_path
, if exists, is removed from the imported products - Writes non-redirects (redirect_type = 0) before redirects (redirect_type = 301) in url_rewrite, because Magento relies on this order when it creates canonical urls and such.
Added some options that were missing from the cli command and the rest api.
Support for 20.6 price decimal format.
Fixed import of tier prices in M2.4
The XSD that validates the product import XML did not allow multiple store views.
Guus Portegies asked for this option to have product-to-category links to be removed as well as added.
Setting $config->categoryStrategy = ImportConfig::CATEGORY_STRATEGY_SET
will remove product-to-category links that are not named in the import.
Use responsively; the documentation explains when this is not a good idea.
Take into account that product and category url suffix may differ per website.
Take into account that product and category url suffix may differ per store view.
lucafuse94 noticed that parent_product_id was missing from catalog_product_bundle_option_value.
Started monitoring database changes between Magento versions, using Compalex. Added support for
- Tier prices, percentage_value (since M2.2)
- Bundled product option value, parent_product_id (since M2.2)
Magento 2.3 only added MSI, and did not change the existing product tables.
SKU's are explicitly made case sensitive Added a function to look up the case sensitive sku in the database.
choleaoum noticed that the level field of created categories was one too high. Also some missing trim()'s were added to clean input.
The category entries for generated categories had 0 as store_id. Changed this to the ids of actual stores views.
Pull request by Jessica Garcia Santana
- Support for import of a single custom weee attribute (Waste Electrical and Electronic Equipment taxes)
- Importer now invalidates compound products (configurable, bundle, group) when one of its members has errors.
- Fixed missing price in test file a-configurable.xml
- Configurable product super attribute check now allows attributes with frontend_input 'boolean'
- Product url suffix and category url suffix no longer default to '.html' when there is no value in core_config_data, in stead the value from config.xml is taken
Speed optimizations:
-
msi, source items: import quantity and status together
-
stock items (qty, is_in_stock, ...) large speed gain by bundling queries per attribute code
Magento 2.3: Import of source items.
Pull request by Jeroen Nijhuis / Epartment
- Updated product-import.xsd to use correct element names for linked product types (related, cross-sell, up-sell)
- Adjusted samples to reflect changes
Updated integration test to import all example xml files.
I made the importer's behaviour for empty values more explicit in import.md, especially for empty select and multiselect attributes.
Fixed the fatal error that occurred when a select was set to null.
Pull request by Antonino Bonumore / Emergento
Existing option values are now only loaded per attribute, when it is needed. Newly created option values are given the sort order that matches their position.
The cache manager allows you to refresh any of product importer's caches.
Category info and option values are no longer reloaded from the database every batch. Newly created option values are given a fixed sort order of 10000.
Special case: if product A links to product B (for instance upsell), A and B in the same batch, and product B could not be created, the importer threw an exception up until now. I thought this could only occur in case of importer error, but apparently it also occurs when the input data is wrong. Therefore adding an error to product A suffices. Product A is still imported, but without the reference to the non-existing product B.
- By default, the importer does not delete images. Images are only added and updated.
If you want the importer to delete existing product images that are not present in the current import, use this
$config->imageStrategy = ImportConfig::IMAGE_STRATEGY_SET;
This will set images as they are named in the import. However, the importer will still not remove all images if none are added to a product. This is a safety precaution.
-
If the product type is unknown, you can ask the library for the Product, by giving the sku:
$product = $importer->getExistingProductBySku($sku);
or the id
$product = $importer->getExistingProductById($id);
The importer will return an object with the correct class, or false if no product with the id or sku could be found.
composer.json should not contain a version number
see getcomposer
Images with _[d]. (where [d] is a series of decimals) in the filename were duplicated on updates.
Added the option to remove category path url-rewrites.
If a shop does not use category paths in its urls, url_rewrite generation can be simplified a lot. This saves time and reduces the size of the url_rewrite table.
Based on the ideas from fisheyehq/module-url-rewrite-optimiser
Publication on Github, into the public domain.