Question about Importing Data 4.10.3

I am actually using the import function and have a problem with a feature field.
This field is configured as “product search via filer” and it has only 2 options

When I import, it imports the value correctly.
My problem is when I update existing products : if I have a product that has a value and I want to clear it, it does not work. If the imported field is empty when updating, it does not clear the value and leave the old one.

My question : how can I get import an empty value that will erase the registred one ?

Example : The field has value “ONE”.
When updating, the mapping is : Colum Name : NUMBER / Property in cs : NUMBER / Example : /
But it leaves the value “ONE” instead ot deleting it.

Hope it’s clear :slight_smile:
Thanks for help.

Hi!

The only way here is to use the Features field:
https://docs.cs-cart.com/latest/user_guide/manage_products/import_export/fields_format.html#features

You will have to pass there only those features, that need to be present for the product. All the others will be removed. In the import mapping, select the Features (Features (Deprecated)) variant.

Thanks. It works perfect !

1 Like

I have two more question about this import :slight_smile:
When I want to create an import giving the path of an URL for the file, I cannot edit the fields mapping. They are no selectable. Is it normal ?
Because it’s fully working when using a local file…

And second question, when using a local file, where is the file recorded on server ?

So try it

https://domain.com/ADMIN.php?dispatch=advanced_import.import.import&preset_id=7

Another question : is it possible to launch the import via an http adress instead of the cron ?

for example if the cron is : php /path/to/cart/ADMINPAGE.php -p --dispatch=advanced_import.import.import --preset_id=7, what would be the http `?

So try it

https://domain.com/ADMIN.php?dispatch=advanced_import.import.import&preset_id=7

it’s the first thing I try, but it does not work, it gives a 404 error.

You are right. The request should use the POST method. So there is no ability to run it with an URL without code modifications

I found how to do it by http.
We should add “&start_import=1” at the end of the line

Still to have to solve those two points :slight_smile:
When I want to create an import giving the path of an URL for the file, I cannot edit the fields mapping. They are no selectable. Is it normal ?
Because it’s fully working when using a local file…

And second question, when using a local file, where is the file recorded on server ?

After entering the URL, are you saving the import? If so, the file should be retrieved every time you select the fields mapping tab. Are there any error messages?

Local files are saved in /var/files/“company_id”/

After entering the URL, I saved, but I cannot edit the fields.
Impossible to map. There are no error message just no fields does appear (see image)

That is strange. I use an FTP link for one of mine and haven’t had any issues. Hopefully @CS-Cart_team can help.

As I can only see a small part of the page, I can only assume that the screenshot was taken from the vendor’s panel. The preset created by the marketplace administrator has been opened and cannot be changed by a vendor.

When I update my import file by FTP, it does not work when I click import as it does not recognize the file. If I refresh the preset by clicking F5, everything is now working.

I have checked with CS-Cart support :
It’s really weird because it works on their side when they access to our store.
But not on mine :confused:

I’ve searched what can cause this by my side without success…
I can only abandon :frowning:
or do it manually by refreshing the preset…

If anyone could have an idea where is the bug ?

Maybe it’s browser related. Have you tried a different browser?

Thanks thetool trying help me :slight_smile:

I’ve made some tests on my machine : using chrome, firefox or edge is the same : it does not work.

But I’ve tested on another computer and it works.
So it comes from this specific computer and not from the browser… Really weird.