Coder Social home page Coder Social logo

php-magento-api-sandbox's Introduction

Place a magento order via API

This is a sandbox module to place a order in a Magento 2 shop via api. We use it as a demo application for our OpenTrigger System.

The API examples are mostly taken from this magento.stackexchage.com entry

Video demonstration

https://www.youtube.com/watch?v=bM9SWjf4cbc

Create api key in Magento:

  • Go to: System -> Integrations -> "Add new integration"
  • Create a new Integration with sufficient permissions (e.g. set Ressource Access to "All" if you are just playing around)
  • Note down the created Access Token for usage in place-order.php

Configure place-order.php

Set valid values for $api_url, $token and $sku.

Execute order

php place-order.php

php-magento-api-sandbox's People

Contributors

grienauer avatar nebel54 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

php-magento-api-sandbox's Issues

Gives errors on magento 2.1

Ever since i upgraded to magento 2.1 the orders wont get created and give us a error.

string(262) "{"message":"Gelieve de verzendgegevens van dit adres te controleren. %1","parameters":["Vul alstublieft de voornaam in. Vul alstublieft de achternaam in. Vul de straatnaam in. Voer de plaats in. Vul het telefoonnummer in. Vul de postcode in. Voer het land in."]}"

In short this error says that the shipping details are incorrect and that we need to fill in all information even though the info is there and worked fine before.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.