0

magento2.4.5 CE Before generating the order, I need to call the erp third-party system to verify whether the inventory is satisfied and whether the product is removed from the shelves. How should I operate

1 Answer 1

0

You should observe on order place before event, and add your code in that observer to consult with 3rd party system related to inventory. If all good is received from the 3rd party, you can simply return from the observer, and in case there's an issue with inventory, you can return an exception from the observer with relevant message, which will stop the placing of order on your website.

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.