Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/discounts/discounts_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Only a single discount can be applied to a given product, and a discount can onl

When creating a rule, not with the user interface but an API, you must pass the required expression values for the rule to be valid:

- using PHP, the values are passed through the constuctor which converts them into an expression variable
- using PHP, the values are passed through the constructor which converts them into an expression variable
- using data migrations and the REST API, the values are specified using the `expressionValues` key

See the following examples for data migrations and the REST API usage:
Expand Down Expand Up @@ -83,7 +83,7 @@ When multiple conditions are specified, all of them must be met.

As with rules, when creating a condition through other means than the user interface, you must pass the required expression values for the condition to be valid:

- using PHP, the values are passed through the constuctor which converts them into an expression variable
- using PHP, the values are passed through the constructor which converts them into an expression variable
- using data migrations and the REST API, the values are specified using the `expressionValues` key

See the following examples for data migrations and the REST API usage:
Expand Down
6 changes: 3 additions & 3 deletions docs/discounts/extend_discounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ And mark it as a service using the `ibexa.discounts.expression_language.variable
- New function: `is_anniversary()`

It's a function returning a boolean value indicating if today is the anniversary of the date passed as an argument.
The function accepts an optional argument, `tolerance`, allowing you to extend the range of dates that are acccepted as anniversaries.
The function accepts an optional argument, `tolerance`, allowing you to extend the range of dates that are accepted as anniversaries.
This implementation is simplified and does not cover the approach for accounts created on February 29 during leap years.

``` php
Expand Down Expand Up @@ -125,7 +125,7 @@ The example uses three expressions:
- the custom `current_user_registration_date` variable, holding the value of current user's registration date
- the custom `tolerance` variable, holding the acceptable tolerance (in days) for the calculation

For each custom condition class, you must create a dedicated condition factory, a class implementing the `\Ibexa\Discounts\Repository\DiscountCondition\DiscountConditionFactoryInterface` inteface.
For each custom condition class, you must create a dedicated condition factory, a class implementing the `\Ibexa\Discounts\Repository\DiscountCondition\DiscountConditionFactoryInterface` interface.

This allows you to create conditions when working in the context of the Symfony service container.

Expand Down Expand Up @@ -173,7 +173,7 @@ It uses three expressions:

- the built-in `amount` variable, holding the purchase amount
- the built-in `get_current_region()` function, returning the current region
- a custom `power_parity_map` variable, holding the purchasing power partity map. It's defined in the constuctor.
- a custom `power_parity_map` variable, holding the purchasing power parity map. It's defined in the constructor

As with conditions, create a dedicated rule factory:

Expand Down
6 changes: 3 additions & 3 deletions docs/pim/price_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ To display a product price on a product page or in the cart, you must calculate
Context contains information about any price modifiers that may apply to a specific customer group.
To determine the final price, or resolve the price, use the [`PriceResolverInterface`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ProductCatalog-PriceResolverInterface.html) service, which takes the following conditions into account:

1. Existance of base price for the product in the specified currency
2. Existance of customer group-related modifiers
3. Existance of applicable [discounts](discounts.md)
1. Existence of base price for the product in the specified currency
2. Existence of customer group-related modifiers
3. Existence of applicable [discounts](discounts.md)

If the base price in the specified currency is missing, the return value is `null`.

Expand Down