Skip to content

Commit 99d279c

Browse files
committed
Discount product guide
1 parent f01c5f7 commit 99d279c

9 files changed

Lines changed: 281 additions & 7 deletions

File tree

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: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
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](ibexa_dxp_v4.6.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+
Once the target is selected, they can set the type of discount by choosing a discount calculation rule.
24+
Then they can use an extended set of conditions to decide when their discounts are applied.
25+
26+
Out of the box, the Discounts module delivers two types of discounts:
27+
28+
- "Fixed amount" - where a specified amount of money, for example, 5 Euro, is deducted from the base price of the product
29+
- "Percentage" - where a specified percentage, for example, 10%, is used to calculate the deducted amount from the product
30+
31+
A selection of conditions used to limit the applicability of a discount is broader, and includes, for example, rules that check whether:
32+
33+
- the product belongs to a specific category
34+
- the customer belongs to a specific customer group
35+
- the purchase is made within a defined time frame
36+
- a minimum purchase amount is met (per cart)
37+
- a minimum quantity amount is met (per product)
38+
39+
!!! note "Difference between discounts and price rules"
40+
41+
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.
42+
43+
## Availability
44+
45+
Discounts are an opt-in capability available as an [LTS update](editions.md#lts-updates) starting with the v4.6.XX version of [[= product_name_com =]].
46+
To begin using Discounts, you must first [install the required packages and perform initial configuration](install_discounts.md).
47+
48+
## How it works
49+
50+
The discount feature hooks into the price resolving logic of products, allowing you to modify it before it's displayed to the customers.
51+
52+
### Core concepts
53+
54+
#### Discounts
55+
56+
Discounts are reductions in the price of a product, typically implemented as part of a marketing campaign.
57+
58+
Discounts are applied in two places:
59+
60+
- **catalog** discounts are activated when browsing the product catalog and do not require any action from the customer to be activated
61+
- **cart discounts** are activated when browsing the [cart](cart.md) and may require entering a discount code to be activated
62+
63+
A shopping cart can have multiple active discounts, but a specific product can only have a single discount applied at a time.
64+
65+
When two or more discounts could be applied to a single product, the system evaluates the following properties to choose the right one:
66+
67+
- discount activation place (cart discounts rank higher over catalog discounts)
68+
- discount priority (higher priority ranks higher)
69+
- creation date (newer discounts ranks higher)
70+
71+
The properties are evaluated in the order given above until a single discount is selected.
72+
73+
#### Discount properties
74+
75+
After choosing where the discount applies (catalog or cart), you can choose the discount type:
76+
77+
- "Fixed amount" - where a specified amount of money, for example, 5 Euro, is deducted from the base price of the product
78+
- "Percentage" - where a specified percentage, for example, 10%, is used to calculate the deducted amount from the product
79+
80+
Discounts are translatable and are valid for specific [regions](pim_guide.md#regions)and currencies.
81+
They can be permanent or be active only in a specified time frame.
82+
83+
The discount data is split into two parts:
84+
85+
- name and description act internal information for the store managers
86+
- promotion information acts as additional information displayed to the customers
87+
88+
#### Target groups
89+
90+
With discounts, you can target your entire customer base or only a subset of it belonging to specified [customer groups](customer_group.md).
91+
92+
#### Product selection
93+
94+
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:
95+
96+
- belonging to selected [product categories](pim_guide.md#product-categoties)
97+
- hand-picked manually for special cases
98+
99+
#### Conditions
100+
101+
For **cart discounts**, you can specify additional conditions that must be met for the discount to apply.
102+
103+
These conditions can include:
104+
105+
- minimum purchase quantity (per product)
106+
- minimum purchase amount (total cart value)
107+
- special discount codes
108+
109+
##### Discount codes
110+
111+
For **cart discounts**, you can specify an additional text value that needs to be entered during checkout for the discount to apply.
112+
113+
The discount code usage can be limited per customer:
114+
115+
- single use: every customer can use this code only once
116+
- limited use: every customer can use the code a specified number of times
117+
- unlimited
118+
119+
## Capabilities
120+
121+
### Management
122+
123+
Users with the appropriate permissions, governed by role-based policies, can control the lifecycle of Discounts by creating, editing, and deleting them.
124+
Additionally, Discount configurations can be enabled or disabled depending on the organization's needs.
125+
126+
TODO
127+
![Discount management screen](img/discount_list.png)
128+
129+
An intuitive Discounts interface displays a list of all available Discounts.
130+
Here, you can search for specific discounts and filter them by type or status.
131+
By accessing the detailed view of individual Discounts, you can quickly review all their parameters.
132+
133+
### Extensibility
134+
135+
Built-in Discount types offer a good starting point, but the real power of the Discounts lies in extensibility.
136+
Extending Discounts opens up new possibilities for building promotional campaigns that help move stock and attach customers.
137+
138+
For example, [[= product_name =]] could apply a special discount when a customer places their 1st, 3rd, or 100th order in the storefront.
139+
This would encourages first-time purchases, repeat business, and long-term customer loyalty.
140+
141+
## Use cases
142+
143+
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.
144+
145+
### End of Season Sale
146+
147+
Create a permanent discount for products manufactured last season to increase attention for them.
148+
149+
### Temporary sales
150+
151+
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.
152+
153+
### Reward loyal customers
154+
155+
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.
156+
157+
### Reward large purchases
158+
159+
Encourage larger purchases and increase the average order size by applying an automatic discount when the purchase amount or quantity exceeds specified threshold.
135 KB
Loading
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.18 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 are 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: 26 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
@@ -584,6 +589,18 @@ nav:
584589
- RangeMeasurementAttributeMaximum: search/criteria_reference/rangemeasurementattributemaximum_criterion.md
585590
- SimpleMeasurementAttribute: search/criteria_reference/simplemeasurementattribute_criterion.md
586591
- SelectionAttribute: search/criteria_reference/selectionattribute_criterion.md
592+
- Discount Search Criteria:
593+
- Discount Search Criteria: search/criteria_reference/discount_search_criteria.md
594+
- CompanyName: search/criteria_reference/order_company_name_criterion.md
595+
- CreatedAt: search/criteria_reference/order_created_criterion.md
596+
- CurrencyCode: search/criteria_reference/order_currency_code_criterion.md
597+
- CustomerName: search/criteria_reference/order_customer_name_criterion.md
598+
- Identifier: search/criteria_reference/order_identifier_criterion.md
599+
- IsCompanyAssociated: search/criteria_reference/order_company_associated_criterion.md
600+
- Owner: search/criteria_reference/order_owner_criterion.md
601+
- Price: search/criteria_reference/order_price_criterion.md
602+
- Source: search/criteria_reference/order_source_criterion.md
603+
- Status: search/criteria_reference/order_status_criterion.md
587604
- Order Search Criteria:
588605
- Order Search Criteria: search/criteria_reference/order_search_criteria.md
589606
- CompanyName: search/criteria_reference/order_company_name_criterion.md
@@ -694,6 +711,15 @@ nav:
694711
- ProductStockRange: search/criteria_reference/productstockrange_criterion.md
695712
- ProductCode: search/sort_clause_reference/productcode_sort_clause.md
696713
- ProductName: search/sort_clause_reference/productname_sort_clause.md
714+
- Discount Sort Clauses:
715+
- Discount Sort Clauses: search/sort_clause_reference/discount_sort_clauses.md
716+
- CreatedAt: search/sort_clause_reference/discount_enddate_sort_clause.md
717+
- EndDate: search/sort_clause_reference/discount_createdat_sort_clause.md
718+
- Identifier: search/sort_clause_reference/discount_identifier_sort_clause.md
719+
- Priority: search/sort_clause_reference/discount_priority_sort_clause.md
720+
- StartDate: search/sort_clause_reference/discount_sstartdate_sort_clause.md
721+
- Type: search/sort_clause_reference/discount_type_sort_clause.md
722+
- UpdatedAt: search/sort_clause_reference/discount_updatedat_sort_clause.md
697723
- Order Sort Clauses:
698724
- Order Sort Clauses: search/sort_clause_reference/order_sort_clauses.md
699725
- Id: search/sort_clause_reference/order_id_sort_clause.md

theme/main.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@
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' %}
67+
{% if page.meta.edition == 'commerce' or 'commerce' in page.meta.editions %}
6868
<span class="pill pill--commerce"></span>
69-
{% elif page.meta.edition == 'experience' %}
69+
{% elif page.meta.edition == 'experience' or 'experience' in page.meta.editions %}
7070
<span class="pill pill--experience"></span><span class="pill pill--commerce"></span>
71-
{% elif page.meta.edition == 'lts-update' %}
71+
{% elif page.meta.edition == 'lts-update' or 'lts-update' in page.meta.editions %}
7272
<span class="pill pill--lts-update"></span>
7373
{% endif %}
7474
</div>

0 commit comments

Comments
 (0)