Hello. We’ve made some improvements to product import. Please try the new Advanced products import [Beta] add-on on http://dev.demo.cs-cart.com and tell us what you think.
We also released this free add-on on the Marketplace, but it will work only in version 4.7.2 and newer ones (only these versions have the necessary hooks). We’re planning to include this functionality in CS-Cart and Multi-Vendor 4.8.1, and now is the best time to suggest improvements.
Why Are We Updating Product Import?
We received multiple requests from our clients to improve product import. The goal was to reduce the time spent by administrators on importing products and checking the results. We considered 2 primary use cases:
- Regular updates of product data from files provided by your suppliers.
- One-time modification of properties for multiple products.
What Has Changed?
We’ve added a new page Products (advanced) in the Administration → Import data menu (so that you can still use the old import, if necessary). The advanced import is based on presets: you create and configure them once, and then you just import files as provided by your suppliers. A preset is a set of instructions that tells CS-Cart how to interpret the CSV file that is being imported. It allows you to:
1. Match product properties in CS-Cart with columns from the imported files. Once you create the preset, you’ll have the Fields mapping tab. So, if a CSV file from your supplier has product names in the column called Item, then you just select the Product name property for that column, and you no longer have to change it in the CSV file every time you get a new one from your supplier.
2. Alter the values in columns according to specific rules. For example, entering mul($value, 1.2) as a modifier will multiply each value in the column by 1,2 during import. It’s a convenient way to add 20% to all prices automatically. The full list of modifiers is available on the preset editing page on the Fields mapping tab.
3. Run the import automatically via CRON. To run the import, use the following command:
php {/path/to/store}/{admin_panel_script}.php --dispatch=advanced_import.import --preset_id={ID_of_the_preset} -pFor example:
php /var/www/html/example.com/admin.php --dispatch=advanced_import.import --preset_id=1 -pHow to Try the New Import
If you have CS-Cart or Multi-Vendor 4.7.2 or newer, you can download the add-on from the Marketplace and install it in your store as described in the documentation. Alternatively, if you don’t want to install a Beta add-on in your store, you can try it on http://dev.demo.cs-cart.com/admin.php:
1. Go to Add-ons → Manage add-ons.
2. Switch to the Browse all available add-ons tab.
3. Find the Advanced Products Import [Beta] add-on and click Install.
4. Once the add-on is installed, go to Administration → Import data → Products (advanced). You’ll be able to create import presets and use them.
We’re looking forward to your feedback about this new add-on in this topic.