6

I am new to Magento extension development and looking for a way to implement a connection to our WMS. I have done some tutorials on extension development, but am a little stuck on where or how to make this thing.

My idea is as follows: whenever Magento looks for the inventory information on certain product (either in the front end or back end), I want it to refer to our WMS for actual information.

So I am thinking of an extension along the lines of:

  1. Hook into the "request stock info" event (does that even exist?)
  2. Call my extension's method getStockInfo($sku)
  3. My getStockInfo($sku) will reply with correct information from my WMS.

Is this the way to implement functionality like this, or should I use different techniques?

4
  • You may want to see this: nicksays.co.uk/magento-events-cheat-sheet-1-9 Oct 1, 2015 at 12:03
  • @AdarshKhatri thanks, I already found those. Main reason for my question is also if the idea is viable. Oct 1, 2015 at 12:46
  • Are you running your WMS in same networking/host of store? I believe that a request for an api / web service over the internet for each stock information called can make your site slower than desired without an appropriate cache or an ajax call. Nov 10, 2015 at 0:14
  • @denis the wms will be on the same host Nov 10, 2015 at 7:46

1 Answer 1

2

One approach is to find the appropriate function calls an use plugins to intercept the calls with your own code. However you need to be careful about performance if every such access now does a REST call or similar to a remote system. You don't want to penalize site performance.

What the Magento Commerce Order Management (COM) solution does is send messages between the web store and COM to keep the databases in sync. This approach can be more robust if network outages or similar occur. Each system has its own copy of the data (you decide which one is "truth"). (Our order management system is used to sync multiple sales channels, including the Magento web store, with multiple warehouse systems to do things like pick the best warehouse to ship goods from.)

As a hint of future directions, we are looking to see if we can open this up - can we make some of the things we do internally easier for others to do as well. It will probably be months away however - not sure your time line. But it should make such integrations easier.

Your Answer

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

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