How to get order reference after executing sales return from zed (backend) ?

jsinha
jsinha Sr. Software Engineer Posts: 16 🧑🏻‍🚀 - Cadet

HI,
I want to create a plugin which gets the order reference along with customer details and hit the external apis with the payload as order reference and customer details.
I have also gone with ReturnCreateFormHandlerPluginInterface under the SalesReturnGui which handles the return events after executing the sales return under the Zed but it will not perform the task which I required as it has some form handler and other stuffs which I have no any requirement for the same.
I just want to get the order reference no just after executing the sales return from the backend.
It would be very helpful to me.

Best Answer

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 86 🏛 - Council (mod)
    Answer ✓

    How about hooking into the command StartReturnCommandPlugin() in the OMS?

    Take a look at the OmsDependencyProvider src/Pyz/Zed/Oms/OmsDependencyProvider.php

    You could extend that one or register your command plugin for that event .

Answers

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 86 🏛 - Council (mod)
    Answer ✓

    How about hooking into the command StartReturnCommandPlugin() in the OMS?

    Take a look at the OmsDependencyProvider src/Pyz/Zed/Oms/OmsDependencyProvider.php

    You could extend that one or register your command plugin for that event .