How do I import products via csv with empty value attribute?

How do I import products via csv with empty value attribute?

Avatar image
May 07, 2014
Vincenzo di Modugno wrote
Hello,
I have a problem with the import of the products.

If the csv file to be imported imposed on the value of an attribute in the attribute is already empty and valued, after the import is still the old value and not the field is emptied.

You need to pass in the import file specifies a particular attribute by importing empty?

For example, NULL, or other

Thanks in advance for your reply.

Vincenzo Di Modugnoc
Reply
7 Answers
Avatar image
May 07, 2014
Ira Kobylianska agent wrote
Hello Vincenzo,

Thank you for your reply.

Actually, import was developed in such vay, in order to not to rewrite values if column is empty (in most cases, if column does not have values, it should be skipped during import)
If you want to update your records to empty values, you can use expression during import - ''

Please note, that you have to check at your database how specific attribute is saved if empty, is not used for all attribute types.

Let us know if you have more questions
Avatar image
May 07, 2014
Vincenzo di Modugno wrote
Hello Ira,
thank you very much for the information.

Two questions:

1. By setting the expression is imported null for all sku in the csv file to import, or only where the field is empty?

2. How can I check in my database what is the null value for the attribute setting?

Thanks for availability.

Good evening.

Vincenzo Di Modugno
Avatar image
May 08, 2014
Ira Kobylianska agent wrote
Hello Vincenzo,

Thank you for your questions.

1. By setting the expression is imported null for all sku in the csv file to import, or only where the field is empty?
A: Actually, if you use the following expression:
''
it would be set for all products that are listed at your file

If you want to set 'NULL' value only for products that do not have values at your file, you have to use another expression:
IF ([CSV_COL(x)]='', NULL, [CSV_COL(x)])

2. How can I check in my database what is the null value for the attribute setting?
A: You can use search option to find all products with 'NULL' values for specific attribute. Please select needed Attribute and search for 'NULL':
http://screencast.com/t/d0Sm1Rff1q0g

Let us know if you have more questions
Avatar image
Jun 05, 2014
Vincenzo di Modugno wrote
Hello Ira,
I tried to import a csv file, following your indication for the column expression.

Unfortunately, after the import, I changed the value previously set but I did not put it to NULL.

If the target field is of type "Currency" set to 0, while if the target field is a "Datetime" sets an incorrect date.

Is there a way through the column expression for a System.DBNull write to the database?

Below is the expression used, in case I had done something wrong at the level of syntax, example if the attribute value is 'no_selection' imposed NULL.

I testing the expression correctly returns the result as NULL in the database but as I said it does not.

IF ([CSV_COL (4)] = 'no_selection', NULL, [CSV_COL (4)])

I look forward to yours.

Thank you and good day.

See you soon.

Vincenzo Di Modugno.
Avatar image
Jun 06, 2014
Dmytro Grycelyak agent wrote
Hello Vincenzo,

The Store Manger for Magento does not allow to replace the existing value with "NULL" or empty value.
You may replace the existing value with ' ' - space or '0', but not 'NULL' or nothing.
Avatar image
Jun 06, 2014
Vincenzo di Modugno wrote
Thank you so much for the help Volodymyr.

is already provided in new developments to be implemented this functionality?

Have a nice day.

Vincenzo Di Modugno
Avatar image
Jun 09, 2014
Dmytro Grycelyak agent wrote
Hello Vincenzo,

Please specify more exactly which developments do you mean?