0

I want to use 2 observer on 'sales_order_place_after' this observer as i have checked if i place one observer it works fine but how can i run 2 observer with one event.

<event name="sales_order_place_after">
    <observer name="sales_order_place_after"
              instance="Hl\SendEmail\Observer\CustomerNewOrderObserver"/>
    <observer name="hl_sales_order_place_after" instance="Hl\SendEmail\Observer\AfterOrderObserver" />
</event>

here oage got stuck on checkout and nothing happens.

Any idea how to do that?

4
  • <event name="sales_order_place_after"> <observer name="sales_order_place_after" instance="Hl\SendEmail\Observer\CustomerNewOrderObserver"/> </event> <event name="sales_order_place_after"> <observer name="hl_sales_order_place_after" instance="Hl\SendEmail\Observer\AfterOrderObserver" /> </event>
    – Pawan
    Sep 15 at 15:55
  • 1
    you need to use separate event node for each obsever
    – Pawan
    Sep 15 at 15:56
  • @Pawan thanks for your response Yes i have used that too but it also gives me an error in xml for using same event name.
    – Prits
    Sep 15 at 16:20
  • It shows this error Element 'event': Duplicate key-sequence ['sales_order_place_after'] in unique identity-constraint 'uniqueEventName'
    – Prits
    Sep 15 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.