Is there any event on which we can observe eav attribute option save
-
24-02-2021 - |
Frage
I tried eav_entity_attribute_save_after
but its not working.
Which event triggerd during eav attrbiute save can anyone please help me on this.
Lösung
You can try with this event it's working for me.
Event name :: adminhtml_catalog_product_attribute_edit_frontend_prepare_form
In observer you can get attribute detail and option like below
public function execute(\Magento\Framework\Event\Observer $observer)
{
$attributeData = $observer->getEvent()->getAttribute()->getData(); /* for attribut data */
$optionData = $observer->getEvent()->getAttribute()->getSource()->getAllOptions();
echo '<pre>';print_r(attributeData);exit();
echo '<pre>';print_r($optionData);exit();
return $this;
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit magento.stackexchange