Skip to content

Commit bab5296

Browse files
committed
Adjusted highlights and links to 5.0 version
1 parent 308b556 commit bab5296

File tree

4 files changed

+53
-8
lines changed

4 files changed

+53
-8
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"Discount": {
3+
"_media-type": "application/vnd.ibexa.api.Discount+json",
4+
"id": 1,
5+
"identifier": "summersale2025",
6+
"name": "SummerSale2025",
7+
"type": "catalog",
8+
"label": "Summer Sale 2025",
9+
"labelDescription": "Summer Sale 2025",
10+
"priority": 1,
11+
"isEnabled": true,
12+
"createdAt": "2025-06-10T09:43:42+00:00",
13+
"updatedAt": "2025-06-10T09:48:23+00:00",
14+
"startDate": "2025-07-01T09:34:19+00:00",
15+
"endDate": "2025-07-31T12:00:00+00:00",
16+
"DiscountExpressionAware": {
17+
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
18+
"expressionValues": {
19+
"discount_amount": "10"
20+
}
21+
},
22+
"DiscountConditions": [
23+
{
24+
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
25+
"expressionValues": {
26+
"currency_code": "USD"
27+
}
28+
}
29+
],
30+
"DiscountTranslations": [
31+
{
32+
"_media-type": "application/vnd.ibexa.api.DiscountTranslation+json",
33+
"languageCode": {},
34+
"name": "SummerSale2025",
35+
"description": null,
36+
"label": "Summer Sale 2025",
37+
"labelDescription": "Summer Sale 2025"
38+
}
39+
]
40+
},
41+
"isDiscountCodeAware": {
42+
"_media-type": "application/vnd.ibexa.api.isDiscountCodeAware+json",
43+
"isDiscountCodeAware": false
44+
}
45+
}

docs/discounts/discounts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can also extend the feature, for example, by creating custom pricing rules,
1919
"discounts/discounts_guide",
2020
"discounts/configure_discounts",
2121
("permissions/policies#discounts", "Policies", "Learn about the available Discounts policies"),
22-
("https://doc.ibexa.co/projects/userguide/en/4.6/commerce/discounts/work_with_discounts/"),
22+
("https://doc.ibexa.co/projects/userguide/en/5.0/commerce/discounts/work_with_discounts/"),
2323
], columns=2) =]]
2424

2525
## Development
@@ -29,7 +29,7 @@ You can also extend the feature, for example, by creating custom pricing rules,
2929
"discounts/extend_discounts",
3030
"discounts/extend_discounts_wizard",
3131
"api/event_reference/discounts_events",
32-
("https://doc.ibexa.co/en/4.6/api/rest_api/rest_api_reference/rest_api_reference.html#discounts", "REST API Reference", "See the available endpoints for Discounts"),
32+
("https://doc.ibexa.co/en/5.0/api/rest_api/rest_api_reference/rest_api_reference.html#tag/Discounts", "REST API Reference", "See the available endpoints for Discounts"),
3333
"templating/twig_function_reference/discounts_twig_functions",
3434
"search/discounts_search_reference/discounts_criteria",
3535
"search/discounts_search_reference/discounts_sort_clauses",

docs/discounts/discounts_api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ See the following examples for data migrations and the REST API usage:
6060
- parsing responses from the [REST API](https://doc.ibexa.co/en/4.6/api/rest_api/rest_api_reference/rest_api_reference.html#discounts):
6161

6262
``` json hl_lines="16-21"
63-
[[= include_file('docs/api/rest_api/rest_api_reference/input/examples/discounts/Discount.json.example', 0, 21) =]]
64-
[[= include_file('docs/api/rest_api/rest_api_reference/input/examples/discounts/Discount.json.example', 44, 45) =]]
63+
[[= include_file('code_samples/discounts/REST/Discount.json', 0, 21) =]]
64+
[[= include_file('code_samples/discounts/REST/Discount.json', 44, 45) =]]
6565
```
6666

6767
### Conditions
@@ -98,8 +98,8 @@ See the following examples for data migrations and the REST API usage:
9898
- parsing responses from the [REST API](https://doc.ibexa.co/en/4.6/api/rest_api/rest_api_reference/rest_api_reference.html#discounts):
9999

100100
``` json hl_lines="16-23"
101-
[[= include_file('docs/api/rest_api/rest_api_reference/input/examples/discounts/Discount.json.example', 0, 15) =]][[= include_file('docs/api/rest_api/rest_api_reference/input/examples/discounts/Discount.json.example', 21, 29) =]]
102-
[[= include_file('docs/api/rest_api/rest_api_reference/input/examples/discounts/Discount.json.example', 44, 45) =]]
101+
[[= include_file('code_samples/discounts/REST/Discount.json', 0, 15) =]][[= include_file('code_samples/discounts/REST/Discount.json', 21, 29) =]]
102+
[[= include_file('code_samples/discounts/REST/Discount.json', 44, 45) =]]
103103
```
104104

105105
### Priority
@@ -180,6 +180,6 @@ The example below shows how you can use:
180180
- [`PriceEnvelopeInterface`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ProductCatalog-Values-Price-PriceEnvelopeInterface.html) to retrieve applied discounts
181181
- [`OrderServiceInterface`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-OrderServiceInterface.html) to display discount details for [orders](order_management.md)
182182

183-
``` php hl_lines="77-78 84-85 87-100 104-130"
183+
``` php hl_lines="51-52 58-59 61-74 78-104"
184184
[[= include_file('code_samples/discounts/src/Command/OrderPriceCommand.php') =]]
185185
```

docs/discounts/extend_discounts_wizard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ To create it, create a dedicated class implementing the [`DiscountValueFormTypeM
158158

159159
and add a dedicated value type class:
160160

161-
``` php hl_lines="26-40 47-61 72"
161+
``` php hl_lines="26-38 45-59 71"
162162
[[= include_file('code_samples/discounts/src/Form/Type/DiscountValue/PurchasingPowerParityValueType.php') =]]
163163
```
164164

0 commit comments

Comments
 (0)