Skip to content

Commit

Permalink
Merge branch '1.10' into 1.11
Browse files Browse the repository at this point in the history
* 1.10:
  [Docs] Updated Sylius Plus installation guide
  [Maintenance] Specify the default path in the ECS configuration
  Using Sylius template event to change logo
  • Loading branch information
Zales0123 committed Apr 29, 2022
2 parents 90d7c4d + ea775bf commit e389f53
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
26 changes: 24 additions & 2 deletions docs/book/installation/sylius_plus_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,31 @@ Installing Sylius Plus as a plugin to a Sylius application
use InventorySourceAwareTrait;
}
**7.** Add wkhtmltopdf binary for Invoicing purposes.
**7.** Install wkhtmltopdf binary:

If you do not have the ``wkhtmltopdf`` binary, download it `here <https://wkhtmltopdf.org/downloads.html>`_.
Default configuration assumes enabled PDF file generator. If you don't want to use that feature change your app configuration:

.. code-block:: yaml
# config/packages/sylius_plus.yaml
sylius_plus:
pdf_generator:
enabled: false
.. warning::

Sylius Plus uses both the Sylius Invoicing and Sylius Refund plugins which have their own configuration for disabling PDF Generator.


Check if you have wkhtmltopdf binary.
If not, you can download it `here <https://wkhtmltopdf.org/downloads.html>`_.

By default wkhtmltopdf is installed in ``/usr/local/bin/wkhtmltopdf`` directory.

.. tip::

If you not sure if you have already installed wkhtmltopdf and where it is located, write the following command in the terminal:
``which wkhtmltopdf``

In case wkhtmltopdf is not located in ``/usr/local/bin/wkhtmltopdf``, add the following snippet at the end of
your application's ``.env`` file:
Expand Down
21 changes: 19 additions & 2 deletions docs/getting-started-with-sylius/shop-customizations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,29 @@ The first step is to detect which template is responsible for displaying the log
to customize a logo image.

It's placed in **SyliusShopBundle**, at ``Resources/views/Layout/Header/_logo.html.twig`` path, so to override it,
you should create the ``templates/bundles/SyliusShopBundle/Layout/Header/_logo.html.twig`` file and copy the original file content.
you should create the ``templates/shop/Layout/Header/_logo.html.twig`` file and copy the original file content.
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).

The other way to achieve this is to modify the configuration of the ``sylius.shop.layout.header.grid`` template event.
Learn more about it in :doc:`this doc</customization/template>`.
Here for sake of example the same logo file ``templates/shop/Layout/Header/_logo.html.twig`` used as in the example above.
Add the configuration to the file that stores your sylius template event settings:

.. code-block:: yaml
# config.yaml
sylius_ui:
events:
sylius.shop.layout.header.grid:
blocks:
logo: 'bundles/SyliusShopBundle/Layout/Header/_logo.html.twig'
If you want to learn more about template customization with sylius template events - click :doc:`here</customization/template>`.

.. hint::

We encourage to create and register another ``.yaml`` file to store template changes for more clarity in configuration files.

.. hint::

Expand Down
1 change: 1 addition & 0 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PARALLEL, true);
$parameters->set(Option::PATHS, ['src/Sylius']);
$parameters->set(Option::SKIP, [
InlineDocCommentDeclarationSniff::class . '.MissingVariable',
InlineDocCommentDeclarationSniff::class . '.NoAssignment',
Expand Down

0 comments on commit e389f53

Please sign in to comment.