mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[Docs] Improved coping UX
This commit is contained in:
parent
4e55639135
commit
dd39ffa6a0
90 changed files with 403 additions and 546 deletions
|
|
@ -24,15 +24,15 @@ To test the documentation before a commit:
|
|||
|
||||
* Download the documentation requirements:
|
||||
|
||||
`$ pip install -r requirements.txt`
|
||||
`pip install -r requirements.txt`
|
||||
|
||||
This makes sure that the version of Sphinx you'll get is >=1.4.2!
|
||||
|
||||
* Install [Sphinx](http://www.sphinx-doc.org/en/stable/)
|
||||
|
||||
`$ pip install Sphinx`
|
||||
`pip install Sphinx`
|
||||
|
||||
* In the `docs` directory run `$ sphinx-build -b html . build` and view the generated HTML files in the `build` directory.
|
||||
* In the `docs` directory run `sphinx-build -b html . build` and view the generated HTML files in the `build` directory.
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ To create a new admin user use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/users/ \
|
||||
curl http://demo.sylius.com/api/v1/users/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -128,7 +128,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/users/ \
|
||||
curl http://demo.sylius.com/api/v1/users/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -191,7 +191,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/users/ \
|
||||
curl http://demo.sylius.com/api/v1/users/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -257,7 +257,7 @@ To see the details for the admin user with ``id = 9`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/users/9 \
|
||||
curl http://demo.sylius.com/api/v1/users/9 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -317,7 +317,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/users/ \
|
||||
curl http://demo.sylius.com/api/v1/users/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -405,7 +405,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/users/9 \
|
||||
curl http://demo.sylius.com/api/v1/users/9 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -434,7 +434,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/users/9 \
|
||||
curl http://demo.sylius.com/api/v1/users/9 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT
|
||||
|
|
@ -500,7 +500,7 @@ To partially update the admin user with ``id = 9`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/users/9 \
|
||||
curl http://demo.sylius.com/api/v1/users/9 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -544,7 +544,7 @@ To delete the admin user with ``id = 9`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/users/9 \
|
||||
curl http://demo.sylius.com/api/v1/users/9 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
@ -565,7 +565,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/users/6 \
|
||||
curl http://demo.sylius.com/api/v1/users/6 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ To create a new cart for the ``shop@example.com`` user in the ``US_WEB`` channel
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/carts/ \
|
||||
curl http://demo.sylius.com/api/v1/carts/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -220,7 +220,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/carts/ \
|
||||
curl http://demo.sylius.com/api/v1/carts/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -287,7 +287,7 @@ To see the first page of the paginated carts collection use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/carts/ \
|
||||
curl http://demo.sylius.com/api/v1/carts/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ To see details of the cart with ``id = 21`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/carts/21 \
|
||||
curl http://demo.sylius.com/api/v1/carts/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -474,7 +474,7 @@ To delete the cart with ``id = 21`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/carts/21 \
|
||||
curl http://demo.sylius.com/api/v1/carts/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
@ -522,7 +522,7 @@ to the cart with id = 21 (assuming, that we didn't remove it in the previous exa
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/carts/21/items/ \
|
||||
curl http://demo.sylius.com/api/v1/carts/21/items/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -639,7 +639,7 @@ To change the quantity of the cart item with ``id = 57`` in the cart of ``id = 2
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/carts/21/items/57 \
|
||||
curl http://demo.sylius.com/api/v1/carts/21/items/57 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -661,7 +661,7 @@ Now we can check how does the cart look like after changing the quantity of a ca
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/carts/21 \
|
||||
curl http://demo.sylius.com/api/v1/carts/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -825,7 +825,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/carts/21/items/58 \
|
||||
curl http://demo.sylius.com/api/v1/carts/21/items/58 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ To see the details of the channel with ``code = US_WEB`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/channels/US_WEB \
|
||||
curl http://demo.sylius.com/api/v1/channels/US_WEB \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ To address the cart for a user that lives in ``Los Angeles`` in the United State
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/checkouts/addressing/21 \
|
||||
curl http://demo.sylius.com/api/v1/checkouts/addressing/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -124,7 +124,7 @@ To check the checkout process state for the cart with `id = 21`, we need to exec
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/checkouts/21 \
|
||||
curl http://demo.sylius.com/api/v1/checkouts/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -286,7 +286,7 @@ Of course, you can specify different shipping and billing addresses. If our user
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/checkouts/addressing/21 \
|
||||
curl http://demo.sylius.com/api/v1/checkouts/addressing/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -347,7 +347,7 @@ To check available shipping methods for the previously addressed cart, you can u
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/checkouts/select-shipping/21 \
|
||||
curl http://demo.sylius.com/api/v1/checkouts/select-shipping/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json"
|
||||
|
||||
|
|
@ -421,7 +421,7 @@ To choose the `DHL Express` method for our shipment (the cheapest one), we can u
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/checkouts/select-shipping/21 \
|
||||
curl http://demo.sylius.com/api/v1/checkouts/select-shipping/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -627,7 +627,7 @@ To check available payment methods for the cart that has a shipping methods assi
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/checkouts/select-payment/21 \
|
||||
curl http://demo.sylius.com/api/v1/checkouts/select-payment/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json"
|
||||
|
||||
|
|
@ -685,7 +685,7 @@ To choose the ``Bank transfer`` method for our shipment, simply use the followin
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/checkouts/select-payment/21 \
|
||||
curl http://demo.sylius.com/api/v1/checkouts/select-payment/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -737,7 +737,7 @@ To check the fully constructed cart with `id = 21`, use the following command:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/checkouts/21 \
|
||||
curl http://demo.sylius.com/api/v1/checkouts/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json"
|
||||
|
||||
|
|
@ -918,7 +918,7 @@ To finalize the previously built order, execute the following command:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/checkouts/complete/21 \
|
||||
curl http://demo.sylius.com/api/v1/checkouts/complete/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT
|
||||
|
|
@ -941,7 +941,7 @@ To finalize the previously built order (assuming that, the previous example has
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/checkouts/complete/21 \
|
||||
curl http://demo.sylius.com/api/v1/checkouts/complete/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/countries/ \
|
||||
curl http://demo.sylius.com/api/v1/countries/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -97,7 +97,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/countries/ \
|
||||
curl http://demo.sylius.com/api/v1/countries/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -142,7 +142,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/countries/ \
|
||||
curl http://demo.sylius.com/api/v1/countries/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -221,7 +221,7 @@ To see the details of the country with ``code = US`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/countries/US \
|
||||
curl http://demo.sylius.com/api/v1/countries/US \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -279,7 +279,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/countries/ \
|
||||
curl http://demo.sylius.com/api/v1/countries/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -357,7 +357,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/countries/PL \
|
||||
curl http://demo.sylius.com/api/v1/countries/PL \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/currencies/ \
|
||||
curl http://demo.sylius.com/api/v1/currencies/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -97,7 +97,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/currencies/ \
|
||||
curl http://demo.sylius.com/api/v1/currencies/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -152,7 +152,7 @@ To see the details of the currency with ``code = PLN`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/currencies/PLN \
|
||||
curl http://demo.sylius.com/api/v1/currencies/PLN \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -210,7 +210,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/currencies/ \
|
||||
curl http://demo.sylius.com/api/v1/currencies/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -297,7 +297,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/currencies/PLN \
|
||||
curl http://demo.sylius.com/api/v1/currencies/PLN \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/customers/ \
|
||||
curl http://demo.sylius.com/api/v1/customers/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -149,7 +149,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/customers/ \
|
||||
curl http://demo.sylius.com/api/v1/customers/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -213,7 +213,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/customers/399 \
|
||||
curl http://demo.sylius.com/api/v1/customers/399 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -272,7 +272,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/customers/ \
|
||||
curl http://demo.sylius.com/api/v1/customers/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -442,7 +442,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/customers/399 \
|
||||
curl http://demo.sylius.com/api/v1/customers/399 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -469,7 +469,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/customers/399 \
|
||||
curl http://demo.sylius.com/api/v1/customers/399 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT
|
||||
|
|
@ -548,7 +548,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/customers/399 \
|
||||
curl http://demo.sylius.com/api/v1/customers/399 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -584,7 +584,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/customers/399 \
|
||||
curl http://demo.sylius.com/api/v1/customers/399 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
@ -623,7 +623,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/customers/7/orders/ \
|
||||
curl http://demo.sylius.com/api/v1/customers/7/orders/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/exchange-rates/ \
|
||||
curl http://demo.sylius.com/api/v1/exchange-rates/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -120,7 +120,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/exchange-rates/ \
|
||||
curl http://demo.sylius.com/api/v1/exchange-rates/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -190,7 +190,7 @@ To see the details of the exchange rate between ``Euro (code = EUR)`` and ``Brit
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/exchange-rates/EUR-GBP \
|
||||
curl http://demo.sylius.com/api/v1/exchange-rates/EUR-GBP \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -270,7 +270,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/exchange-rates/ \
|
||||
curl http://demo.sylius.com/api/v1/exchange-rates/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/exchange-rates/EUR-GBP \
|
||||
curl http://demo.sylius.com/api/v1/exchange-rates/EUR-GBP \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -386,7 +386,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/exchange-rates/EUR-GBP \
|
||||
curl http://demo.sylius.com/api/v1/exchange-rates/EUR-GBP \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT
|
||||
|
|
@ -447,7 +447,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/exchange-rates/EUR-GBP \
|
||||
curl http://demo.sylius.com/api/v1/exchange-rates/EUR-GBP \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/locales/ \
|
||||
curl http://demo.sylius.com/api/v1/locales/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -97,7 +97,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/locales/ \
|
||||
curl http://demo.sylius.com/api/v1/locales/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -152,7 +152,7 @@ To see the details of the locale with ``code = pl`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/locales/pl \
|
||||
curl http://demo.sylius.com/api/v1/locales/pl \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -210,7 +210,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/locales/ \
|
||||
curl http://demo.sylius.com/api/v1/locales/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -297,7 +297,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/locales/pl \
|
||||
curl http://demo.sylius.com/api/v1/locales/pl \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/orders/21 \
|
||||
curl http://demo.sylius.com/api/v1/orders/21 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -367,7 +367,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/orders/21/cancel \
|
||||
curl http://demo.sylius.com/api/v1/orders/21/cancel \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X PUT
|
||||
|
|
@ -408,7 +408,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/orders/21/shipments/21/ship \
|
||||
curl http://demo.sylius.com/api/v1/orders/21/shipments/21/ship \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X PUT
|
||||
|
|
@ -451,7 +451,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/orders/21/payments/21/complete \
|
||||
curl http://demo.sylius.com/api/v1/orders/21/payments/21/complete \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X PUT
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ To see the details of the payment method with ``code = cash_on_delivery`` use th
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/payment-methods/cash_on_delivery \
|
||||
curl http://demo.sylius.com/api/v1/payment-methods/cash_on_delivery \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ To see the details of the payment with ``id = 20`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/payments/20 \
|
||||
curl http://demo.sylius.com/api/v1/payments/20 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ To see the first page of the paginated list of payments with two payments on eac
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/payments/\?limit\=2 \
|
||||
curl http://demo.sylius.com/api/v1/payments/\?limit\=2 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ To create a new text product attribute use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-attributes/text \
|
||||
curl http://demo.sylius.com/api/v1/product-attributes/text \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -114,7 +114,7 @@ Exemplary Response
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-attributes/text \
|
||||
curl http://demo.sylius.com/api/v1/product-attributes/text \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -185,7 +185,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-attributes/text/ \
|
||||
curl http://demo.sylius.com/api/v1/product-attributes/text/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -266,7 +266,7 @@ To see the details of the product attribute with ``code = sticker_paper`` use th
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-attributes/sticker_paper \
|
||||
curl http://demo.sylius.com/api/v1/product-attributes/sticker_paper \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -334,7 +334,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-attributes/ \
|
||||
curl http://demo.sylius.com/api/v1/product-attributes/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -576,7 +576,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-attributes/mug_material \
|
||||
curl http://demo.sylius.com/api/v1/product-attributes/mug_material \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -621,7 +621,7 @@ To partially update the product attribute with ``code = mug_material`` use the b
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-attributes/mug_material \
|
||||
curl http://demo.sylius.com/api/v1/product-attributes/mug_material \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -669,7 +669,7 @@ To delete the product attribute with ``code = mug_material`` use the below metho
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-attributes/mug_material \
|
||||
curl http://demo.sylius.com/api/v1/product-attributes/mug_material \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ To create a new product option use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-options/ \
|
||||
curl http://demo.sylius.com/api/v1/product-options/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -145,7 +145,7 @@ Exemplary Response
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-options/ \
|
||||
curl http://demo.sylius.com/api/v1/product-options/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -207,7 +207,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-options/ \
|
||||
curl http://demo.sylius.com/api/v1/product-options/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -340,7 +340,7 @@ To see the details of the product option with ``code = MUG_TYPE`` use the below
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-options/MUG_TYPE \
|
||||
curl http://demo.sylius.com/api/v1/product-options/MUG_TYPE \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -436,7 +436,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-options/ \
|
||||
curl http://demo.sylius.com/api/v1/product-options/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -714,7 +714,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-options/MUG_SIZE \
|
||||
curl http://demo.sylius.com/api/v1/product-options/MUG_SIZE \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -759,7 +759,7 @@ To partially update the product option with ``code = MUG_SIZE`` use the below me
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-options/MUG_SIZE \
|
||||
curl http://demo.sylius.com/api/v1/product-options/MUG_SIZE \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -807,7 +807,7 @@ To delete the product option with ``code = MUG_SIZE`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/product-options/MUG_SIZE \
|
||||
curl http://demo.sylius.com/api/v1/product-options/MUG_SIZE \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ To create a new product review for the product with ``code = MUG-TH`` use the be
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/ \
|
||||
curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -126,7 +126,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/ \
|
||||
curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -209,7 +209,7 @@ To see the details of the product review with ``id = 1``, which is defined for t
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1 \
|
||||
curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -283,7 +283,7 @@ To see the first page of all product reviews for the product with ``code = MUG-T
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/ \
|
||||
curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -446,7 +446,7 @@ To fully update the product review with ``id = 1`` for the product with ``code =
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1 \
|
||||
curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -493,7 +493,7 @@ To partially update the product review with ``id = 1`` for the product with ``co
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1 \
|
||||
curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -539,7 +539,7 @@ To delete the product review with ``id = 1`` from the product with ``code = MUG-
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1 \
|
||||
curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
@ -550,7 +550,7 @@ Exemplary Response
|
|||
.. code-block:: text
|
||||
|
||||
STATUS: 204 No Content
|
||||
|
||||
|
||||
Accept a Product Review
|
||||
--------------------------
|
||||
|
||||
|
|
@ -580,7 +580,7 @@ To accept the product review with ``id = 1`` from the product with ``code = MUG-
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1/accept \
|
||||
curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1/accept \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X POST
|
||||
|
|
@ -591,7 +591,7 @@ Exemplary Response
|
|||
.. code-block:: text
|
||||
|
||||
STATUS: 204 No Content
|
||||
|
||||
|
||||
Reject a Product Review
|
||||
--------------------------
|
||||
|
||||
|
|
@ -621,7 +621,7 @@ To reject the product review with ``id = 1`` from the product with ``code = MUG-
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1/reject \
|
||||
curl http://demo.sylius.org/api/v1/products/MUG-TH/reviews/1/reject \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X POST
|
||||
|
|
@ -632,4 +632,4 @@ Exemplary Response
|
|||
.. code-block:: text
|
||||
|
||||
STATUS: 204 No Content
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ To create new product variant for the product with ``code = MUG-TH`` use the bel
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/ \
|
||||
curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -154,7 +154,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/ \
|
||||
curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -230,7 +230,7 @@ Here is an example of creating a product variant with additional data for the pr
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/ \
|
||||
curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -365,7 +365,7 @@ To see the details of the product variant with ``code = medium-theme-mug``, whic
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/medium-theme-mug \
|
||||
curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/medium-theme-mug \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -432,7 +432,7 @@ To see the first page of all product variants for the product with ``code = MUG-
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/ \
|
||||
curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -587,7 +587,7 @@ To fully update the product variant with ``code = double-theme-mug`` for the pro
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/double-theme-mug \
|
||||
curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/double-theme-mug \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -657,7 +657,7 @@ To partially update the product variant with ``code = double-theme-mug`` for the
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/double-theme-mug \
|
||||
curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/double-theme-mug \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -707,7 +707,7 @@ To delete the product variant with ``code = double-theme-mug`` from the product
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/double-theme-mug \
|
||||
curl http://demo.sylius.com/api/v1/products/MUG-TH/variants/double-theme-mug \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ To create a new product use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/ \
|
||||
curl http://demo.sylius.com/api/v1/products/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -136,7 +136,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/ \
|
||||
curl http://demo.sylius.com/api/v1/products/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -204,7 +204,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/ \
|
||||
curl http://demo.sylius.com/api/v1/products/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -683,7 +683,7 @@ To see the details for the product with ``code = BMM`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/BMM \
|
||||
curl http://demo.sylius.com/api/v1/products/BMM \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -762,7 +762,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/ \
|
||||
curl http://demo.sylius.com/api/v1/products/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -1092,7 +1092,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/BMM \
|
||||
curl http://demo.sylius.com/api/v1/products/BMM \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -1138,7 +1138,7 @@ To partially update the product with ``code = BMM`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/BMM \
|
||||
curl http://demo.sylius.com/api/v1/products/BMM \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -1186,7 +1186,7 @@ To delete the product with ``code = MUG_TH`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/products/MUG_TH \
|
||||
curl http://demo.sylius.com/api/v1/products/MUG_TH \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ To create a new promotion coupon for the promotion with ``code = HOLIDAY-SALE``
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/ \
|
||||
curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -121,7 +121,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/ \
|
||||
curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -171,7 +171,7 @@ Here is an example of creating a promotion coupon with additional data for the p
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/ \
|
||||
curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -241,7 +241,7 @@ To see the details of the promotion coupon with ``code = A3BCB`` which belongs t
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/A3BCB \
|
||||
curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/A3BCB \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/ \
|
||||
curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -397,7 +397,7 @@ To fully update the promotion coupon with ``code = A3BCB`` for the promotion wit
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/A3BCB \
|
||||
curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/A3BCB \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -444,7 +444,7 @@ To partially update the promotion coupon with ``code = A3BCB`` for the promotion
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/A3BCB \
|
||||
curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/A3BCB \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -490,7 +490,7 @@ To delete the promotion coupon with ``code = A3BCB`` from the promotion with ``c
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/A3BCB \
|
||||
curl http://demo.sylius.com/api/v1/promotions/HOLIDAY-SALE/coupons/A3BCB \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ To create a new promotion use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/ \
|
||||
curl http://demo.sylius.com/api/v1/promotions/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -140,7 +140,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/ \
|
||||
curl http://demo.sylius.com/api/v1/promotions/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -229,7 +229,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/ \
|
||||
curl http://demo.sylius.com/api/v1/promotions/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -368,7 +368,7 @@ To see the details of the promotion with ``code = sd-promo`` use the below metho
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/sd-promo \
|
||||
curl http://demo.sylius.com/api/v1/promotions/sd-promo \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -440,7 +440,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/ \
|
||||
curl http://demo.sylius.com/api/v1/promotions/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -527,7 +527,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/christmas-promotion \
|
||||
curl http://demo.sylius.com/api/v1/promotions/christmas-promotion \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -551,7 +551,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/christmas-promotion \
|
||||
curl http://demo.sylius.com/api/v1/promotions/christmas-promotion \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT
|
||||
|
|
@ -629,7 +629,7 @@ To partially update the promotion with ``code = christmas-promotion`` use the be
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/christmas-promotion \
|
||||
curl http://demo.sylius.com/api/v1/promotions/christmas-promotion \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -674,7 +674,7 @@ To delete the promotion with ``code = christmas-promotion`` use the below method
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/promotions/christmas-promotion \
|
||||
curl http://demo.sylius.com/api/v1/promotions/christmas-promotion \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ To see the details of the province with ``code = PL-MZ`` which belongs to the co
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/countries/PL/provinces/PL-MZ \
|
||||
curl http://demo.sylius.com/api/v1/countries/PL/provinces/PL-MZ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://sylius.test/api/v1/countries/PL/provinces/PL-MZ \
|
||||
curl http://sylius.test/api/v1/countries/PL/provinces/PL-MZ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ To see the details of the shipment method with ``id = 20`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/shipments/20 \
|
||||
curl http://demo.sylius.com/api/v1/shipments/20 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ To see first page of paginated list of shipments with two shipments on each page
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/shipments/\?limit\=2 \
|
||||
curl http://demo.sylius.com/api/v1/shipments/\?limit\=2 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ To create a new shipping category use the below method.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/shipping-categories/ \
|
||||
curl http://demo.sylius.com/api/v1/shipping-categories/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -104,7 +104,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/shipping-categories/ \
|
||||
curl http://demo.sylius.com/api/v1/shipping-categories/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -165,7 +165,7 @@ To see the details of the shipping category with ``code = SC3`` use the below me
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/shipping-categories/SC3 \
|
||||
curl http://demo.sylius.com/api/v1/shipping-categories/SC3 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/shipping-categories/ \
|
||||
curl http://demo.sylius.com/api/v1/shipping-categories/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -310,7 +310,7 @@ To fully update the shipping category with ``code = SC3`` use the below method.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/shipping-categories/SC3 \
|
||||
curl http://demo.sylius.com/api/v1/shipping-categories/SC3 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -335,7 +335,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/shipping-categories/SC3 \
|
||||
curl http://demo.sylius.com/api/v1/shipping-categories/SC3 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT
|
||||
|
|
@ -392,7 +392,7 @@ To partially update the shipping category with ``code = SC3`` use the below meth
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/shipping-categories/SC3 \
|
||||
curl http://demo.sylius.com/api/v1/shipping-categories/SC3 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -437,7 +437,7 @@ To delete the shipping category with ``code = SC3`` use the below method.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/shipping-categories/SC3 \
|
||||
curl http://demo.sylius.com/api/v1/shipping-categories/SC3 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ To see the details of the shipping method with ``code = ups`` use the below meth
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/shipping-methods/ups \
|
||||
curl http://demo.sylius.com/api/v1/shipping-methods/ups \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl 'http://demo.sylius.com/api/v1/products/?sorting\[code\]=desc&limit=4' \
|
||||
curl 'http://demo.sylius.com/api/v1/products/?sorting\[code\]=desc&limit=4' \
|
||||
-H "Authorization: Bearer SampleToken"
|
||||
|
||||
Exemplary response
|
||||
|
|
@ -290,7 +290,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl 'http://demo.sylius.com/api/v1/products/?criteria\[search\]\[type\]=contains&criteria\[search\]\[value\]=sticker&limit=4' \
|
||||
curl 'http://demo.sylius.com/api/v1/products/?criteria\[search\]\[type\]=contains&criteria\[search\]\[value\]=sticker&limit=4' \
|
||||
-H "Authorization: Bearer SampleToken"
|
||||
|
||||
Exemplary response
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ To create a new tax category use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/tax-categories/ \
|
||||
curl http://demo.sylius.com/api/v1/tax-categories/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -115,7 +115,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/tax-categories/ \
|
||||
curl http://demo.sylius.com/api/v1/tax-categories/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -162,7 +162,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/tax-categories/ \
|
||||
curl http://demo.sylius.com/api/v1/tax-categories/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -222,7 +222,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/tax-categories/food \
|
||||
curl http://demo.sylius.com/api/v1/tax-categories/food \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -285,7 +285,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/tax-categories/ \
|
||||
curl http://demo.sylius.com/api/v1/tax-categories/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -391,7 +391,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/tax-categories/food \
|
||||
curl http://demo.sylius.com/api/v1/tax-categories/food \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -416,7 +416,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/tax-categories/food \
|
||||
curl http://demo.sylius.com/api/v1/tax-categories/food \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT
|
||||
|
|
@ -471,7 +471,7 @@ To partially update the tax category with ``code = food`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/tax-categories/food \
|
||||
curl http://demo.sylius.com/api/v1/tax-categories/food \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -513,7 +513,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/tax-categories/food \
|
||||
curl http://demo.sylius.com/api/v1/tax-categories/food \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ To see the details of the tax rate with ``code = clothing_sales_tax_7`` use the
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/tax-rates/clothing_sales_tax_7 \
|
||||
curl http://demo.sylius.com/api/v1/tax-rates/clothing_sales_tax_7 \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/tax-rates/ \
|
||||
curl http://demo.sylius.com/api/v1/tax-rates/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ To create new taxon use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/taxons/ \
|
||||
curl http://demo.sylius.com/api/v1/taxons/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -144,7 +144,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/taxons/ \
|
||||
curl http://demo.sylius.com/api/v1/taxons/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -192,7 +192,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/taxons/ \
|
||||
curl http://demo.sylius.com/api/v1/taxons/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -374,7 +374,7 @@ To see the details of the taxon with ``code = toys`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/taxons/toys \
|
||||
curl http://demo.sylius.com/api/v1/taxons/toys \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -541,7 +541,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/taxons/ \
|
||||
curl http://demo.sylius.com/api/v1/taxons/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -822,7 +822,7 @@ To fully update the taxon with ``code = toys`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/taxons/toys \
|
||||
curl http://demo.sylius.com/api/v1/taxons/toys \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -868,7 +868,7 @@ To partially update the taxon with ``code = toys`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/taxons/toys \
|
||||
curl http://demo.sylius.com/api/v1/taxons/toys \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -916,7 +916,7 @@ To delete the taxon with ``code = toys`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/taxons/toys \
|
||||
curl http://demo.sylius.com/api/v1/taxons/toys \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
@ -956,7 +956,7 @@ To change the order of products with codes ``yellow_t_shirt`` and ``princess_t_s
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/taxons/womens_t_shirts/products \
|
||||
curl http://demo.sylius.com/api/v1/taxons/womens_t_shirts/products \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ To create a new country zone use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/zones/country \
|
||||
curl http://demo.sylius.com/api/v1/zones/country \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
|
|
@ -136,7 +136,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/zones/country \
|
||||
curl http://demo.sylius.com/api/v1/zones/country \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST
|
||||
|
|
@ -206,7 +206,7 @@ To see the details of the zone with ``code = EU`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/zones/EU \
|
||||
curl http://demo.sylius.com/api/v1/zones/EU \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -268,7 +268,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/zones/ \
|
||||
curl http://demo.sylius.com/api/v1/zones/ \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json"
|
||||
|
||||
|
|
@ -358,7 +358,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/zones/EU \
|
||||
curl http://demo.sylius.com/api/v1/zones/EU \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT \
|
||||
|
|
@ -388,7 +388,7 @@ Example
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/zones/EU \
|
||||
curl http://demo.sylius.com/api/v1/zones/EU \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT
|
||||
|
|
@ -453,7 +453,7 @@ To partially update the zone with ``code = EU`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/zones/EU \
|
||||
curl http://demo.sylius.com/api/v1/zones/EU \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PATCH \
|
||||
|
|
@ -497,7 +497,7 @@ To delete the zone with ``code = EU`` use the below method:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://demo.sylius.com/api/v1/zones/EU \
|
||||
curl http://demo.sylius.com/api/v1/zones/EU \
|
||||
-H "Authorization: Bearer SampleToken" \
|
||||
-H "Accept: application/json" \
|
||||
-X DELETE
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ The events already used in Sylius are described in the Book alongside the concep
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:event-dispatcher | grep sylius
|
||||
php bin/console debug:event-dispatcher | grep sylius
|
||||
|
||||
Customizations
|
||||
--------------
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ To check what fixtures are defined in Sylius run:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:fixtures:list
|
||||
php bin/console sylius:fixtures:list
|
||||
|
||||
How to load Sylius fixtures?
|
||||
----------------------------
|
||||
|
|
@ -27,7 +27,7 @@ The recommended way to load the predefined set of Sylius fixtures is here:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:fixtures:load
|
||||
php bin/console sylius:fixtures:load
|
||||
|
||||
What data is loaded by fixtures in Sylius?
|
||||
------------------------------------------
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ To begin creating your new project, run this command:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer create-project sylius/sylius-standard acme
|
||||
composer create-project sylius/sylius-standard acme
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ This will create a new Symfony project in the ``acme`` directory. Next, move to
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd acme
|
||||
cd acme
|
||||
|
||||
Sylius uses environment variables to configure the connection with database and mailer services.
|
||||
You can look up the default values in ``.env`` file and customise them by creating ``.env.local`` with variables you want to override.
|
||||
|
|
@ -51,7 +51,7 @@ After everything is in place, run the following command to install Sylius:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:install
|
||||
php bin/console sylius:install
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
@ -72,13 +72,13 @@ Having Yarn installed, go to your project directory to install the dependencies:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ yarn install
|
||||
yarn install
|
||||
|
||||
Then build the frontend assets by running:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ yarn build
|
||||
yarn build
|
||||
|
||||
Accessing the Shop
|
||||
------------------
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Each minor release comes with an ``UPGRADE.md`` file, which is meant to help in
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer update sylius/sylius --with-all-dependencies
|
||||
composer update sylius/sylius --with-all-dependencies
|
||||
|
||||
If this does not help, it is a matter of debugging the conflicting versions and working out how your ``composer.json`` should look after the upgrade.
|
||||
You can check what version of Sylius is installed by running ``composer show sylius/sylius`` command.
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ To run Sylius console in ``prod`` environment, add the following parameters to e
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ bin/console --env=prod --no-debug cache:clear
|
||||
bin/console --env=prod --no-debug cache:clear
|
||||
|
||||
You can access the website in production mode via the ``/index.php`` file in your website root (``public/``) or just ``/`` path. (on Apache)
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ To run Sylius console in ``staging`` environment, add the following parameters t
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ bin/console --env=staging --no-debug cache:clear
|
||||
bin/console --env=staging --no-debug cache:clear
|
||||
|
||||
You can access the website in staging mode via the ``/index.php`` file in your website root (``public/``) or just ``/`` path. (on Apache)
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ To run Sylius console in ``test`` environment, add the following parameters to e
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ bin/console --env=test cache:clear
|
||||
bin/console --env=test cache:clear
|
||||
|
||||
Final Thoughts
|
||||
--------------
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Quickstart to plugins development:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer create-project sylius/plugin-skeleton SyliusMyFirstPlugin
|
||||
composer create-project sylius/plugin-skeleton SyliusMyFirstPlugin
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ Sylius Plus provides a route that allows changing inventory source stock with an
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ POST /api/v1/inventory-sources/{code}/update-stocks
|
||||
POST /api/v1/inventory-sources/{code}/update-stocks
|
||||
|
||||
The ``code`` is a code of inventory source on which stock is to be updated. Content of the request should contain an array
|
||||
of updated stocks, with the product variant code and target on hand value.
|
||||
|
|
@ -166,4 +166,4 @@ Learn more
|
|||
|
||||
.. image:: ../../_images/sylius_plus/banner.png
|
||||
:align: center
|
||||
:target: http://sylius.com/plus/?utm_source=docs
|
||||
:target: http://sylius.com/plus/?utm_source=docs
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ In the administration panel go to channels and change the theme of your desired
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console cache:clear
|
||||
php bin/console cache:clear
|
||||
|
||||
Learn more
|
||||
----------
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/addressing-bundle
|
||||
composer require sylius/addressing-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/addressing-bundle:*
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/addressing-bundle:*
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
@ -63,7 +63,7 @@ Run the following command.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/attribute-bundle
|
||||
composer require sylius/attribute-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/attribute-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/attribute-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
@ -81,7 +81,7 @@ Run the following command.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/customer-bundle
|
||||
composer require sylius/customer-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/customer-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/customer-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
@ -76,7 +76,7 @@ Run the following command.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
|||
|
|
@ -12,17 +12,17 @@ Provides output while running ``sylius:fixtures:load`` command.
|
|||
|
||||
# Without logger
|
||||
|
||||
$ bin/console sylius:fixtures:load my_suite
|
||||
$ _
|
||||
bin/console sylius:fixtures:load my_suite
|
||||
_
|
||||
|
||||
# With logger
|
||||
|
||||
$ bin/console sylius:fixtures:load my_suite
|
||||
bin/console sylius:fixtures:load my_suite
|
||||
Running suite "my_suite"...
|
||||
Running fixture "country"...
|
||||
Running fixture "locale"...
|
||||
Running fixture "currency"...
|
||||
$ _
|
||||
_
|
||||
|
||||
The logger does not have any configuration options. It can be enabled in such a way:
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ To list all available suites and fixtures, use the ``sylius:fixtures:list`` comm
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ bin/console sylius:fixtures:list
|
||||
bin/console sylius:fixtures:list
|
||||
|
||||
Available suites:
|
||||
- default
|
||||
|
|
@ -26,7 +26,7 @@ To load a suite, use the ``sylius:fixtures:load [suite]`` command.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ bin/console sylius:fixtures:load default
|
||||
bin/console sylius:fixtures:load default
|
||||
|
||||
Running suite "default"...
|
||||
Running fixture "country"...
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/fixtures-bundle
|
||||
composer require sylius/fixtures-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/fixtures-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/fixtures-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/grid-bundle
|
||||
composer require sylius/grid-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/grid-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/grid-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/inventory-bundle
|
||||
composer require sylius/inventory-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/inventory-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/inventory-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
@ -215,7 +215,7 @@ For "**doctrine/orm**" driver run the following command.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/mailer-bundle
|
||||
composer require sylius/mailer-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/mailer-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/mailer-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/order-bundle
|
||||
composer require sylius/order-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/order-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/order-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
@ -66,7 +66,7 @@ For "**doctrine/orm**" driver run the following command.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/product-bundle
|
||||
composer require sylius/product-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/product-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/product-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
@ -77,7 +77,7 @@ Run the following command.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/promotion-bundle
|
||||
composer require sylius/promotion-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/promotion-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/promotion-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ Sounds crazy? Spin up the built-in server and give it a try:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console server:run
|
||||
php bin/console server:run
|
||||
|
||||
You should see something like:
|
||||
|
||||
|
|
@ -108,8 +108,8 @@ Now, in a separate Terminal window, call these commands:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -i -X POST -H "Content-Type: application/json" -d '{"title": "Lord of The Rings", "author": "J. R. R. Tolkien", "description": "Amazing!"}' http://localhost:8000/books/
|
||||
$ curl -i -X GET -H "Accept: application/json" http://localhost:8000/books/
|
||||
curl -i -X POST -H "Content-Type: application/json" -d '{"title": "Lord of The Rings", "author": "J. R. R. Tolkien", "description": "Amazing!"}' http://localhost:8000/books/
|
||||
curl -i -X GET -H "Accept: application/json" http://localhost:8000/books/
|
||||
|
||||
As you can guess, other CRUD actions are available through this API.
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ Run the ``debug:router`` command to see available routes:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:router
|
||||
php bin/console debug:router
|
||||
|
||||
------------------------ --------------- -------- ------ -------------------------
|
||||
Name Method Scheme Host Path
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/resource-bundle
|
||||
composer require sylius/resource-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/resource-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/resource-bundle
|
||||
|
||||
Adding Required Bundles to The Kernel
|
||||
-------------------------------------
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Results in the following routes:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:router
|
||||
php bin/console debug:router
|
||||
|
||||
------------------------ --------------- -------- ------ -------------------------
|
||||
Name Method Scheme Host Path
|
||||
|
|
@ -47,7 +47,7 @@ Results in the following routes:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:router
|
||||
php bin/console debug:router
|
||||
|
||||
------------------------ --------------- -------- ------ -------------------------
|
||||
Name Method Scheme Host Path
|
||||
|
|
@ -74,7 +74,7 @@ Results in the following routes:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:router
|
||||
php bin/console debug:router
|
||||
|
||||
------------------------ --------------- -------- ------ -------------------------
|
||||
Name Method Scheme Host Path
|
||||
|
|
@ -102,7 +102,7 @@ Results in the following routes:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:router
|
||||
php bin/console debug:router
|
||||
|
||||
------------------------ --------------- -------- ------ -------------------------
|
||||
Name Method Scheme Host Path
|
||||
|
|
@ -128,7 +128,7 @@ Results in the following routes:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:router
|
||||
php bin/console debug:router
|
||||
|
||||
------------------------ --------------- -------- ------ -------------------------
|
||||
Name Method Scheme Host Path
|
||||
|
|
@ -162,7 +162,7 @@ The generation results in the following routes:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:router
|
||||
php bin/console debug:router
|
||||
|
||||
------------------------ --------------- -------- ------ -------------------------
|
||||
Name Method Scheme Host Path
|
||||
|
|
@ -280,7 +280,7 @@ Which will result in the following routes:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:router
|
||||
php bin/console debug:router
|
||||
|
||||
------------------------ --------------- -------- ------ ---------------------------------------
|
||||
Name Method Scheme Host Path
|
||||
|
|
@ -312,7 +312,7 @@ Which will result in the following routes:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:router
|
||||
php bin/console debug:router
|
||||
|
||||
------------------------ --------------- -------- ------ -------------------------
|
||||
Name Method Scheme Host Path
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/shipping-bundle
|
||||
composer require sylius/shipping-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/shipping-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/shipping-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
@ -91,7 +91,7 @@ Run the following command.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/taxation-bundle
|
||||
composer require sylius/taxation-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/taxation-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/taxation-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
@ -81,7 +81,7 @@ Run the following command.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
|||
|
|
@ -1,143 +0,0 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
We assume you're familiar with `Composer <http://packagist.org>`_, a dependency manager for PHP.
|
||||
|
||||
Use following command to add the bundle to your `composer.json` and download package.
|
||||
If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md#globally>`_.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/product-bundle:0.1.*
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/product-bundle:0.1.*
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
||||
First, you need to enable the bundle inside the kernel.
|
||||
If you're not using any other Sylius bundles, you will also need to add `SyliusResourceBundle` and its dependencies to kernel.
|
||||
Don't worry, everything was automatically installed via Composer.
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
<?php
|
||||
|
||||
// app/AppKernel.php
|
||||
|
||||
public function registerBundles()
|
||||
{
|
||||
$bundles = array(
|
||||
new FOS\RestBundle\FOSRestBundle(),
|
||||
new JMS\SerializerBundle\JMSSerializerBundle($this),
|
||||
new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new Sylius\Bundle\ProductBundle\SyliusProductBundle(),
|
||||
|
||||
// Other bundles...
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
);
|
||||
}
|
||||
|
||||
.. note::
|
||||
|
||||
Please register the bundle before *DoctrineBundle*. This is important as we use listeners which have to be processed first.
|
||||
|
||||
Creating your entities
|
||||
----------------------
|
||||
|
||||
You have to create your own **Product** entity, living inside your application code.
|
||||
We think that **keeping the app-specific bundle structure simple** is a good practice, so
|
||||
let's assume you have your ``ShopBundle`` registered under ``Acme\ShopBundle`` namespace.
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
<?php
|
||||
|
||||
// src/Acme/ShopBundle/Entity/Product.php
|
||||
namespace Acme\ShopBundle\Entity;
|
||||
|
||||
use Sylius\Bundle\ProductBundle\Model\Product as BaseProduct;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
class Product extends BaseProduct
|
||||
{
|
||||
}
|
||||
|
||||
Now define the entity mapping inside ``Resources/config/doctrine/Product.orm.xml`` of your bundle.
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
|
||||
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
|
||||
|
||||
<entity name="Acme\ShopBundle\Entity\Product" table="sylius_product">
|
||||
<id name="id" column="id" type="integer">
|
||||
<generator strategy="AUTO" />
|
||||
</id>
|
||||
<one-to-many field="properties" target-entity="Sylius\Bundle\ProductBundle\Model\ProductPropertyInterface" mapped-by="product">
|
||||
<cascade>
|
||||
<cascade-all />
|
||||
</cascade>
|
||||
</one-to-many>
|
||||
</entity>
|
||||
|
||||
</doctrine-mapping>
|
||||
|
||||
|
||||
Container configuration
|
||||
-----------------------
|
||||
|
||||
Put this configuration inside your ``app/config/config.yml``.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
sylius_product:
|
||||
driver: doctrine/orm # Configure the doctrine orm driver used in documentation.
|
||||
classes:
|
||||
product:
|
||||
model: Acme\ShopBundle\Entity\Product # Your product entity.
|
||||
|
||||
And configure doctrine extensions which are used in assortment bundle:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
stof_doctrine_extensions:
|
||||
orm:
|
||||
default:
|
||||
sluggable: true
|
||||
timestampable: true
|
||||
|
||||
Routing configuration
|
||||
---------------------
|
||||
|
||||
Add folowing to your ``app/config/routing.yml``.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
sylius_product:
|
||||
resource: @SyliusProductBundle/Resources/config/routing.yml
|
||||
|
||||
Updating database schema
|
||||
------------------------
|
||||
|
||||
Remember to update your database schema.
|
||||
|
||||
Run the following command.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php app/console doctrine:schema:update --force
|
||||
|
||||
.. warning::
|
||||
|
||||
This should be done only in **dev** environment! We recommend using Doctrine migrations, to safely update your schema.
|
||||
|
|
@ -15,14 +15,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/taxonomy-bundle
|
||||
composer require sylius/taxonomy-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/taxonomy-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/taxonomy-bundle
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ Run the following command.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/theme-bundle
|
||||
composer require sylius/theme-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/theme-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/theme-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ Tests
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer install
|
||||
$ vendor/bin/phpspec run -f pretty
|
||||
$ vendor/bin/phpunit
|
||||
composer install
|
||||
vendor/bin/phpspec run -f pretty
|
||||
vendor/bin/phpunit
|
||||
|
||||
Bug tracking
|
||||
------------
|
||||
|
|
|
|||
|
|
@ -126,4 +126,4 @@ your theme files by using this command:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:theme:assets:install
|
||||
php bin/console sylius:theme:assets:install
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/user-bundle
|
||||
composer require sylius/user-bundle
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/user-bundle
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/user-bundle
|
||||
|
||||
Adding required bundles to the kernel
|
||||
-------------------------------------
|
||||
|
|
@ -77,7 +77,7 @@ Run the following command.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
|||
|
|
@ -15,11 +15,11 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/grid
|
||||
composer require sylius/grid
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/grid
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/grid
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/resource
|
||||
composer require sylius/resource
|
||||
|
||||
Otherwise you have to download .phar file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar require sylius/resource
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar require sylius/resource
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ Summary
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer install
|
||||
$ vendor/bin/phpspec run -fpretty --verbose
|
||||
composer install
|
||||
vendor/bin/phpspec run -fpretty --verbose
|
||||
|
||||
Bug tracking
|
||||
------------
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ Using the Taxation Component
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ mkdir project/
|
||||
$ cd project/
|
||||
mkdir project/
|
||||
cd project/
|
||||
|
||||
**2.** Open a terminal and use Composer to grab the library.
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ Using the Taxation Component
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/taxation
|
||||
composer require sylius/taxation
|
||||
|
||||
The name ``sylius/taxation`` is written at the top of the documentation for
|
||||
whatever component you want.
|
||||
|
|
@ -70,7 +70,7 @@ You can open the "script.php" file in browser or run it via console:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php script.php
|
||||
php script.php
|
||||
|
||||
Using all of the Components
|
||||
---------------------------
|
||||
|
|
@ -80,7 +80,7 @@ them one by one, you can include the ``sylius/sylius`` package:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require sylius/sylius
|
||||
composer require sylius/sylius
|
||||
|
||||
Now what?
|
||||
---------
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ Set your user information up with your real name and a working email address:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git config --global user.name "Your Name"
|
||||
$ git config --global user.email "you@example.com"
|
||||
git config --global user.name "Your Name"
|
||||
git config --global user.email "you@example.com"
|
||||
|
||||
.. tip::
|
||||
|
||||
|
|
@ -50,14 +50,14 @@ Set your user information up with your real name and a working email address:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git config core.autocrlf
|
||||
git config core.autocrlf
|
||||
|
||||
This will return either "false", "input" or "true"; "true" and "false" being
|
||||
the wrong values. Change it to "input" by typing:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git config --global core.autocrlf input
|
||||
git config --global core.autocrlf input
|
||||
|
||||
Replace --global by --local if you want to set it only for the active
|
||||
repository
|
||||
|
|
@ -76,14 +76,14 @@ Get the Sylius source code:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git clone git@github.com:USERNAME/Sylius.git
|
||||
git clone git@github.com:USERNAME/Sylius.git
|
||||
|
||||
* Add the upstream repository as a remote:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd sylius
|
||||
$ git remote add upstream git://github.com/Sylius/Sylius.git
|
||||
cd sylius
|
||||
git remote add upstream git://github.com/Sylius/Sylius.git
|
||||
|
||||
Step 2: Work on your Patch
|
||||
--------------------------
|
||||
|
|
@ -115,7 +115,7 @@ topic branch, starting from the previously chosen base branch:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git checkout -b BRANCH_NAME master
|
||||
git checkout -b BRANCH_NAME master
|
||||
|
||||
.. tip::
|
||||
|
||||
|
|
@ -188,21 +188,21 @@ If you are basing on the ``master`` branch:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git checkout master
|
||||
$ git fetch upstream
|
||||
$ git merge upstream/master
|
||||
$ git checkout BRANCH_NAME
|
||||
$ git rebase master
|
||||
git checkout master
|
||||
git fetch upstream
|
||||
git merge upstream/master
|
||||
git checkout BRANCH_NAME
|
||||
git rebase master
|
||||
|
||||
If you are basing on the ``1.0`` branch:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git checkout 1.0
|
||||
$ git fetch upstream
|
||||
$ git merge upstream/1.0
|
||||
$ git checkout BRANCH_NAME
|
||||
$ git rebase 1.0
|
||||
git checkout 1.0
|
||||
git fetch upstream
|
||||
git merge upstream/1.0
|
||||
git checkout BRANCH_NAME
|
||||
git rebase 1.0
|
||||
|
||||
When doing the ``rebase`` command, you might have to fix merge conflicts.
|
||||
``git status`` will show you the *unmerged* files. Resolve all the conflicts,
|
||||
|
|
@ -210,14 +210,14 @@ then continue the rebase:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git add ... # add resolved files
|
||||
$ git rebase --continue
|
||||
git add ... # add resolved files
|
||||
git rebase --continue
|
||||
|
||||
Push your branch remotely:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git push --force-with-lease origin BRANCH_NAME
|
||||
git push --force-with-lease origin BRANCH_NAME
|
||||
|
||||
Make a Pull Request
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
|
@ -319,15 +319,15 @@ patch. Before re-submitting the patch, rebase with your base branch (``master``
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git rebase -f upstream/master
|
||||
$ git push --force-with-lease origin BRANCH_NAME
|
||||
git rebase -f upstream/master
|
||||
git push --force-with-lease origin BRANCH_NAME
|
||||
|
||||
or
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git rebase -f upstream/1.0
|
||||
$ git push --force-with-lease origin BRANCH_NAME
|
||||
git rebase -f upstream/1.0
|
||||
git push --force-with-lease origin BRANCH_NAME
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
@ -340,15 +340,15 @@ convert many commits to one commit. To do this, use the rebase command:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git rebase -i upstream/master
|
||||
$ git push --force-with-lease origin BRANCH_NAME
|
||||
git rebase -i upstream/master
|
||||
git push --force-with-lease origin BRANCH_NAME
|
||||
|
||||
or
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git rebase -i upstream/1.0
|
||||
$ git push --force-with-lease origin BRANCH_NAME
|
||||
git rebase -i upstream/1.0
|
||||
git push --force-with-lease origin BRANCH_NAME
|
||||
|
||||
After you type this command, an editor will popup showing a list of commits:
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ You can check your code for Sylius coding standard by running the following comm
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ vendor/bin/ecs check src tests
|
||||
vendor/bin/ecs check src tests
|
||||
|
||||
Some of the violations can be automatically fixed by running the same command with ``--fix`` suffix like:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ vendor/bin/ecs check src tests --fix
|
||||
vendor/bin/ecs check src tests --fix
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
|
|||
|
|
@ -23,14 +23,14 @@ then clone your fork to you local destination:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git clone git@github.com:YOUR_USERNAME/Sylius.git
|
||||
git clone git@github.com:YOUR_USERNAME/Sylius.git
|
||||
|
||||
Under the name ``origin`` you will have from now on the access to your fork.
|
||||
Add also the main repository as the ``upstream`` remote.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git remote add upstream git@github.com:Sylius/Sylius.git
|
||||
git remote add upstream git@github.com:Sylius/Sylius.git
|
||||
|
||||
|
||||
Choose the right Base Branch
|
||||
|
|
@ -49,7 +49,7 @@ Create a dedicated branch for your changes (for organization):
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git checkout -b docs/improving_foo_and_bar
|
||||
git checkout -b docs/improving_foo_and_bar
|
||||
|
||||
You can now make your changes directly to this branch and commit them.
|
||||
Remember to name your commits descriptively, keep them possibly small, with just unitary changes (such that change something only in one part of the docs, not everywhere).
|
||||
|
|
@ -71,7 +71,7 @@ Our recommendation is to install ``Sphinx`` via `Pip`_.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip3 install --no-cache-dir -r ./docs/requirements.txt
|
||||
pip3 install --no-cache-dir -r ./docs/requirements.txt
|
||||
|
||||
Then run
|
||||
|
||||
|
|
@ -88,8 +88,8 @@ and view the generated HTML files in the ``docs/build`` directory. You can open
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip uninstall sphinx
|
||||
$ pip3 uninstall sphinx
|
||||
pip uninstall sphinx
|
||||
pip3 uninstall sphinx
|
||||
|
||||
If you have installed old sphinx by your operating system tools like: brew, apt-get or yum, you have to uninstall it too.
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ To install Sylius main application from our main repository and contribute, run
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer create-project sylius/sylius
|
||||
composer create-project sylius/sylius
|
||||
|
||||
This will create a new Sylius project in ``sylius`` directory. When all the dependencies are installed,
|
||||
you should create `.env` file basing on provides `.env.dist` files. The most important parameter that need to be set,
|
||||
|
|
@ -28,8 +28,8 @@ After everything is in place, run the following commands:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd sylius # Move to the newly created directory
|
||||
$ php bin/console sylius:install
|
||||
cd sylius # Move to the newly created directory
|
||||
php bin/console sylius:install
|
||||
|
||||
The ``sylius:install`` command actually runs several other commands, which will ask you some questions and check if everything is setup to run Sylius properly.
|
||||
|
||||
|
|
@ -43,13 +43,13 @@ Having Node.js installed go to your project directory and run:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ yarn install
|
||||
yarn install
|
||||
|
||||
And now you can use gulp for installing views, by just running a simple command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ yarn build
|
||||
yarn build
|
||||
|
||||
For the contributing process questions, please refer to the `Contributing Guide <http://docs.sylius.com/en/latest/contributing/index.html>`_ that comes up in the following chapters:
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Creating OAuth client:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:oauth-server:create-client --grant-type="password" --grant-type="refresh_token" --grant-type="token"
|
||||
php bin/console sylius:oauth-server:create-client --grant-type="password" --grant-type="refresh_token" --grant-type="token"
|
||||
|
||||
It will give you such a response:
|
||||
|
||||
|
|
@ -23,11 +23,11 @@ Run your application on a built-in server:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console server:start localhost:8000
|
||||
php bin/console server:start localhost:8000
|
||||
|
||||
.. tip::
|
||||
|
||||
Some test fixtures are provided with a default Sylius fixture suite(which can be obtain by executing: ``$ php bin/console sylius:fixtures:load``). By default Sylius will provide following data:
|
||||
Some test fixtures are provided with a default Sylius fixture suite(which can be obtain by executing: ``php bin/console sylius:fixtures:load``). By default Sylius will provide following data:
|
||||
* Sample user: api@example.com
|
||||
* Sample password: sylius-api
|
||||
* Sample random client: demo_client
|
||||
|
|
@ -38,7 +38,7 @@ To obtain authorization token for the default user run:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl http://localhost/api/oauth/v2/token -d "client_id"=demo_client -d "client_secret"=secret_demo_client -d "grant_type"=password -d "username"=api@example.com -d "password"=sylius-api
|
||||
curl http://localhost/api/oauth/v2/token -d "client_id"=demo_client -d "client_secret"=secret_demo_client -d "grant_type"=password -d "username"=api@example.com -d "password"=sylius-api
|
||||
|
||||
This will give you such a response:
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ Use the ``access_token`` in the request to authorize yourself.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -i -X GET -H "Content-Type: application/json" -H "Authorization: Bearer DEF" http://localhost/api/v1/orders/
|
||||
curl -i -X GET -H "Content-Type: application/json" -H "Authorization: Bearer DEF" http://localhost/api/v1/orders/
|
||||
|
||||
Creating a new resource instance via API
|
||||
----------------------------------------
|
||||
|
|
@ -61,7 +61,7 @@ In order to execute this request that will create a new Supplier (:doc:`you have
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer DEF" -d '{"name": "Example", "description": "Lorem ipsum", "enabled": true}' http://localhost/api/v1/suppliers/
|
||||
curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer DEF" -d '{"name": "Example", "description": "Lorem ipsum", "enabled": true}' http://localhost/api/v1/suppliers/
|
||||
|
||||
.. tip::
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ Assuming that you have created a supplier in the previous step, it will have id
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -i -H "Authorization: Bearer DEF" http://localhost/api/v1/suppliers/{id}
|
||||
curl -i -H "Authorization: Bearer DEF" http://localhost/api/v1/suppliers/{id}
|
||||
|
||||
Viewing an index of resource via API
|
||||
------------------------------------
|
||||
|
|
@ -86,7 +86,7 @@ If you would like to see a list of all instances of your resource use such a com
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -i -H "Authorization: Bearer DEF" http://localhost/api/v1/suppliers/
|
||||
curl -i -H "Authorization: Bearer DEF" http://localhost/api/v1/suppliers/
|
||||
|
||||
Updating a single resource instance via API
|
||||
-------------------------------------------
|
||||
|
|
@ -95,7 +95,7 @@ If you would like to modify the whole existing resource use such a command (with
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -i -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer DEF" -d '{"name": "Modified Name", "description": "Modified description", "enabled": false}' http://localhost/api/v1/suppliers/1
|
||||
curl -i -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer DEF" -d '{"name": "Modified Name", "description": "Modified description", "enabled": false}' http://localhost/api/v1/suppliers/1
|
||||
|
||||
Partially updating a single resource instance via API
|
||||
-----------------------------------------------------
|
||||
|
|
@ -104,7 +104,7 @@ If you would like to update just one field of a resource use the PATCH method wi
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -i -X PATCH -H "Content-Type: application/json" -H "Authorization: Bearer DEF" -d '{"enabled": true}' http://localhost/api/v1/suppliers/1
|
||||
curl -i -X PATCH -H "Content-Type: application/json" -H "Authorization: Bearer DEF" -d '{"enabled": true}' http://localhost/api/v1/suppliers/1
|
||||
|
||||
Deleting a single resource instance via API
|
||||
-------------------------------------------
|
||||
|
|
@ -113,7 +113,7 @@ To delete a resource instance you need to call such a command (with an authoriza
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -i -X DELETE -H "Authorization: Bearer DEF" http://localhost/api/v1/artists/1
|
||||
curl -i -X DELETE -H "Authorization: Bearer DEF" http://localhost/api/v1/artists/1
|
||||
|
||||
Learn more
|
||||
----------
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ You can quickly check all your system requirements and possible recommendations
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:install:check-requirements
|
||||
php bin/console sylius:install:check-requirements
|
||||
|
||||
Database configuration
|
||||
----------------------
|
||||
|
|
@ -21,7 +21,7 @@ Sylius can create or even reset the database/schema for you, simply call:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:install:database
|
||||
php bin/console sylius:install:database
|
||||
|
||||
The command will check if your database schema exists. If yes, you may decide to recreate it from scratch, otherwise Sylius will take care of this automatically.
|
||||
It also allows you to load sample data.
|
||||
|
|
@ -33,7 +33,7 @@ You can load sample data by calling the following command:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:install:sample-data
|
||||
php bin/console sylius:install:sample-data
|
||||
|
||||
Basic store configuration
|
||||
-------------------------
|
||||
|
|
@ -42,7 +42,7 @@ To configure your store, use this command and answer all questions:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:install:setup
|
||||
php bin/console sylius:install:setup
|
||||
|
||||
Installing assets
|
||||
-----------------
|
||||
|
|
@ -51,7 +51,7 @@ You can reinstall all web assets by simply calling:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:install:assets
|
||||
php bin/console sylius:install:assets
|
||||
|
||||
How to load custom fixtures suite?
|
||||
==================================
|
||||
|
|
@ -60,6 +60,6 @@ If you have your custom fixtures suite, you can load it during install by provid
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:install --fixture-suite=your_custom_fixtures_suite
|
||||
php bin/console sylius:install --fixture-suite=your_custom_fixtures_suite
|
||||
|
||||
Same option also available at `sylius:install:database`, `sylius:install:sample-data` commands.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Now let’s start the process of installing Sylius on Cloudways.
|
|||
2. Install the latest version of Sylius via SSH
|
||||
-----------------------------------------------
|
||||
|
||||
Open the SSH terminal from the **Server Management tab**. You can also use PuTTY for this purpose. Find the SSH credentials under
|
||||
Open the SSH terminal from the **Server Management tab**. You can also use PuTTY for this purpose. Find the SSH credentials under
|
||||
the **Master Credentials** heading and login to the SSH terminal:
|
||||
|
||||
.. image:: ../../_images/cloudways-ssh.png
|
||||
|
|
@ -32,7 +32,7 @@ After the login, move to the application folder using the ``cd`` command and run
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer create-project sylius/sylius-standard myshop
|
||||
composer create-project sylius/sylius-standard myshop
|
||||
|
||||
The command will start installing the long list of dependencies for Sylius. Once the installation finishes, Sylius will ask for the database credentials.
|
||||
You can find the database username and password in the Application Access Details.
|
||||
|
|
@ -63,7 +63,7 @@ Now run the following command:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ bin/console sylius:install -e prod
|
||||
bin/console sylius:install -e prod
|
||||
|
||||
5. Update The Webroot of the Application
|
||||
----------------------------------------
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ Use the below command to add your Platform.sh project as the ``platform`` remote
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git remote add platform [PROJECT-ID]@git.[CLUSTER].platform.sh:[PROJECT-ID].git
|
||||
git remote add platform [PROJECT-ID]@git.[CLUSTER].platform.sh:[PROJECT-ID].git
|
||||
|
||||
The ``PROJECT-ID`` is the unique identifier of your project,
|
||||
and ``CLUSTER`` can be ``eu`` or ``us`` - depending on where are you deploying your project.
|
||||
|
|
@ -175,14 +175,14 @@ and ``CLUSTER`` can be ``eu`` or ``us`` - depending on where are you deploying y
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git add . && git commit -m "Platform.sh configuration"
|
||||
git add . && git commit -m "Platform.sh configuration"
|
||||
|
||||
5. Push your project to the Platform.sh remote repository
|
||||
---------------------------------------------------------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git push platform master
|
||||
git push platform master
|
||||
|
||||
The output of this command shows you on which URL your online store can be accessed.
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ When you get connected please run:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console sylius:install --env prod
|
||||
php bin/console sylius:install --env prod
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ With the Generator Bundle
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console generate:doctrine:entity
|
||||
php bin/console generate:doctrine:entity
|
||||
|
||||
With the Maker Bundle
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console make:entity
|
||||
php bin/console make:entity
|
||||
|
||||
The generator will ask you for the entity name and fields. See how it should look like to match our assumptions.
|
||||
|
||||
|
|
@ -47,14 +47,14 @@ Assuming that your database was up-to-date before adding the new entity, run:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:migrations:diff
|
||||
php bin/console doctrine:migrations:diff
|
||||
|
||||
This will generate a new migration file which adds the Supplier entity to your database.
|
||||
Then update the database using the generated migration:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:migrations:migrate
|
||||
php bin/console doctrine:migrations:migrate
|
||||
|
||||
4. Add ResourceInterface to your model class
|
||||
--------------------------------------------
|
||||
|
|
@ -93,7 +93,7 @@ To check if the process was run correctly run such a command:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:container | grep supplier
|
||||
php bin/console debug:container | grep supplier
|
||||
|
||||
The output should be:
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ You need to use such a command in your project directory.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console generate:doctrine:entity
|
||||
php bin/console generate:doctrine:entity
|
||||
|
||||
The generator will ask you for the entity name and fields. See how it should look like to match our assumptions.
|
||||
|
||||
|
|
@ -242,7 +242,7 @@ To check if the process was run correctly run such a command:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:container | grep supplier
|
||||
php bin/console debug:container | grep supplier
|
||||
|
||||
The output should be:
|
||||
|
||||
|
|
@ -256,14 +256,14 @@ Assuming that your database was up-to-date before adding the new entity, run:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:migrations:diff
|
||||
php bin/console doctrine:migrations:diff
|
||||
|
||||
This will generate a new migration file which adds the Supplier entity to your database.
|
||||
Then update the database using the generated migration:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:migrations:migrate
|
||||
php bin/console doctrine:migrations:migrate
|
||||
|
||||
6. Prepare new forms for your entity, that will be aware of its translation
|
||||
---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ As an example we will use a popup window script, it is easy for manual testing.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ yarn build
|
||||
yarn build
|
||||
|
||||
**5. Go to Sylius Admin and check the results!**
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ As an example we will change the sidebar menu background color, what is clearly
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ yarn build
|
||||
yarn build
|
||||
|
||||
**5. Go to Sylius Admin and check the results!**
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ In the following example, a new gateway will be configured, which will send paym
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer create-project sylius/plugin-skeleton ProjectName
|
||||
composer create-project sylius/plugin-skeleton ProjectName
|
||||
|
||||
**2.** The first step in the newly created repository would be to create a new Gateway Factory.
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Stripe is not available by default in Sylius, to have it you need to add its pac
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php composer require stripe/stripe-php:~4.1
|
||||
php composer require stripe/stripe-php:~4.1
|
||||
|
||||
Add a payment method with the Stripe gateway in the Admin Panel
|
||||
---------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ Remove the ``select_shipping`` and ``skip_shipping`` transition from the ``syliu
|
|||
.. tip::
|
||||
|
||||
To check if your new state machine configuration is overriding the old one run:
|
||||
``$ php bin/console debug:winzou:state-machine`` and check the configuration of ``sylius_order_checkout``.
|
||||
``php bin/console debug:winzou:state-machine`` and check the configuration of ``sylius_order_checkout``.
|
||||
|
||||
Adjust Checkout Resolver
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
@ -272,7 +272,7 @@ to the ``app/Resources/SyliusShopBundle/config/routing/checkout.yml`` file.
|
|||
|
||||
.. tip::
|
||||
|
||||
If you do not see any changes run ``$ php bin/console cache:clear``.
|
||||
If you do not see any changes run ``php bin/console cache:clear``.
|
||||
|
||||
Learn more
|
||||
----------
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Set up the HWIOAuthBundle
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require hwi/oauth-bundle
|
||||
composer require hwi/oauth-bundle
|
||||
|
||||
* Enable the bundle:
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ For the ``ProductController`` run:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:container sylius.controller.product
|
||||
php bin/console debug:container sylius.controller.product
|
||||
|
||||
As a result you will get the ``Sylius\Bundle\ResourceBundle\Controller\ResourceController`` - this is the class that you need to extend.
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ getting a list of recommended products from your external api.
|
|||
|
||||
.. tip::
|
||||
|
||||
Run ``$ php bin/console debug:container sylius.controller.product`` to check if the class has changed to your implementation.
|
||||
Run ``php bin/console debug:container sylius.controller.product`` to check if the class has changed to your implementation.
|
||||
|
||||
**4.** Finally you’ll need to add routes in the ``config/routes.yaml``.
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ If you still need the methods of the original ``HomepageController``, then copy
|
|||
|
||||
.. tip::
|
||||
|
||||
Run ``$ php bin/console debug:container sylius.controller.shop.homepage`` to check if the class has changed to your implementation.
|
||||
Run ``php bin/console debug:container sylius.controller.shop.homepage`` to check if the class has changed to your implementation.
|
||||
|
||||
**3.** Finally you’ll need to add routes in the ``config/routes.yaml``.
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ For the ``ProductFactory`` run:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:container sylius.factory.product
|
||||
php bin/console debug:container sylius.factory.product
|
||||
|
||||
As a result you will get the ``Sylius\Component\Product\Factory\ProductFactory`` - this is the class that you need to decorate.
|
||||
Take its interface (``Sylius\Component\Product\Factory\ProductFactoryInterface``) and implement it.
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ For the ``CustomerProfileType`` run:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:container sylius.form.type.customer_profile
|
||||
php bin/console debug:container sylius.form.type.customer_profile
|
||||
|
||||
As a result you will get the ``Sylius\Bundle\CustomerBundle\Form\Type\CustomerProfileType`` - this is the class that you need to be extending.
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ For the ``Country`` run:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:container --parameter=sylius.model.country.class
|
||||
php bin/console debug:container --parameter=sylius.model.country.class
|
||||
|
||||
As a result you will get the ``Sylius\Component\Addressing\Model\Country`` - this is the class that you need to be extending.
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ You can check if the configuration in ``config/_sylius.yaml`` is correct by runn
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:container --parameter=sylius.model.country.class
|
||||
php bin/console debug:container --parameter=sylius.model.country.class
|
||||
|
||||
If all is well the output should look like:
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ If all is well the output should look like:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
* via migrations:
|
||||
|
||||
|
|
@ -132,8 +132,8 @@ Which we strongly recommend over updating the schema.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:migrations:diff
|
||||
$ php bin/console doctrine:migrations:migrate
|
||||
php bin/console doctrine:migrations:diff
|
||||
php bin/console doctrine:migrations:migrate
|
||||
|
||||
.. tip::
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ Just like for regular models you can also check the class of translatable models
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:container --parameter=sylius.model.shipping_method.class
|
||||
php bin/console debug:container --parameter=sylius.model.shipping_method.class
|
||||
|
||||
**1.** The first thing to do is to add your own fields in class ``App\Entity\Shipping\ShippingMethod`` extending the base ``Sylius\Component\Core\Model\ShippingMethod`` class.
|
||||
|
||||
|
|
@ -240,7 +240,7 @@ Configuration ``sylius_shipping:`` is provided by default in the sylius-standard
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
* via migrations:
|
||||
|
||||
|
|
@ -248,8 +248,8 @@ Which we strongly recommend over updating the schema.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:migrations:diff
|
||||
$ php bin/console doctrine:migrations:migrate
|
||||
php bin/console doctrine:migrations:diff
|
||||
php bin/console doctrine:migrations:migrate
|
||||
|
||||
.. tip::
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ Just like for regular models you can also check the class of translatable models
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:container --parameter=sylius.model.shipping_method_translation.class
|
||||
php bin/console debug:container --parameter=sylius.model.shipping_method_translation.class
|
||||
|
||||
**1.** In order to add a translatable property to your entity, start from defining it on the class `App\Entity\Shipping\ShippingMethodTranslation` is already there in the right place.
|
||||
|
||||
|
|
@ -382,7 +382,7 @@ Configuration ``sylius_addressing:`` is provided by default in the sylius-standa
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:schema:update --force
|
||||
php bin/console doctrine:schema:update --force
|
||||
|
||||
* via migrations:
|
||||
|
||||
|
|
@ -390,8 +390,8 @@ Which we strongly recommend over updating the schema.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console doctrine:migrations:diff
|
||||
$ php bin/console doctrine:migrations:migrate
|
||||
php bin/console doctrine:migrations:diff
|
||||
php bin/console doctrine:migrations:migrate
|
||||
|
||||
.. tip::
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ For the ``ProductRepository`` run:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console debug:container sylius.repository.product
|
||||
php bin/console debug:container sylius.repository.product
|
||||
|
||||
As a result you will get the ``Sylius\Bundle\CoreBundle\Doctrine\ORM\ProductRepository`` - this is the class that you need to be extending.
|
||||
To make your class more reusable, you should create a new interface ``src/Repository/ProductRepositoryInterface.php``
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ After that your new step will be available alongside other steps that already we
|
|||
|
||||
.. tip::
|
||||
|
||||
Run ``$ php bin/console debug:winzou:state-machine sylius_order``
|
||||
Run ``php bin/console debug:winzou:state-machine sylius_order``
|
||||
to check if the state machine has changed to your implementation.
|
||||
|
||||
How to add a new transition?
|
||||
|
|
@ -65,7 +65,7 @@ After that your new transition will be available alongside other transitions tha
|
|||
|
||||
.. tip::
|
||||
|
||||
Run ``$ php bin/console debug:winzou:state-machine sylius_order``
|
||||
Run ``php bin/console debug:winzou:state-machine sylius_order``
|
||||
to check if the state machine has changed to your implementation.
|
||||
|
||||
How to remove a state and its transitions?
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ Done! If you do not see any changes on the ``/shop/login`` url, clear your cache
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console cache:clear
|
||||
php bin/console cache:clear
|
||||
|
||||
* **Admin** templates: Customization of the Country form view.
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ Done! If you do not see any changes on the ``/admin/countries/new`` url, clear y
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php bin/console cache:clear
|
||||
php bin/console cache:clear
|
||||
|
||||
How to customize templates via events?
|
||||
--------------------------------------
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ To find out the correct configuration, please run the following command:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ bin/console debug:config SyliusUserBundle
|
||||
bin/console debug:config SyliusUserBundle
|
||||
|
||||
The output of that command should look similar to:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ The easiest way to install Sylius on your local machine is to use the following
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer create-project sylius/sylius-standard MyFirstShop
|
||||
composer create-project sylius/sylius-standard MyFirstShop
|
||||
|
||||
It will create a ``MyFirstShop`` directory with a brand new Sylius application inside.
|
||||
|
||||
|
|
@ -38,8 +38,8 @@ Run the Sylius installation command to do that.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd MyFirstShop
|
||||
$ bin/console sylius:install
|
||||
cd MyFirstShop
|
||||
bin/console sylius:install
|
||||
|
||||
This command will do several things for you - the first two steps are checking if your environment fulfills technical requirements,
|
||||
and setting the project database. You will also be asked if you want to have default fixtures loaded into your database - let's say
|
||||
|
|
@ -56,8 +56,8 @@ To derive joy from Sylius SemanticUI-based views, you should use ``yarn`` to loa
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ yarn install
|
||||
$ yarn build
|
||||
yarn install
|
||||
yarn build
|
||||
|
||||
That's it! You're ready to launch your empty Sylius-based web store.
|
||||
|
||||
|
|
@ -69,8 +69,8 @@ browsing the application from the Admin panel.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ symfony serve
|
||||
$ open http://127.0.0.1:8000/admin
|
||||
symfony serve
|
||||
open http://127.0.0.1:8000/admin
|
||||
|
||||
Great! You are closer to the final goal. Let's configure your application a little bit, to make it usable by some future customers.
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ The first step is to create a new plugin using our ``PluginSkeleton``.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer create-project sylius/plugin-skeleton IronManSyliusProductOnDemandPlugin
|
||||
composer create-project sylius/plugin-skeleton IronManSyliusProductOnDemandPlugin
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ This is a simple guide on how to start using webpack in Sylius apps. Webpack fin
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require symfony/webpack-encore-bundle
|
||||
composer require symfony/webpack-encore-bundle
|
||||
|
||||
**2.** Edit the ``config/packages/assets.yaml`` file:
|
||||
|
||||
|
|
@ -67,11 +67,11 @@ This is a simple guide on how to start using webpack in Sylius apps. Webpack fin
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ yarn encore dev
|
||||
yarn encore dev
|
||||
# or
|
||||
$ yarn encore production
|
||||
yarn encore production
|
||||
# or
|
||||
$ yarn encore dev-server
|
||||
yarn encore dev-server
|
||||
|
||||
.. tip::
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue