Review fixes - applied

This commit is contained in:
Magdalena Sadowska 2019-05-16 12:15:05 +02:00
parent 0b0bb9acb2
commit e54a65c8f6
No known key found for this signature in database
GPG key ID: 14AC5EE9151D56C7
10 changed files with 86 additions and 72 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View file

@ -1,43 +1,46 @@
Basic configuration Basic configuration
=================== ===================
The first place you should check out in the Admin panel is the **Configuration** section. There you can find a bunch of modules used to customize your shop the most basic data. The first place you should check out in the Admin panel is the **Configuration** section.
There you can find a bunch of modules used to customize your shop the most basic data.
Channel Channel
------- -------
The most important one is the **Channels** section. It should consist of one channel already created by you with an installation command. The most important one is the **Channels** section. It should consist of one channel already created by you
Channels contain the most basic data about your store, like available locales, currencies, shop billing data, etc. You can fulfill the channel with your desired configuration with the installation command. Channels contain the most basic data about your store, like available locales,
accessing its edit form. currencies, shop billing data, etc. You can modify the channel's configuration:
.. image:: /_images/getting-started-with-sylius/channel.png .. image:: /_images/getting-started-with-sylius/channel.png
Locale Locale
------ ------
Sylius supports internationalization on many levels - you can easily add new locales to your shop to allow your customer browsing it in their desired language. Sylius supports internationalization on many levels - you can easily add new locales to your shop to allow your customers
As set in the installation command, the only **Locale** available right now should be **English (United States)**. browsing it in their desired language. As set in the installation command, the only **Locale** available right now
should be **English (United States)**. This will be the base locale of your shop, therefore all of your products or
taxons etc. have to be created with at an english name at least.
.. image:: /_images/getting-started-with-sylius/locale.png .. image:: /_images/getting-started-with-sylius/locale.png
Currency Currency
-------- --------
Each channel can use multiple **Currencies**, with ratio between them configured by **Exchange rates**. For now, the only available currency should be **USD**, which was Each channel can use multiple **Currencies**, with ratio between them configured by **Exchange rates**.
also created by a ``sylius:install`` command. For now, the only available currency should be **USD**, which was also created by the ``sylius:install`` command.
.. image:: /_images/getting-started-with-sylius/currency.png .. image:: /_images/getting-started-with-sylius/currency.png
----- .. note::
All the previous data was created by an installation command - but you should also add two more things to the store configuration to make it work in 100%. All the previous data was created by the installation command - but you should also add two more things to the store
It will also be required to have them in the next chapter of this guide. configuration to make it work in 100%. It will also be required to have them in the next chapter of this guide.
Country Country
------- -------
Most of the shops ships their merchandise to various country in the world. To configure which countries would be available for shipping goods in your store, you should Most of the shops ship their merchandise to various countries in the world. To configure which countries will be available
add some countries in the **Countries** section. as shipping destinations in your store, you should add some countries in the **Countries** section.
Adding a country: Adding a country:
@ -50,7 +53,8 @@ Added country displayed on the index page:
Zone Zone
---- ----
The last configuration step is creating a zone. They are used for various reasons, like shipping and taxing operations, and can consist of countries, provinces or different zones. The last configuration step is creating a zone. They are used for various reasons, like shipping and taxing operations,
and can consist of countries, provinces or other zones.
.. image:: /_images/getting-started-with-sylius/zones-types.png .. image:: /_images/getting-started-with-sylius/zones-types.png
:scale: 55% :scale: 55%
@ -58,7 +62,8 @@ The last configuration step is creating a zone. They are used for various reason
| |
Let's create a one, basic zone named *United States* for the only country in the system (also *United States*). This way the basic shop configuration is done! Let's create one, basic zone named *United States* for the only country in the system (also *United States*).
This way the basic shop configuration is done!
.. image:: /_images/getting-started-with-sylius/zone-creation.png .. image:: /_images/getting-started-with-sylius/zone-creation.png

View file

@ -15,12 +15,12 @@ bought products and some configuration done by Administrator. By default Sylius
ordered products in parcels and you need to charge a customer for each of them. ordered products in parcels and you need to charge a customer for each of them.
You should start with the implementation of your custom shipping calculator service. Remember, that it must implement the You should start with the implementation of your custom shipping calculator service. Remember, that it must implement the
``CalculatorInterface`` from **Shipping Component**. Let's name it ``ParcelCalculator`` and place in ``src/ShippingCalculator`` ``CalculatorInterface`` from **Shipping Component**. Let's name it ``ParcelCalculator`` and place it in ``src/ShippingCalculator``
directory. directory.
.. code-block:: php .. code-block:: php
# src/ShippingCalculator/ # src/ShippingCalculator/ParcelCalculator.php
<?php <?php
@ -49,12 +49,12 @@ directory.
} }
} }
Two more things are needed to make it work. A form type, that would be used to pass some data to ``$configuration`` array Two more things are needed to make it work. A form type, that would be used to pass some data to the ``$configuration`` array
in the calculator service, and a proper service registration in ``services.yaml`` file. in the calculator service, and a proper service registration in the ``services.yaml`` file.
.. code-block:: php .. code-block:: php
# src/Form/Type/ # src/Form/Type/ParcelShippingCalculatorType.php
<?php <?php
@ -82,7 +82,7 @@ in the calculator service, and a proper service registration in ``services.yaml`
.. attention:: .. attention::
The currency needed for ``MoneyType`` in the proposed implementation is hardcoded just for testing reasons. In a real application, The currency needed for ``MoneyType`` in the proposed implementation hardcoded just for testing reasons. In a real application,
you should get the proper currency code from the repository, context or some configuration file. you should get the proper currency code from the repository, context or some configuration file.
.. code-block:: yaml .. code-block:: yaml
@ -102,7 +102,7 @@ in the calculator service, and a proper service registration in ``services.yaml`
form_type: App\Form\Type\ParcelShippingCalculatorType form_type: App\Form\Type\ParcelShippingCalculatorType
} }
That's it! You should now be able to select your shipping calculator during the creation or edition of shipping method. That's it! You should now be able to select your shipping calculator during the creation or edition of a shipping method.
.. image:: /_images/getting-started-with-sylius/shipping-calculator.png .. image:: /_images/getting-started-with-sylius/shipping-calculator.png
:scale: 55% :scale: 55%
@ -130,7 +130,7 @@ For 4 products:
| |
Amazing job! You've just provided your own logic into a Sylius-based system. Therefore, your store can provide a unique Amazing job! You've just provided your own logic into a Sylius-based system. Therefore, your store can provide a unique
experience for your Customers. Basing on this knowledge, your ready to customize your shop even more and make it as suitable experience for your Customers. Basing on this knowledge, you're ready to customize your shop even more and make it as suitable
to your business needs as possible. to your business needs as possible.
Learn more Learn more

View file

@ -1,9 +1,12 @@
First product First product
============= =============
We move to one of the most important sections of the Admin panel - products management. As you can see, **Catalog** section the menu We move to one of the most important sections of the Admin panel - products management. As you can see, the **Catalog**
is quite extended, but we will, for now, focus on product creation only. You can pick a *simple* or *configurable* product section in the menu is quite extended, but we will, for now, focus on product creation only.
type before its creation. Making a long story short - *simple* can be sold as only one variation, *configurable* as multiple of them.
You can pick a *simple* or *configurable* product type before its creation. Making long story short -
*simple* is a product that has just one version,
*configurable* is a product where the customer gets to choose some options of it (like size or colour).
Check out the :doc:`Products </book/products/products>` chapter in **The Book** for more information. Check out the :doc:`Products </book/products/products>` chapter in **The Book** for more information.
.. image:: /_images/getting-started-with-sylius/product-types.png .. image:: /_images/getting-started-with-sylius/product-types.png
@ -13,7 +16,7 @@ Check out the :doc:`Products </book/products/products>` chapter in **The Book**
| |
During the product creation, you can decide about many of its traits. How much does it cost? Is it a physical product that requires During the product creation, you can decide about many of its traits. How much does it cost? Is it a physical product that requires
shipping? Should it be tracked within the system? On which channel it will be available? Should it have some taxes added during shipping? Should it be tracked within the inventory system? On which channel will it be available? Should it have some taxes added during
the checkout or not? Take a while to explore these options later, right now let's fill only the most critical data: the checkout or not? Take a while to explore these options later, right now let's fill only the most critical data:
.. image:: /_images/getting-started-with-sylius/product-creation.png .. image:: /_images/getting-started-with-sylius/product-creation.png
@ -21,14 +24,13 @@ the checkout or not? Take a while to explore these options later, right now let'
Summary Summary
------- -------
Great, the first stage is done! You're not able to test the checkout process to see how customers would be able to buy products Great, the first stage is done! The whole checkout process is described in :doc:`this part of the documentation </book/orders/checkout>`,
in your brand new online store. The whole checkout process is described in :doc:`this part of the documentation </book/orders/checkout>`, it's quite natural and logical, so it should not be a problem to understand it.
but it's quite natural and logical, so it should not be a problem to understand it.
.. image:: /_images/getting-started-with-sylius/checkout-summary.png .. image:: /_images/getting-started-with-sylius/checkout-summary.png
We can now move to some more advanced parts of the tutorial - Sylius features customization and deploying it into the server, We can now move to some more advanced parts of the tutorial - Sylius features customization and deploying it into the server,
to make it available for the world. to make it available to the world.
Learn more Learn more
########## ##########

View file

@ -1,9 +1,9 @@
Getting Started with Sylius Getting Started with Sylius
=========================== ===========================
This tutorial is dedicated to Sylius newcomers, who want to check out our system quickly - see basic configuration, do some simple customizations, This tutorial is dedicated to Sylius newcomers, who want to quickly check our system out - see basic configuration,
and be able to sell the first products in their new webshop. It shows the quickest and simplest way from the idea ("I want to sell some stuff online") do some small customizations, and be able to sell the first products in their new webshop. It shows the quickest
to the first results ("I can sell some stuff online!"). and simplest way from an idea ("I want to sell some stuff online") to the first results ("I can sell some stuff online!").
.. toctree:: .. toctree::
:hidden: :hidden:
@ -22,5 +22,6 @@ to the first results ("I can sell some stuff online!").
.. warning:: .. warning::
Be aware, that this guide is written for developers! To understand every chapter correctly, you need to have at least the most basic knowledge Be aware, that this guide is written for developers! To understand every chapter correctly, you need to have
about object-oriented programming and PHP language. `Symfony <https://symfony.com/doc/current/index.html>`_ experience would also be welcomed. at least a foggy idea about object-oriented programming and PHP language.
`Symfony <https://symfony.com/doc/current/index.html>`_ experience will also be handy.

View file

@ -1,14 +1,19 @@
Installation Installation
============ ============
So you want to create an online shop with Sylius? Great! The first step is the most important one, so let's start with the Sylius project installation. So you want to try creating an online shop with Sylius? Great! The first step is the most important one, so let's start
We will use the latest stable version of Sylius - ``1.4``. with the Sylius project installation via Composer. We will be using the latest stable version of Sylius - ``1.4``.
Before installation Before installation
------------------- -------------------
There are some prerequisites that your local machine should fulfill before installation (not many of them). We recommend using Unix system (like There are some prerequisites that your local environment should fulfill before installation (not many of them).
Linux or MacOS), you also have to have **PHP 7.2** (or higher) installed and a **MySQL** server. **Composer** and **Yarn** installed globally are also assumed.
.. image:: ../_images/installation_checklist.png
:align: center
:scale: 60%
|
For more details, take a look at :doc:`this chapter</book/installation/requirements>` in **The Book**. For more details, take a look at :doc:`this chapter</book/installation/requirements>` in **The Book**.
@ -25,25 +30,25 @@ It will create a ``MyFirstShop`` directory with a brand new Sylius application i
.. warning:: .. warning::
Beware! The next step includes the database setup. It's required to set your database credentials (username, password, and database name) Beware! The next step includes the database setup. It will set your database credentials
in the file with an environment variable (``.env`` is the most basic one). (username, password, and database name) in the file with environment variables (``.env`` is the most basic one).
To launch a Sylius application, we need to configure some basic data, like an administrator account or a base locale. To launch a Sylius application, inidial data has to be set up: an administrator account and base locale.
Using an installation command is the quickest way to do that. Run the Sylius installation command to do that.
.. code-block:: bash .. code-block:: bash
$ cd MyFirstShop $ cd MyFirstShop
$ bin/console sylius:install $ bin/console sylius:install
This command will do several things for you - the first two steps are checking does your system fulfills some technical requirement, 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 and setting the project database. You will also be asked if you want to have default fixtures loaded into your database - let's say
"No" for that, we will configure the store manually. "No" to that, we will configure the store manually.
.. image:: /_images/getting-started-with-sylius/installation1.png .. image:: /_images/getting-started-with-sylius/installation1.png
It's essential to put some attention to the 3rd installation step. There you configure your default administrator account, which It's essential to put some attention to the 3rd installation step. There you configure your default administrator account, which
can later be used to access Sylius admin panel. will be later used to access Sylius admin panel.
.. image:: /_images/getting-started-with-sylius/installation2.png .. image:: /_images/getting-started-with-sylius/installation2.png
@ -54,20 +59,20 @@ To derive joy from Sylius SemanticUI-based views, you should use ``yarn`` to loa
$ yarn install $ yarn install
$ yarn build $ yarn build
That's it! You're ready to launch your Sylius-based web store. That's it! You're ready to launch your empty Sylius-based web store.
Launching application Launching application
--------------------- ---------------------
For the testing reasons, the fastest way to start the application is using Symfony built-in server. Let's also start browsing the application For the testing reasons, the fastest way to start the application is using Symfony built-in server. Let's also start
from the Admin panel. browsing the application from the Admin panel.
.. code-block:: bash .. code-block:: bash
$ bin/console server:start $ bin/console server:start
$ open http://127.0.0.1:8000/admin $ open http://127.0.0.1:8000/admin
Great! You are one step closer to the final goal. Let's configure your application a little bit, to make it usable by some future customers. Great! You are closer to the final goal. Let's configure your application a little bit, to make it usable by some future customers.
Learn more Learn more
########## ##########

View file

@ -3,14 +3,14 @@ Plugin installation
Sylius is easy to customize to your business needs, but not all of the customizations you have to do on your own! Sylius Sylius is easy to customize to your business needs, but not all of the customizations you have to do on your own! Sylius
supports creating plugins, that are the best way to extend its functionality and share these new features with the Community. supports creating plugins, that are the best way to extend its functionality and share these new features with the Community.
You can already benefit for some plugins developed by us (Sylius Core team) or the Community. All of the plugins officially You can already benefit from some plugins developed by us (Sylius Core team) or the Community. All of the plugins officially
approved are listed on `our website <https://sylius.com/plugins/>`_, but even more of them can be seen in the Sylius ecosystem. approved are listed on `our website <https://sylius.com/plugins/>`_, but even more of them can be seen in the Sylius ecosystem.
To give you a quick overview of how easy-to-use and powerful plugins can be, lets install a **SyliusCmsPlugin** (developed To give you a quick overview of how easy-to-use and powerful plugins can be, lets install the **SyliusCmsPlugin** (developed
by **BitBag**), one of the most popular extensions to Sylius. by **BitBag**), one of the most popular extensions to Sylius.
Plugins installation instruction is widely explained `in plugin's documentation <https://github.com/BitBagCommerce/SyliusCmsPlugin/blob/master/doc/installation.md>`_ Plugins installation instruction is widely explained `in plugin's documentation <https://github.com/BitBagCommerce/SyliusCmsPlugin/blob/master/doc/installation.md>`_
and consist of the most standard steps, that you can see in most of Sylius plugins: and consists of standard steps, that you can see in most of Sylius plugins:
- plugin installation with composer - plugin installation with composer

View file

@ -1,22 +1,23 @@
Shipping & Payment Shipping & Payment
================== ==================
The basic configuration is done. We can now proceed to allow potential customers buying our merchandise. As usual, during the checkout The basic configuration is done. We can now proceed to letting potential customers to buy our merchandise.
process, they should be able to define how do they want their order to be shipped, as well as how they would pay for that. During the checkout process, they should be able to define how do they want their order to be shipped,
as well as how they would pay for that.
Shipping method Shipping method
--------------- ---------------
Sylius allows configuring different ways to ship the order, depending on shipping address (the **Zone** concept is essential there!), or affiliation Sylius allows configuring different ways to ship the order, depending on shipping address (the **Zone** concept is essential there!),
to some specific **Shipping Category**. Let's then create a simple shipping method called "FedEx" that would cost $10.00 for the whole order. or affiliation to some specific **Shipping Category**. Let's then create a shipping method called "FedEx" that would cost $10.00 for a whole order.
.. image:: /_images/getting-started-with-sylius/shipping-method.png .. image:: /_images/getting-started-with-sylius/shipping-method.png
Payment method Payment method
-------------- --------------
Customer should also be able to choose, how their order will be paid. At least one payment method is required for completing a checkout, so create a new one Customer should also be able to choose, how they are willing to pay. At least one payment method is required - let's make it "Cash on delivery".
named "Cash on delivery". Before creation, we need to specify the payment method gateway, which is a way for processing the payment (*Offline*, *PayPal Express Checkout*, Before creation, we need to specify the payment method gateway, which is a way for processing the payment (*Offline*, *PayPal Express Checkout*,
and *Stripe* are supported by default). and *Stripe* are supported by default).
Gateway selection: Gateway selection:
@ -33,9 +34,9 @@ Payment method creation:
.. attention:: .. attention::
Psst! You can find integrations with more payment gateways if you take a look at some `Sylius plugins <https://sylius.com/plugins>`_ *Psst!* You can find integrations with more payment gateways if you take a look at some `Sylius plugins <https://sylius.com/plugins>`_
Great! The only thing left is creating some product, and we can go shopping! Great! The only thing left is creating some products, and we can go shopping!
Learn more Learn more
########## ##########

View file

@ -1,10 +1,10 @@
Shop Customizations Shop Customizations
=================== ===================
What makes Sylius unique from other e-commerce systems is not only its high developer community or clean code base. The developer What makes Sylius unique from other e-commerce systems is not only its highly developed community or clean code base. The developer
experience has always been a great advantage of this platform - and it includes easiness of customization and great extendability. experience has always been a great advantage of this platform - and it includes easiness of customization and great extendability.
Let's get the benefit from these features and make some simple customization, to make your store even much suitable for your Let's get the benefit from these features and make some simple customization, to make your store even more suitable for your
business needs. business needs.
Logo Logo
@ -15,7 +15,7 @@ to make them unique for your online store. Maybe some colors should be different
not look like you want? Fortunately, twig templates are easy to override or customize (take a look at not look like you want? Fortunately, twig templates are easy to override or customize (take a look at
:doc:`Customizing Templates chapter</customization/template>` for more info). :doc:`Customizing Templates chapter</customization/template>` for more info).
In the beginning, try a very simple, but also one of the most crucial change - displaying your shop logo instead of the Sylius' one. In the beginning, try a very simple, but also one of the most crucial changes - displaying your shop logo in place of the Sylius logo.
Default logo in shop panel: Default logo in shop panel:
@ -25,14 +25,14 @@ The first step is to detect which template is responsible for displaying the log
to customize a logo image. to customize a logo image.
It's placed in **SyliusShopBundle**, at ``Resources/views/_header.html.twig.path``, so to override it, It's placed in **SyliusShopBundle**, at ``Resources/views/_header.html.twig.path``, so to override it,
you should create a ``templates/bundles/SyliusShopBundle/_header.html.twig`` file and copy the original file content. Next, replace the you should create the ``templates/bundles/SyliusShopBundle/_header.html.twig`` file and copy the original file content.
``img`` element source with a link to the logo or properly imported asset image (take a look at Next, replace the ``img`` element source with a link to the logo or properly imported asset image (take a look at
`Symfony assets documentation <https://symfony.com/doc/current/best_practices/web-assets.html>`_ for more info). `Symfony assets documentation <https://symfony.com/doc/current/best_practices/web-assets.html>`_ for more info).
.. hint:: .. hint::
Psst! To speed up your learning path you can just put a logo file into the ``public/assets/`` directory. Just remember, *Psst!* To speed up your learning path you can just put a logo file into the ``public/assets/`` directory. Just remember,
it should not be committed into the repository or throw on the server, it's just for the testing reasons! it should not be committed into the repository or put on the server, it's just for the testing reasons!
At the end of customization, the overridden file would look similar to this: At the end of customization, the overridden file would look similar to this:

View file

@ -2,17 +2,17 @@ Summary
======= =======
We hope you've enjoyed your first journey with Sylius! Basing on the already gathered knowledge you have now plenty of We hope you've enjoyed your first journey with Sylius! Basing on the already gathered knowledge you have now plenty of
possibilities to use Sylius, customize it and add new functionality with your own or Community's code. possibilities to use Sylius, customize it and add new functionalities with your own or Community's code.
There are a few tips at the end of this tutorial: There are a few tips at the end of this tutorial:
- if you want to improve your knowledge about Sylius features, take a look at :doc:`The Book</book/index>` - if you want to improve your knowledge about Sylius features, take a look at :doc:`The Book</book/index>`
- if you're interested in making more customization, you should read some chapters from :doc:`The Customization Guide</book/index>` - if you're interested in making more customizations, you should read some chapters from :doc:`The Customization Guide</book/index>`
- if you want to share your work with the Community, check out the :doc:`Sylius Plugins</plugins/index>` chapter - if you want to share your work with the Community, check out the :doc:`Sylius Plugins</plugins/index>` chapter
And the most important - if you want to stay the part of our collectivity, join our `Slack <https://sylius.com/slack>`_, And the most important - if you want to become a part of our collectivity, join our `Slack <https://sylius.com/slack>`_,
`Forum <https://forum.sylius.com/>`_ and follow `our repository <https://github.com/Sylius/Sylius>`_ to be always up-to-date `Forum <https://forum.sylius.com/>`_ and follow `our repository <https://github.com/Sylius/Sylius>`_ to be always up-to-date
with the newest Sylius releases. If you have any ideas about how to make Sylius better and want to support us on catalyzing with the newest Sylius releases. If you have any ideas about how to make Sylius better and want to support us on catalyzing
trade with technology - open issues, pull requests and join discussions on Github. Sylius is only strong with the Community :) trade with technology - open issues, pull requests and join discussions on Github. Sylius is only strong with the Community :)