Skip to content

Commit

Permalink
feature #11054 [Documentation] Sylius Plus features documentation v1 …
Browse files Browse the repository at this point in the history
…(CoderMaggie)

This PR was merged into the 1.6-dev branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.6
| Bug fix?        | no
| New feature?    | yes
| BC breaks?      | no

We have decided to make [Sylius Plus](https://sylius.com/plus/) documentation a part of the official documentation so that features available beyond the open source distribution get their recognition among Sylius users.

I've added screenshots of the build docs, so that you can read them easier than in Github compare window and see the css style they will have.

![localhost_63342_Sylius_docs_build_book_introduction_introduction html](https://user-images.githubusercontent.com/13198869/72905709-40ea2500-3d31-11ea-8701-cdfc77e17ea4.png)

![localhost_63342_Sylius_docs_build_book_index html](https://user-images.githubusercontent.com/13198869/72905439-d507bc80-3d30-11ea-9e45-dca110f99fd5.png)

![localhost_63342_Sylius_docs_build_book_installation_sylius_plus_installation html](https://user-images.githubusercontent.com/13198869/72905447-d89b4380-3d30-11ea-87bf-f205d7e6c701.png)

![localhost_63342_Sylius_docs_build_book_customers_customer_pools html](https://user-images.githubusercontent.com/13198869/72905560-05e7f180-3d31-11ea-916f-0dc3d80adc96.png)

![localhost_63342_Sylius_docs_build_book_products_multi_source_inventory html](https://user-images.githubusercontent.com/13198869/72905630-231cc000-3d31-11ea-954f-01b32c62bf1f.png)

![returns](https://user-images.githubusercontent.com/13198869/72905278-93771180-3d30-11ea-8271-fad82d35c5e0.png)



Commits
-------

fcf9103 [Docs] Add Plus docs theme
1876568 [Plus Docs] Introduction
259d096 [Plus Docs] Installation
f8537b7 [Plus Docs] Customer Pools
c3c8a03 [Plus Docs] Multi-Source Inventory
8de9169 [Plus Docs] Business Units
9ae7388 [Plus Docs] Returns
d9835db [Plus Docs] Fixes: navigation and style
  • Loading branch information
lchrusciel committed Jan 24, 2020
1 parent e5e36e9 commit 0f94d17
Show file tree
Hide file tree
Showing 33 changed files with 891 additions and 35 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/sylius_plus/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/sylius_plus/business_unit_form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/sylius_plus/business_units.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/sylius_plus/customer_pools_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/sylius_plus/return_request_form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions docs/_themes/sylius_rtd_theme/static/css/sylius-custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,38 @@ div[class^='highlight'] {
font-size: 11px;
letter-spacing: 2px;
}

/* Plus docs */
.plus-doc {
padding: 30px;
border: 2px dashed #404662;
border-radius: 6px;
}

.plus-doc::before {
content: 'SYLIUS PLUS DOCUMENTATION';
position: relative;
bottom: 42px;
right: 2px;
background: #404662;
color: #fdf2f1;
padding: 4px 10px;
border-radius: 60px;
font-size: 11px;
letter-spacing: 2px;
}

.plus-feature::after {
content: 'PLUS';
font-weight: 600;
font-size: 10px;
text-transform: uppercase;
background: #404662;
color: #fff;
padding: 0 7px;
border-radius: 99px;
transform: translateY(-1px);
display: inline-block;
line-height: 1.7;
margin-left: 5px;
}
31 changes: 31 additions & 0 deletions docs/book/configuration/channels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,37 @@ You can get the current channel from the channel context.
Moreover if the channel depends mainly on the request you can implement the ``Sylius\Component\Channel\Context\RequestBased\RequestResolverInterface``
with its ``findChannel(Request $request)`` method and register it under the ``sylius.context.channel.request_based.resolver`` tag.

Shop Billing Data
-----------------

For :doc:`Invoicing </book/orders/invoices>` and :doc:`Credit Memo </book/orders/refunds>` purposes Channels are
supplied with a section named Shop Billing Data, which is editable on the Channel create/update form.

.. image:: ../../_images/shop_billing_data.png
:align: center

.. rst-class:: plus-doc

Business Units
~~~~~~~~~~~~~~

Sylius Plus is supplied with an enhanced version of Shop Billing Data from open source edition. It is also used for Invoicing and Refunds purposes,
but it is a separate entity, that you can create outside of the Channel and then just pick a previously created Business Unit
on the Channel form.

.. image:: ../../_images/sylius_plus/business_units.png
:align: center

.. image:: ../../_images/sylius_plus/business_unit_form.png
:align: center

.. image:: ../../_images/sylius_plus/channel_business_unit.png
:align: center

.. image:: ../../_images/sylius_plus/banner.png
:align: center
:target: http://sylius.com/plus/?utm_source=docs

Learn more
----------

Expand Down
106 changes: 106 additions & 0 deletions docs/book/customers/customer_pools.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
.. rst-class:: plus-doc

Customer Pools
==============

Customer Pool is a collection of Customers that is assigned to a specific channel. Thanks to this concept, if you have two
channels, each of them has a separate customer pool, then customers that have accounts in channel A, and have not registered in channel B,
will not be able to log in to channel B with credentials they have specified in channel A (which is the behaviour happening in
Sylius open source edition). This feature allows you to sell via multiple channels, creating a illusion of shopping in
completely different stores, while you still have one administration panel.

Managing Customer Pools
-----------------------

Customer pools management is available in the administration panel in the Customers section.

.. image:: ../../_images/sylius_plus/customer_pools_menu.png
:align: center

New customer pools can be added through the admin UI in the section Customer pools or via fixtures,
as it is configured in ``src/Resource/config/fixtures.yaml`` for the ``plus`` fixture suite.

The configuration looks like that:

.. code-block:: yaml
sylius_fixtures:
suites:
default:
fixtures:
customer_pool:
priority: 1
options:
custom:
default:
name: "Default"
code: "default"
Customer Pool can be assigned to a Channel, but only during its _creation_ in Admin panel. Currently it is not possible
to modify the User Pool after the channel is created, as it would lead to certain edge cases with customers loosing access to channels,
after improper admin operations.

There is also a possibility to choose a specific customer pool during channel or shop customer creation in fixtures
(remember to create a customer pool before assigning it to a channel):

.. code-block:: yaml
sylius_fixtures:
suites:
default:
fixtures:
channel:
options:
custom:
mobile:
name: "Mobile"
code: "mobile"
locales:
- "en_US"
currencies:
- "USD"
customer_pool: "default"
enabled: true
shop_user:
options:
custom:
-
email: "[email protected]"
first_name: "John"
last_name: "Doe"
password: "sylius"
customer_pool: "default"
How to create a Customer Pool programmatically?
-----------------------------------------------

As usual, use a factory. The only required fields for the CustomerPool entity are ``code`` and ``name``, provide them
before adding it to the repository.

.. code-block:: php
/** @var CustomerPoolInterface $customerPool */
$customerPool = $this->container->get('sylius_plus.factory.customer_pool')->createNew();
$customerPool->setCode('HOME_POOL');
$customerPool->setName('Home Pool');
$this->container->get('sylius_plus.repository.customer_pool')->add($customerPool);
In order to assign a Customer Pool to a Channel programmatically use this simple trick:

.. code-block:: php
// given that you have a $channel from repository, and a $customerPool just created above
$channel->setCustomerPool($customerPool);
Learn more
----------

* :doc:`Channels - Concept Documentation </book/configuration/channels>`

.. image:: ../../_images/sylius_plus/banner.png
:align: center
:target: http://sylius.com/plus/?utm_source=docs
1 change: 1 addition & 0 deletions docs/book/customers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ There is also a subchapter dedicated to addresses of your customers.
:hidden:

customer_and_shopuser
customer_pools
adminuser
addresses/index

Expand Down
11 changes: 8 additions & 3 deletions docs/book/customers/map.rst.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
* :doc:`/book/customers/customer_and_shopuser`
* :doc:`/book/customers/adminuser`
* :doc:`/book/customers/addresses/index`
.. raw:: html

<ul class="simple">
<li><p><a class="reference internal" href="customers/customer_and_shopuser.html"><span class="doc">Customer and ShopUser</span></a></p></li>
<li><p><a class="reference internal plus-feature" href="customers/customer_pools.html"><span class="doc">Customer Pools</span></a></p></li>
<li><p><a class="reference internal" href="customers/adminuser.html"><span class="doc">AdminUser</span></a></p></li>
<li><p><a class="reference internal" href="customers/addresses/index.html"><span class="doc">Addresses</span></a></p></li>
</ul>
1 change: 1 addition & 0 deletions docs/book/installation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The process of installing Sylius together with the requirements to run it effici

requirements
installation
sylius_plus_installation
upgrading

.. include:: /book/installation/map.rst.inc
11 changes: 8 additions & 3 deletions docs/book/installation/map.rst.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
* :doc:`/book/installation/requirements`
* :doc:`/book/installation/installation`
* :doc:`/book/installation/upgrading`
.. raw:: html

<ul class="simple">
<li><a class="reference internal" href="installation/requirements.html"><span class="doc">System Requirements</span></a></li>
<li><a class="reference internal" href="installation/installation.html"><span class="doc">Installation</span></a></li>
<li><a class="reference internal plus-feature" href="installation/sylius_plus_installation.html"><span class="doc">Sylius Plus Installation</span></a></li>
<li><a class="reference internal" href="installation/upgrading.html"><span class="doc">Upgrading</span></a></li>
</ul>
Loading

0 comments on commit 0f94d17

Please sign in to comment.