Skip to content

Commit

Permalink
feature Sylius#14314 [CatalogPromotions][Docs] Removing of catalog pr…
Browse files Browse the repository at this point in the history
…omotions documented (Rafikooo)

This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12 <!-- see the comment below -->                  |
| Bug fix?        | no                                                       |
| New feature?    | yes                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no <!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | Sylius#14270 Sylius#14291
| License         | MIT                                                          |

<img width="791" alt="image" src="https://user-images.githubusercontent.com/40125720/190518685-4b30f80e-8c19-411f-ab15-6669318391a2.png">

<img width="799" alt="image" src="https://user-images.githubusercontent.com/40125720/190518521-82f1814d-6fc6-4d91-9702-b32c52f24c1e.png">



Commits
-------

620a7ba [CatalogPromotions][Docs] Removing of catalog promotions documented
  • Loading branch information
GSadee authored Sep 16, 2022
2 parents e4b0bce + 620a7ba commit 4f19c64
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docs/book/products/catalog_promotions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,13 @@ After changes in CatalogPromotion, we dispatch proper message with delay calcula

.. warning::

To enable asynchronous Catalog Promotion, remember about running messenger consumer in a separate process, use the command: ``php bin/console messenger:consume main``
To enable asynchronous Catalog Promotion, remember about running messenger consumer in a separate process, use the command: ``php bin/console messenger:consume main catalog_promotion_removal``
For more information check official `Symfony docs <https://symfony.com/doc/current/messenger.html#consuming-messages-running-the-worker>`_

.. note::

The reason why we use two transports is explained below in the Catalog Promotion removal section.

Catalog promotion synchronicity
-------------------------------

Expand Down Expand Up @@ -351,6 +355,21 @@ Any changes in Catalog Promotion cause recalculations of entire Product Catalog

If you want to reapply Catalog Promotion manually you can refer to the :ref:`How to create a Catalog Promotion Scope and Action? <how-to-create-a-catalog-promotion-scope-and-action>` section

Removal of catalog promotion
---------------------------------------

Removal of the catalog promotion consists in turning off the promotion, recalculation of the catalog
and the actual removal of the promotion resource. By using catalog promotions in asynchronous mode,
it is necessary to start the worker for two transports, the **main** transport is responsible for recalculation of the catalog
and the **catalog_promotion_removal** transport is self explanatory. The order of transports provided as the command arguments is important,
it is responsible for the priority of consumed messages:

.. code-block:: bash
php bin/console messenger:consume main catalog_promotion_removal
For synchronous processing, no additional configuration is required.

How to manage catalog promotion priority?
-----------------------------------------

Expand Down

0 comments on commit 4f19c64

Please sign in to comment.