0

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

4

2 Answers 2

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

2
  • 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 Commented Jul 6, 2015 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. Commented Jul 6, 2015 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

1
  • 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" ? Commented Jul 6, 2015 at 13:33

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.