0

I would like to call magento SOAP using Javascript or Jquery to list the products. Anyone know how to do this?

closed as too broad by 7ochem, Rajeev K Tomy, liyakat, Fabian Schmengler, Keyul Shah Jul 6 '15 at 16:12

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1

I highly recommend to NOT use SOAP. I think SOAP with JS is horrible, because you can not easily create all stubs and stuff, which you canc reate in every other language - if you can, do it!

Instead I recommend to use the REST API: http://www.magentocommerce.com/api/rest/introduction.html#RESTAPIIntroduction-Products

  • Thank you for your answer, we have created an angular js app, and I need to get product list, add to cart then order ... I think that magento REST API doesn't allow to create an order. It Only allow to list data – Mohamed Jul 6 '15 at 11:46
  • But it is kinda easy to enhance the REST API to fullfill your requirements. For some cases there are already writing operations but order management is a bit of a problem with REST. – Nils Preuß Jul 6 '15 at 13:53
1

I recomment using a JSON adapter for the API instead, which works much nicer with JavaScript than SOAP. You can use the same API as XML-RPC (i.e. SOAP v1)

I created a very simple adapter here: https://github.com/sgh-it/jsonrpc

More details in this similar question: How to access the Magento API from native client with JavaScript

  • I have already checked out your adapter, but I didn't understand how to use it, I have imported the file into magento. Can you provide me with an example on how to list all products for example if my link is "192.168.59.132/magento/index.php/api/v2_soap/?wsdl" ? – Mohamed Jul 6 '15 at 13:33

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