Refactor docs from promotion to cart promotion

This commit is contained in:
arti0090 2021-10-12 10:28:29 +02:00
parent 742be52be7
commit 87ef7fd00e
5 changed files with 21 additions and 21 deletions

View file

@ -228,5 +228,5 @@ Learn more
* :doc:`Promotion - Component Documentation </components_and_bundles/components/Promotion/index>`
* :doc:`Promotion - Bundle Documentation </components_and_bundles/bundles/SyliusPromotionBundle/index>`
* :doc:`How to create a custom promotion rule? </cookbook/promotions/custom-promotion-rule>`
* :doc:`How to create a custom promotion action? </cookbook/promotions/custom-promotion-action>`
* :doc:`How to create a custom promotion rule? </cookbook/promotions/custom-cart-promotion-rule>`
* :doc:`How to create a custom promotion action? </cookbook/promotions/custom-cart-promotion-action>`

View file

@ -71,9 +71,9 @@ Promotions
.. toctree::
:hidden:
promotions/custom-cart-promotion-rule
promotions/custom-cart-promotion-action
promotions/custom-catalog-promotion-scope
promotions/custom-promotion-rule
promotions/custom-promotion-action
.. include:: /cookbook/promotions/map.rst.inc

View file

@ -1,12 +1,12 @@
How to add a custom promotion action?
=====================================
How to add a custom cart promotion action?
==========================================
Let's assume that you would like to have a promotion that gives **100% discount on the cheapest item in the cart**.
Let's assume that you would like to have a cart promotion that gives **100% discount on the cheapest item in the cart**.
See what steps need to be taken to achieve that:
Create a new promotion action
-----------------------------
Create a new cart promotion action
----------------------------------
You will need a new class ``CheapestProductDiscountPromotionActionCommand``.
@ -85,7 +85,7 @@ This class needs also a ``isConfigurationValid()`` method which was omitted in t
Prepare a configuration form type for the admin panel
-----------------------------------------------------
The new action needs a form type to be available in the admin panel, while creating a new promotion.
The new action needs a form type to be available in the admin panel, while creating a new cart promotion.
.. code-block:: php
@ -134,8 +134,8 @@ In the ``config/services.yaml`` configure:
tags:
- { name: form.type }
Create a new promotion with your action
---------------------------------------
Create a new cart promotion with your action
--------------------------------------------
Go to the admin panel of your system. On the ``/admin/promotions/new`` url you can create a new promotion.
@ -147,4 +147,4 @@ Learn more
----------
* :doc:`Customization Guide </customization/index>`
* :doc:`Promotions Concept Documentation </customization/index>`
* :doc:`Cart Promotions Concept Documentation </book/orders/cart-promotions>`

View file

@ -1,12 +1,12 @@
How to add a custom promotion rule?
===================================
How to add a custom cart promotion rule?
========================================
Adding new, custom rules to your shop is a common usecase. You can imagine for instance, that you have some customers
in your shop that you distinguish as premium. And for these premium customers you would like to give special promotions.
For that you will need a new PromotionRule that will check if the customer is premium or not.
Create a new promotion rule
---------------------------
Create a new cart promotion rule
--------------------------------
The new Rule needs a RuleChecker class:
@ -35,7 +35,7 @@ The new Rule needs a RuleChecker class:
Prepare a configuration form type for your new rule
---------------------------------------------------
To be able to configure a promotion with your new rule you will need a form type for the admin panel.
To be able to configure a cart promotion with your new rule you will need a form type for the admin panel.
Create the configuration form type class:
@ -92,4 +92,4 @@ Learn more
----------
* :doc:`Customization Guide </customization/index>`
* :doc:`Promotions Concept Documentation </customization/index>`
* :doc:`Cart Promotions Concept Documentation </book/orders/cart-promotions>`

View file

@ -1,3 +1,3 @@
* :doc:`/cookbook/promotions/custom-cart-promotion-action`
* :doc:`/cookbook/promotions/custom-cart-promotion-rule`
* :doc:`/cookbook/promotions/custom-catalog-promotion-scope`
* :doc:`/cookbook/promotions/custom-promotion-action`
* :doc:`/cookbook/promotions/custom-promotion-rule`