I have created a custom product attribute named 'product_custom_label' on Magento ver. 2.1 which I been showing on product listing page. For updating its values I have provided the client with the CSV upload sheet like so:

sku | product_custom_label
d-12  new arrival
d-13  discounted

Updating the values is fine , but what I faced a problem is when I have to empty these values .

If I just remove the values from product_custom_label in the CSV, the attribute values are not emptied. I have already prepared a script to remove these values programatically but I wonder is not there a Magento way to remove/empty the values that we upload through csv?

The same problem is faced when I update the special price of the product.

So, is there any Magento way to empty out the value from a specific custom product attribute, or we just have to rely on mass edit functionality?

  • which magento2 version you are using? – Rakesh Varma Nov 15 '19 at 7:35
  • as specifed in the question i am using magento 2.1 – Kumar Nov 15 '19 at 9:19
  • In magento 2.1 this is empty functionality not available by default. – Rakesh Varma Nov 15 '19 at 9:22
  • @RakeshVarma , so what should be informed to client in such case , the mass edit option ? – Kumar Nov 15 '19 at 9:23
  • Yes, that is the only option as now. – Rakesh Varma Nov 15 '19 at 9:49

Only Available in 2.3.x

You can unset the value of an attribute by passing __EMPTY__VALUE__ in your column name. You can change the value define in Empty attribute value constant

See the screenshot. enter image description here

|improve this answer|||||
  • i do not see any option like this in our magento setup , it must be something new introduced in latest version , i have checked in magento 2.1 and magento 2.2 . – Kumar Nov 15 '19 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.