I
I
ipokos2017-03-10 21:24:56
Magento
ipokos, 2017-03-10 21:24:56

How and where to return the result from the observer?

I intercept an event (for example, adding a product to the cart).
I get an array $array = $observer->getEvent()->getData('quote_item')->getData()
How to pass it (and where) correctly in order to process it?
Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
imdeveloper, 2017-03-13
@link_web

Well, you intercepted the event, received some data, you can process it in the observer file as you need and continue executing the code. Or you are doing something wrong. Because all observers are declared in the module config, and then work directly with the intercepted event in the file that you declared under the event

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question