Skip to content

Commit

Permalink
[CatalogPromotions][Docs] Removing of catalog promotions documented
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafikooo committed Sep 15, 2022
1 parent de79fcd commit 620a7ba
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 620a7ba

Please sign in to comment.