I want to call an external web service when user find a product by CatalogSearch. Any idea to do this? I have a SOAP function to call at my ERP, but i don\’t know where i can put this function to call my web service.

Exactly I have a product catalog in my ERP. In Magento users search SKU number in the search input of the header in the Magento catalog search, and i would like to find the product with that SKU in my ERP.

This is what I'm told in another forum. What do you think?

The easiest way is probably to :

Create a Magento Module;
Create a new Helper;
Add your ERP function to the Helper;
Call your helper function (something like Mage::getHelper('path/to/helper')->MyERPFunction();
| improve this question | | | | |
  • you mean like live search from your ERP ? Is your ERP up to live traffic and potential DDoS ing ? – Anton S Feb 17 '14 at 9:27
  • Yes I would like do live search with my ERP and is prepared to live traffic and DDoS. Do you have any idea how? – xabikip Feb 17 '14 at 9:47
  • If this doesn't add value to the customer this approach is not so good, because adding latency to the request (because php will wait for the http request) lowers your conversion. Beside of this, what is your problem? – Fabian Blechschmidt May 21 '14 at 15:24
  • I'd also like to know; what are you trying to achieve by letting your ERP know what users are searching for in Magento? Maybe we can suggest an alternative. As Fabian said, it would be bad to incorporate this into your typical PHP code as the customers' request will be delayed, possibly by a lot. – musicliftsme Aug 27 '14 at 13:46

Best way would be to implement a web service for your ERP that you can access with REST request via javascript that maps links to your products inside Magento

IF you like to use Magento for search results then it would be just wiser to sync up your catalog with Magento and ensure that it is up to date and have Magento handle the search that it is already doing.

| improve this answer | | | | |
  • My ERP already have a web service that allow accessed as REST. What interests me is not having catalog in Magento and when the user search to find a product, call my ERP to find this product. But I don't know where i'm do the call to my ERP to find products when user introduce some term in the search input. – xabikip Feb 17 '14 at 11:37
  • what would be the point of this? – Anton S Feb 18 '14 at 9:45
  • Sorry, do not understand what you mean. Point of what? – xabikip Feb 18 '14 at 9:54
  • the point of making a api call to ERP when you already have all the product information in Magento ? – Anton S Feb 18 '14 at 10:00
  • I don't have products info in Magento. I have product info in my ERP and I would like to find a product in my ERP when user search a term in search input. You understand? I would like to know where do the call to my ERP to find the products. That is the URL to call my ERP myerp.com/wsa/wsa1/wsdl?targetURI=urn:comp:movil – xabikip Feb 18 '14 at 10:09

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