Try The Advanced Import Of Products

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.
The problem here is that suppliers provide data in various forms: the column names may be different from what is required by CS-Cart, and you may need to alter the imported values a bit (for example, if you’d like to raise all prices by a certain percent). The new import will address those problems, along with some others.



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} -p
For example:
php /var/www/html/example.com/admin.php --dispatch=advanced_import.import --preset_id=1 -p
How 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.

Very good ? does it also allow saving of product import name so we could have 5 mapped templates for 5 different suppliers

Hello ikoshkin,

It looks promising
In the current state of development, Can you import configurable products and their variations?
It seemed to me that the "product_type" field was not available.
Thank you
Josep

Very good ? does it also allow saving of product import name so we could have 5 mapped templates for 5 different suppliers


Yes, it does. That's the point of having multiple presets. I didn't take a separate screenshot for it, but the Products (advanced) page is the list of presets. What you see in the opening post of this topic is the editing page of a specific preset.

Hello ikoshkin,

It looks promising
In the current state of development, Can you import configurable products and their variations?
It seemed to me that the "product_type" field was not available.

Thank you
Josep


Hello, Josep. Glad to hear you like the idea. I've tested it on the demo just to make sure, and the import of variations worked.

The "product_type" field isn't available for selection in the template, but it actually isn't required either. Currently it is sufficient that variations follow their configurable product in the import file (without being interrupted by other products), and that they have variation options specified. It works the same way in version 4.7.2 (the docs still state that the "product_type" field is required, but they will be altered soon).

Hello, Josep. Glad to hear you like the idea. I've tested it on the demo just to make sure, and the import of variations worked.

The "product_type" field isn't available for selection in the template, but it actually isn't required either. Currently it is sufficient that variations follow their configurable product in the import file (without being interrupted by other products), and that they have variation options specified. It works the same way in version 4.7.2 (the docs still state that the "product_type" field is required, but they will be altered soon).

OK. But then, how does the system know that the product you are importing is type C, V or P?

The Advanced Products Import (Beta) add-on is now available on the Marketplace. You can now download it and try it outside our demo sites.

OK. But then, how does the system know that the product you are importing is type C, V or P?

  • When you create new variations via import, they must have the Variation options column (so it's easy to figure out what product is a V). Variations must be preceded by their parent product that doesn't have a value in Variation options (so it definitely isn't a variation). The values of Variation options are checked to make sure that the parent product has these options and variants.
  • If you update existing variations via import (for example, a price), it doesn't matter if a product is a variation, because variations have their own price, quantity, etc, just like ordinary products. A CSV file consisting just of product code, language, product name, and price can be imported just fine, and it will update the prices of variations.

How should this addon be installed after downloading the zip?

How should this addon be installed after downloading the zip?


Please use this instruction (the link to the instruction is also available on the Marketplace, in the description of the add-on, and at the end of the opening post in this topic).

Thanks. Missed this important fact:

Only the root administrator can upload add-ons from archive. The + button is not displayed for other types of administrators.

  • When you create new variations via import, they must have the Variation options column (so it's easy to figure out what product is a V). Variations must be preceded by their parent product that doesn't have a value in Variation options (so it definitely isn't a variation). The values of Variation options are checked to make sure that the parent product has these options and variants.
  • If you update existing variations via import (for example, a price), it doesn't matter if a product is a variation, because variations have their own price, quantity, etc, just like ordinary products. A CSV file consisting just of product code, language, product name, and price can be imported just fine, and it will update the prices of variations.

Hello ikoshkin,

OK, now it's clear. Thank you for your detailed explanation.

It would have been great if you could reset inventory by selecting a field such as supplier or brand name and not just the entire store. Some suppliers discontinue products and remove it from their feed. If we import a new file the discontinued product may still be show as in stock.

The goal was to reduce the time spent by administrators on importing products and checking the results.

I see how these changes will reduce the time spent on importing products. But I don't see anything that will help with checking the results. Any changes for this?

I see how these changes will reduce the time spent on importing products. But I don't see anything that will help with checking the results. Any changes for this?


As for checking the results, so far there are 2 things may come in handy:

1. The Advanced Products Import add-on has the preview of the first line in the imported file. Previously you'd have absolutely no idea what was inside the CSV file unless you had opened it in the spreadsheet editor before the import. Now you get to know what columns are in the file. You can also select to what product property each column goes, and you can view the value of the first line in the imported file (and how it will look once the modifiers are applied).

2. Starting with version 4.7.1, there is a saved search called "Recently updated" on the product list page. It allows you to search for products that were updated within the last hour (or you can use the advanced search to specify the time period). The purpose of this search was exactly to help with checking the results of the import. We just released it earlier, and not as a part of this add-on, because the change isn't so drastic.

Hi ikoshkin please test this addon its very useful and more flexible. Please add XML structure because the most store site and company not use only .csv format

please follow this link. You can change a lot of thinks. i use this addon if you want i can sent.

import pro

test site

**we can use the same column, for different column. its very useful. Example I want to use a sample column for all of the following

Page title

Meta description

Meta keywords

search word

***i test 6000 products in demo sites gives "processing" screen and didnt work.

****in demo sites in "options" "Delete all existing product files before import" and the others didint works too

I see that the google feed import has changed as it requires mapping of the fields. Before i used to use format such as below:

(Google export features) GTIN: T[5024764864]; (Google export features) Google product category (US): S[Hardware > Tools]; (Google export features) Google product type: S[Hardware > Tools]; (Google export features) Condition: S[new]; (Google export features) Brand: T[Silverhook]; (Google export features) Availability: S[in stock]; (Google export features) MPN: T[SLH8388]
How should this data be imported using this addon?

As for checking the results, so far there are 2 things may come in handy:

1. The Advanced Products Import add-on has the preview of the first line in the imported file. Previously you'd have absolutely no idea what was inside the CSV file unless you had opened it in the spreadsheet editor before the import. Now you get to know what columns are in the file. You can also select to what product property each column goes, and you can view the value of the first line in the imported file (and how it will look once the modifiers are applied).

2. Starting with version 4.7.1, there is a saved search called "Recently updated" on the product list page. It allows you to search for products that were updated within the last hour (or you can use the advanced search to specify the time period). The purpose of this search was exactly to help with checking the results of the import. We just released it earlier, and not as a part of this add-on, because the change isn't so drastic.

#1 isn't checking results its setting up the import. #2 is already implemented functionality and isn't in the beta. So I guess the beta doesn't have anything to help with checking results. Bummer. I was hoping for something like reporting which specific records had errors and didn't import and reporting of which items were created new and which were updated (not just counts).

Hi ikoshin,

Where can we see the list of modifiers and their syntax?

You listed the following example in your post but there is no documentation for it.

For example, entering mul($value, 1.2)

Hi ikoshin,

Where can we see the list of modifiers and their syntax?

You listed the following example in your post but there is no documentation for it.


Hello. There is a button called "Modifiers list", which is available on the Fields mapping tab (please see the screenshot in the opening post of this topic). We didn't add an article in the documentation, because the add-on is still in beta and isn't a part of the standard CS-Cart package.