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.

  • Not working with before also i m working with M2.2 – MageLerner Mar 28 at 5:50
  • try this one eav_collection_abstract_load_before – Rakesh Donga Mar 28 at 5:53
  • Not working eav_collection_abstract_load_before – MageLerner Mar 28 at 5:59

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;

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.