Question

How do you delete a attribute value with magmi?

<?hp
$prod[sku] = '1';
$prod[attribute1] = '';

$prod[sku] = '1';
$prod[attribute1] = null;

$prod[sku] = '1';
$prod[attribute1] = false;
?>

I tried these cases and none worked

Was it helpful?

Solution

I would recommend reading the Magmi Empty Values documentation.

Magmi can assign empty values to an attribute, depending on the mode you select. As far as actually unassigning the attribute from the product, doing so would require you to delete the product and reimport it with the correct attribute set. The reason being, attribute associations are tied to attribute sets, which in turn are tied to products. You can only assign a blank or empty value for that attribute without deleting the product.

There are two other ways you could do what you're attempting to do.

  1. Use the Product Deleter plugin to delete the product, then re-import it with the correct attribute values.

  2. Create a custom Magmi plugin that detects the blank attribute values, checks the product in Magento to see if it has that attribute, then deletes it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top