8

I have a custom multiselect field in Products edit section.

enter image description here The values in the multiselect values from my custom table. If I click on the save button in Manage Products section by selecting any one value. The changes need to be saved into my table. How can I do it with Observer.

3

2 Answers 2

3

Follow this link for the event catalog_product_save_after to save your value. You can get your value in observer file and initiate your model object and save value in your table or use direct SQL queries to save in your table.

1
  • I got the product in observer using $product = $observer->getProduct(); .But how can I get my custom field value.
    – Vindhuja
    Commented Jan 31, 2017 at 11:52
-1

@V.P

If attribute is single then Try using $product->getMycustomattribute();

if attribute is single_value then try $product->getSingleValue();

1
  • In save after event you cannot set the value
    – Avesh Naik
    Commented Jun 22, 2018 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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