Skip to content

Commit 33f788b

Browse files
authored
docs: fix name of caching redis module (#13788)
1 parent 76f9da5 commit 33f788b

File tree

3 files changed

+115
-7
lines changed

3 files changed

+115
-7
lines changed

www/apps/book/app/learn/deployment/general/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ module.exports = defineConfig({
151151
options: {
152152
providers: [
153153
{
154-
resolve: "@medusajs/cache-redis",
154+
resolve: "@medusajs/caching-redis",
155155
id: "caching-redis",
156156
is_default: true,
157157
options: {

www/apps/book/generated/edit-dates.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const generatedEditDates = {
9494
"app/learn/fundamentals/custom-cli-scripts/seed-data/page.mdx": "2025-09-15T16:02:51.362Z",
9595
"app/learn/fundamentals/environment-variables/page.mdx": "2025-05-26T15:06:07.800Z",
9696
"app/learn/build/page.mdx": "2025-10-17T14:48:44.767Z",
97-
"app/learn/deployment/general/page.mdx": "2025-09-29T10:21:24.768Z",
97+
"app/learn/deployment/general/page.mdx": "2025-10-21T07:39:08.998Z",
9898
"app/learn/fundamentals/workflows/multiple-step-usage/page.mdx": "2025-08-01T14:59:59.501Z",
9999
"app/learn/installation/page.mdx": "2025-07-23T14:28:50.404Z",
100100
"app/learn/fundamentals/data-models/check-constraints/page.mdx": "2025-07-25T13:50:21.065Z",

www/apps/book/public/llms-full.txt

Lines changed: 113 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6534,7 +6534,7 @@ module.exports = defineConfig({
65346534
options: {
65356535
providers: [
65366536
{
6537-
resolve: "@medusajs/cache-redis",
6537+
resolve: "@medusajs/caching-redis",
65386538
id: "caching-redis",
65396539
is_default: true,
65406540
options: {
@@ -37367,7 +37367,7 @@ The [ApplicationMethod data model](https://docs.medusajs.com/references/promotio
3736737367
|---|---|---|
3736837368
|\`type\`|Does the promotion discount a fixed amount or a percentage?|\`fixed\`|
3736937369
|\`target\_type\`|Is the promotion applied to a cart item, shipping method, or the entire order?|\`items\`|
37370-
|\`allocation\`|Is the discounted amount applied to each item or split between the applicable items?|\`each\`|
37370+
|\`allocation\`|Is the discounted amount applied to each item, split between the applicable items, or applied on specific number of items?|\`each\`|
3737137371

3737237372
## Target Promotion Rules
3737337373

@@ -37395,7 +37395,11 @@ In this example, the cart must have two product variants with the SKU `SHIRT` fo
3739537395

3739637396
## Maximum Quantity Restriction
3739737397

37398-
When the `allocation` property in the `ApplicationMethod` is set to `each`, you can set the `max_quantity` property of `ApplicationMethod` to limit how many item quantities the promotion is applied to.
37398+
You can restrict how many items the promotion is applied to either at the item level or the cart level.
37399+
37400+
### Item Level Restriction
37401+
37402+
When the `allocation` property in the `ApplicationMethod` is set to `each`, you can set the `max_quantity` property of `ApplicationMethod` to limit how many quantities of each applicable item the promotion is applied to.
3739937403

3740037404
For example, if the `max_quantity` property is set to `1` and the customer has a line item with quantity two in the cart, the promotion is only applied to one of them.
3740137405

@@ -37431,6 +37435,110 @@ This condition is applied on the quantity of every applicable item in the cart.
3743137435
}
3743237436
```
3743337437

37438+
### Cart Level Restriction
37439+
37440+
The `once` allocation type is available from [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0).
37441+
37442+
When the `allocation` property in the `ApplicationMethod` is set to `once`, you must set the `max_quantity` property of `ApplicationMethod`. It limits how many items in total the promotion is applied to.
37443+
37444+
In this scenario, the Promotion Module prioritizes which applicable items the promotion is applied to based on the following rules:
37445+
37446+
1. Prioritize items with the lowest price.
37447+
2. Distribute the promotion sequentially until the `max_quantity` is reached.
37448+
37449+
#### Example 1
37450+
37451+
Consider:
37452+
37453+
- A promotion whose application method has its `allocation` property set to `once` and `max_quantity` set to `2`.
37454+
- A cart with three items having different prices, each with a quantity of `1`.
37455+
37456+
The Promotion Module will apply the promotion to the two items with the lowest price.
37457+
37458+
```json title="Example Cart"
37459+
{
37460+
"cart": {
37461+
"items": [
37462+
{
37463+
"id": "item_1",
37464+
"price": 10,
37465+
"quantity": 1 // The promotion is applied to this item
37466+
},
37467+
{
37468+
"id": "item_2",
37469+
"price": 20,
37470+
"quantity": 1 // The promotion is applied to this item
37471+
},
37472+
{
37473+
"id": "item_3",
37474+
"price": 30,
37475+
"quantity": 1 // The promotion is NOT applied to this item
37476+
}
37477+
]
37478+
}
37479+
}
37480+
```
37481+
37482+
#### Example 2
37483+
37484+
Consider:
37485+
37486+
- A promotion whose application method has its `allocation` property set to `once` and `max_quantity` set to `2`.
37487+
- A cart with two items having different prices and quantities greater than `2`.
37488+
37489+
The Promotion Module will try to apply the promotion to the item with the lowest price first:
37490+
37491+
```json title="Example Cart"
37492+
{
37493+
"cart": {
37494+
"items": [
37495+
{
37496+
"id": "item_1",
37497+
"price": 10,
37498+
"quantity": 3 // The promotion is applied to 2 of this item
37499+
},
37500+
{
37501+
"id": "item_2",
37502+
"price": 20,
37503+
"quantity": 4 // The promotion is NOT applied to this item
37504+
}
37505+
]
37506+
}
37507+
}
37508+
```
37509+
37510+
Since that item has a quantity of `3`, the promotion is applied to `2` of that item, reaching the `max_quantity` limit. The promotion is not applied to the other item.
37511+
37512+
#### Example 3
37513+
37514+
Consider:
37515+
37516+
- A promotion whose application method has its `allocation` property set to `once` and `max_quantity` set to `5`.
37517+
- A cart with two items having different prices and quantities less than `5`.
37518+
37519+
The Promotion Module will try to apply the promotion to the item with the lowest price first:
37520+
37521+
```json title="Example Cart"
37522+
{
37523+
"cart": {
37524+
"items": [
37525+
{
37526+
"id": "item_1",
37527+
"price": 10,
37528+
"quantity": 3 // The promotion is applied to all 3 of this item
37529+
},
37530+
{
37531+
"id": "item_2",
37532+
"price": 20,
37533+
"quantity": 4 // The promotion is applied to 2 of this item
37534+
}
37535+
]
37536+
}
37537+
}
37538+
```
37539+
37540+
The promotion is applied to all `3` quantities of the item with the lowest price. Since the `max_quantity` is `5`, the promotion is applied to `2` quantities of the other item, reaching the `max_quantity` limit.
37541+
3743437542

3743537543
# Campaign
3743637544

@@ -122136,7 +122244,7 @@ export const getCustomerDigitalProducts = async () => {
122136122244

122137122245
headers,
122138122246
next,
122139-
cache: "force-cache",
122247+
cache: "no-cache",
122140122248
})
122141122249

122142122250
return digital_products as DigitalProduct[]
@@ -122314,7 +122422,7 @@ export const getDigitalMediaDownloadLink = async (mediaId: string) => {
122314122422
method: "POST",
122315122423
headers,
122316122424
next,
122317-
cache: "force-cache",
122425+
cache: "no-cache",
122318122426
})
122319122427

122320122428
return url

0 commit comments

Comments
 (0)