Skip to content

Commit 09308ad

Browse files
committed
Merge remote-tracking branch 'origin/discounts-introduction' into discounts
2 parents 5cce202 + 556b7c1 commit 09308ad

File tree

9 files changed

+256
-9
lines changed

9 files changed

+256
-9
lines changed

docs/discounts/discounts.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
description: Discounts help store managers reduce prices on products or product categories.
3+
page_type: landing_page
4+
editions:
5+
- lts-update
6+
- commerce
7+
month_change: true
8+
---
9+
10+
# Discounts
11+
12+
With the Discounts feature, store managers can reduce prices on specific products or categories for all or selected customers.
13+
After you install it, temporary or permanent discounts can be applied against items from the product catalog or cart.
14+
15+
You can also extend the feature, for example by creating custom pricing rules, application conditions, or changing discount priorities.
16+
17+
[[= cards([
18+
"discounts/discounts_guide",
19+
"discounts/install_discounts"
20+
], columns=4) =]]

docs/discounts/discounts_guide.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
---
2+
description: Discounts LTS Update enables reducing prices on products or product categories based on a detailed logic resolution.
3+
month_change: false
4+
editions:
5+
- lts-update
6+
- commerce
7+
---
8+
9+
# Discounts product guide
10+
11+
## What are Discounts
12+
13+
Just like brick-and-mortar shops, online stores use clever strategies to attract new customers, keep loyal ones, boost sales, highlight special products, and clear out inventory.
14+
15+
One powerful technique that helps achieve these goals is offering discounts.
16+
Discounts allow online stores to temporarily or permanently reduce prices on specific products or categories, making deals more attractive to potential buyers.
17+
They can be used to encourage first-time purchases, reward loyal customers, promote new or slow-moving items, or drive sales during seasonal events.
18+
By displaying discounted prices clearly in the catalog or cart, businesses can create a sense of urgency, increase customer satisfaction, and ultimately boost revenue.
19+
20+
[[= product_name =]] can be equipped with the Discounts [LTS update](editions.md#lts-updates) that introduces a highly extensible solution for building discounts.
21+
22+
Store managers can create general discounts that apply for products from the product catalog or specific discounts that apply for products in the customer's shopping cart.
23+
They can choose how the discount is calculated and set conditions to decide when their discounts are applied.
24+
25+
The conditions used to limit the applicability of a discount include, for example, rules that check whether:
26+
27+
- the product belongs to a specific category
28+
- the customer belongs to a specific customer group
29+
- minimum purchase amount (total cart value) is met
30+
- minimum purchase quantity (per product) is met
31+
32+
!!! note "Difference between discounts and price rules"
33+
34+
Unlike flexible and highly configurable discounts, [prices applied to customer groups](prices.md#custom-pricing) cannot have time limits, only apply to specific customer groups, and do not offer flexibility to adjust prices at cart level.
35+
36+
## Availability
37+
38+
Discounts are an opt-in capability available as an [LTS update](editions.md#lts-updates) starting with the v4.6.19 version of [[= product_name_com =]].
39+
To begin using Discounts, you must first [install the required packages and perform initial configuration](install_discounts.md).
40+
41+
## How it works
42+
43+
The discount feature hooks into the price resolving logic of products, allowing you to modify it before it's displayed to the customers.
44+
45+
### Core concepts
46+
47+
#### Discounts
48+
49+
Discounts are reductions in the price of a product, typically implemented as part of a marketing campaign.
50+
51+
Discounts are applied in two places:
52+
53+
- **Catalog discounts** are activated when browsing the product catalog and do not require any action from the customer to be activated
54+
- **Cart discounts** can activate when entering the [cart](cart.md), if the right conditions are met. They may also require entering a discount code to be activated
55+
56+
A shopping cart can have multiple active discounts, but a specific product can only have a single discount applied to it at a time.
57+
58+
When two or more discounts could be applied to a single product, the system evaluates the following properties to choose the right one:
59+
60+
- discount activation place (cart discounts rank higher over catalog discounts)
61+
- discount priority (higher priority ranks higher)
62+
- discount creation date (newer discounts rank higher)
63+
64+
The properties are evaluated in the order given above until a single discount is selected.
65+
66+
#### Discount properties
67+
68+
After choosing where the discount applies (catalog or cart), you can choose the discount type:
69+
70+
- **Fixed amount** - where a specified amount of money, for example, 5 Euro, is deducted from the base price of the product
71+
- **Percentage** - where a specified percentage, for example, 10%, is used to calculate the deducted amount from the product's base price
72+
73+
Discounts are translatable and you can limit them to specific [regions](pim_guide.md#regions) or a single currency.
74+
They can be permanent or be active only in a specified time frame.
75+
Regardless of the specified dates, you can disable a discount at any time to prevent customers from using it.
76+
77+
The discount data is split into two parts:
78+
79+
- name and description add internal information for the store managers
80+
- promotion information add additional information displayed to the customers
81+
82+
#### Target groups
83+
84+
With discounts, you can target your entire customer base or only a subset of it belonging to specified [customer groups](customer_groups.md).
85+
86+
#### Product selection
87+
88+
All products, including [product variants](pim_guide.md#product-variants), can be selected when creating a discount. You can also limit this choice to a subset of products:
89+
90+
- belonging to selected [product categories](pim_guide.md#product-categories)
91+
- hand-picked manually for special cases
92+
93+
#### Conditions
94+
95+
For **cart discounts**, you can specify additional conditions that must be met for the discount to apply.
96+
97+
These conditions can include:
98+
99+
- minimum purchase quantity (per product)
100+
- minimum purchase amount (total cart value)
101+
- special [discount codes](#discount-codes)
102+
103+
##### Discount codes
104+
105+
For **cart discounts**, you can specify an additional text value that needs to be entered in the cart for the discount to apply.
106+
107+
The discount code usage can be limited per customer:
108+
109+
- single use: every customer can use this code only once
110+
- limited use: every customer can use the code a specified number of times
111+
- unlimited
112+
113+
## Capabilities
114+
115+
### Management
116+
117+
Users with the appropriate permissions, governed by role-based policies, can control the lifecycle of discounts by creating, editing, and deleting them.
118+
Additionally, discount configurations can be enabled or disabled depending on the organization's needs.
119+
120+
![Discount management screen](img/discount_list.png)
121+
122+
An intuitive discounts interface displays a list of all available discounts.
123+
Here, you can search for specific discounts and filter them by type, status, or more.
124+
By accessing the detailed view of individual discounts, you can quickly review all their parameters.
125+
126+
### Extensibility
127+
128+
Built-in discount types offer a good starting point, but the real power of the discounts lies in extensibility.
129+
Extending discounts opens up new possibilities for building promotional campaigns that help move stock and attach customers.
130+
131+
For example, [[= product_name =]] could apply a special discount when a customer places their 1st, 3rd, or 100th order in the storefront.
132+
This encourages first-time purchases and drives long-term customer loyalty.
133+
134+
## Use cases
135+
136+
Out of the box, the [[= product_name_base =]] Discounts LTS update comes with multiple discount types that can be applied in the following use cases.
137+
138+
### End of Season Sale
139+
140+
Create a permanent discount for products manufactured last season to increase attention for them.
141+
142+
### Temporary sales
143+
144+
Create urgency by offering promoted sales that are active only in a specified time frame to attract new customers or increase conversation, for example during events like Black Week or Cyber Monday.
145+
146+
### Reward loyal customers
147+
148+
Make your newsletters readers or chosen customer groups feel special by providing them with a dedicated discount that applies only to them, either by manually selecting a target audience, or by using a discount code.
149+
150+
### Reward large purchases
151+
152+
Encourage larger purchases and increase the average order size by applying an automatic discount when the purchase amount or quantity exceeds specified threshold.

docs/discounts/img/discount_list.png

135 KB
Loading

docs/discounts/install_discounts.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
description: Install the Discounts LTS update.
3+
month_change: true
4+
editions:
5+
- lts-update
6+
- commerce
7+
---
8+
9+
# Install Discounts
10+
11+
Discounts are available as an LTS update to [[= product_name_com =]], starting with version v4.6.19 or higher.
12+
To use this feature you must first install the packages and configure them.
13+
14+
## Install packages
15+
16+
Run the following commands to install the packages:
17+
18+
``` bash
19+
composer require ibexa/discounts ibexa/discount-codes
20+
```
21+
22+
These commands add the feature code, service handlers, helper Twig templates, and configurations required for using Discounts.
23+
It also modifies the permission system to account for the new functionality.
24+
25+
## Configure Discounts
26+
27+
Once the packages are installed, before you can start using Discounts, you must enable them by following these instructions.
28+
29+
### Modify the database schema
30+
31+
Run the following command, where `<database_name>` is the same name that you defined when you [installed [[= product_name =]]](../getting_started/install_ibexa_dxp.md#change-installation-parameters).
32+
33+
=== "MySQL"
34+
``` bash
35+
mysql -u <username> -p <password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/commerce/ibexa-4.6.latest-discounts-lts-update.sql
36+
```
37+
38+
=== "PostgreSQL"
39+
40+
``` bash
41+
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/commerce/ibexa-4.6.latest-discounts-lts-update.sql
42+
```
43+
44+
This command modifies the existing database schema by adding database configuration required for using Discounts.
45+
46+
### Configuration (optional)
47+
48+
Use the built-in SiteAccess-aware parameters to change the default discount configuration.
49+
50+
The following settings are available:
51+
52+
- `list_per_page_limit` controls the number of discounts displayed on a single page in discount list view
53+
- `products_list_per_page_limit` controls the number of products displayed on a single page in a discount details view
54+
55+
You can set them as in the following example:
56+
57+
``` yaml
58+
ibexa:
59+
system:
60+
admin_group:
61+
discounts:
62+
pagination:
63+
list_per_page_limit: 10
64+
products_list_per_page_limit: 15
65+
```
66+
67+
You can now restart you application and start working with the Discounts feature.

docs/ibexa_products/editions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ The features brought by LTS Updates become standard parts of the next LTS releas
6464
|-----------------|-----------------|-----------------|-----------------|
6565
| [AI Actions](ai_actions_guide.md) | &#10004; | &#10004; | &#10004; |
6666
| [Date and time attribute type](date_and_time.md) | &#10004; | &#10004; | &#10004; |
67+
| [Discounts](discounts.md) | | | &#10004; |

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@
8989
<div class="col-12 col-lg-6">
9090
<div class="notification notification--lts-update" id="tile3">
9191
<div class="notification__content">
92-
<h2>The newest LTS Update is the Date and time attribute type</h2>
93-
<div>Install it to add time-related values to product specifications.</div>
92+
<h2>The newest LTS Update is Discounts</h2>
93+
<div>Install it to reduce prices on specific products, making deals more attractive to potential buyers.</div>
9494
</div>
9595
<div class="notification__cta">
96-
<a href="pim/attributes/date_and_time">Learn more about this LTS Update</a>
96+
<a href="discounts/discounts">Learn more about this LTS Update</a>
9797
<a href="ibexa_products/editions#lts-updates">Discover other LTS Updates</a>
9898
</div>
9999
<div class="notification__image">

docs/product_guides/product_guides.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Discover the primary ones with the help of product guides. Condensed content all
1212
[[= cards([
1313
"users/user_management_guide",
1414
"content_management/content_management_guide",
15+
"discounts/discounts_guide",
1516
"content_management/rich_text/online_editor_guide",
1617
"content_management/pages/page_builder_guide",
1718
"content_management/forms/form_builder_guide",

mkdocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,11 @@ nav:
401401
- Transactional emails: commerce/transactional_emails/transactional_emails.md
402402
- Transactional email variables reference: commerce/transactional_emails/transactional_emails_parameters.md
403403
- Customize transactional emails: commerce/transactional_emails/extend_transactional_emails.md
404+
- Discounts:
405+
- Discounts: discounts/discounts.md
406+
- Discounts guide: discounts/discounts_guide.md
407+
- Install Discounts: discounts/install_discounts.md
408+
# - Extend Discounts: discounts/extend_discounts.md
404409
- Customer management:
405410
- Customer Portal: customer_management/customer_portal.md
406411
- Customer Portal guide: customer_management/customer_portal_guide.md

theme/main.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,16 @@
6262
{% endfor %}
6363
<li class="breadcrumb-item breadcrumb-item-current">{{ page.title }}</li>
6464
</ul>
65-
{% if page.meta.edition %}
65+
{% if page.meta.edition or page.meta.editions %}
6666
<div class="pills">
67-
{% if page.meta.edition == 'commerce' %}
68-
<span class="pill pill--commerce"></span>
69-
{% elif page.meta.edition == 'experience' %}
70-
<span class="pill pill--experience"></span><span class="pill pill--commerce"></span>
71-
{% elif page.meta.edition == 'lts-update' %}
67+
{% if page.meta.edition == 'lts-update' or 'lts-update' in page.meta.editions %}
7268
<span class="pill pill--lts-update"></span>
7369
{% endif %}
70+
{% if page.meta.edition == 'experience' or 'experience' in page.meta.editions %}
71+
<span class="pill pill--experience"></span><span class="pill pill--commerce"></span>
72+
{% elif page.meta.edition == 'commerce' or 'commerce' in page.meta.editions %}
73+
<span class="pill pill--commerce"></span>
74+
{% endif %}
7475
</div>
7576
{% endif %}
7677
{% include "partials/eol_warning.html" %}

0 commit comments

Comments
 (0)