API: stanleystella.com

Challenge: Get data from api.stanleystella.com
  • You need the PRO-Version of the plugin
  • Create a new template in the plugins template-manager. There set this up: – twig-code: {% for r in result %}{{r.Type}}: {{r.HTMLPath}}{% endfor %}
    – unique name, e.g. “stanleystella”
    – URL: https://api.stanleystella.com/webrequest/products_images/get_json
    – set “CURL-POST”
    – Curloptions:
    CURLOPT_RETURNTRANSFER=1;CURLOPT_SSL_VERIFYHOST=0;CURLOPT_SSL_VERIFYPEER=0;CURLOPT_POST=1;CURLOPT_POSTFIELDS={ "jsonrpc" : "2.0", "method" : "call","params" : {"db_name" :"production_api","user" : "YOUR_MAILADRESS_AT_STANLEYSTELLA", "password": "YOUR_STANLEYSTELLA_PASSWORD", "StyleCode": "STTM528", "ColorCode": "C001", "LanguageCode":"de_DE" }};CURLOPT_HTTPHEADER=Content-Type: application/json
    Store that template and remember the given ID
  • Use this on a page: [jsoncontentimporterpro debugmode=10 id=ID_OF_TEMPLATE]
    Remove the “debugmode=10” in the Shortcode to remove the debug-messages. When previewing this page you should see many lines of debug messages and an answer of the API. Ideal would be some JSON-Code… and a list of items…