Pricing service methods
Version:
Service providers are wrapper objects designed to make it easier to interact with Connect pipelines. The providers implement no logic other than calling Connect pipelines. All of the business logic is implemented in the pipeline processors.
The Pricing service provider contains the following methods for interacting with pricing data.
GetProductPrices method
GetProductPrices method
- Description:: Gets the prices for a specific product.
- Usage:: Called when Sitecore needs the prices for a specific product.
- Signature::
GetProductPricesResult GetProductPrices(GetProductPricesRequest request) - Parameters::
- :
- :
- :
- :
- :
- :
- :
- :
- Returns::
- :
- :
- Exceptions::
- :
Usage example:
GetProductBulkPrices method
GetProductBulkPrices method
- Description:: Gets the bulk prices for a specific product.
- Usage:: Called when Sitecore needs the break prices for a specific product.
- Signature::
GetProductBreakPricesResult GetProductBreakPrices(GetProductBreakPricesRequest request) - Parameters::
- :
- :
- :
- :
- :
- :
- :
- Returns::
- :
- :
- Exceptions::
- :
Usage example:
GetCartTotal method
GetCartTotal method
- Description:: Gets the price for a specific cart.
- Usage:: Called when Sitecore needs the price for a specific cart.
- Signature::
GetCartPriceResult GetCartPrice(GetCartPriceRequest request) - Parameters::
- :
- :
- :
- :
- :
- :
- Returns::
- :
- :
- Exceptions::
- :
Usage example:
GetSupportedCurrencies method
GetSupportedCurrencies method
| Description: | Gets a list of currencies supported by the ECS. | |
|---|---|---|
| Usage: | Called when Sitecore needs the list of supported currencies. | |
| Signature: | GetSupportedCurrenciesResult GetSupportedCurrencies([NotNull] GetSupportedCurrenciesRequest request) | |
| Parameters: | ||
| ShopName – Mandatory The name of the shop. | ||
| Returns: | ||
| IReadOnlyCollection | ||
| SystemMessages - Collection of messages from the external system. | ||
| Exceptions: | ||
| No exceptions are thrown by this method. |
Usage example:
CurrencyChosen method
CurrencyChosen method
| Description: | Raises the Currency Chosen page event . | |
|---|---|---|
| Usage: | Called when Sitecore needs to raise the Currency Chosen event. | |
| Signature: | ServiceProviderResult CurrencyChosen(CurrencyChosenRequest request) | |
| Parameters: | ||
| ShopName – Mandatory The name of the shop. | ||
| ChosenCurrency – Mandatory The chosen currency code. | ||
| Returns: | ||
| SystemMessages - Collection of messages from the external system. | ||
| Exceptions: | ||
| No exceptions are thrown by this method. |
Usage example:
GetEligiblePromotionIds method
GetEligiblePromotionIds method
| Description: | Retrieves the IDs of promotions that can be applied to a product . | |
|---|---|---|
| Usage: | Called to retrieve the IDs of promotions that can be applied to a product, for example, on the product details page. | |
| Signature: | GetEligiblePromotionIdsResult GetEligiblePromotionIds( GetEligiblePromotionIdsRequest request) | |
| Parameters: | ||
| Shop – Mandatory The target shop. | ||
| ProductId – Mandatory The ID of the product for which promotions should be retrieved. | ||
| TargetTime – Optional The time context that will be used to determine which promotions are eligible. | ||
| CustomerId – Optional The ID of the customer for which the promotions are being retrieved. | ||
| Returns: | ||
| PromotionIds - Collection containing the IDs of the promotions that are applicable to the product. | ||
| SystemMessages - Collection of messages from the external system. | ||
| Exceptions: | ||
| No exceptions are thrown by this method. |
Usage example:
GetProductPromotionDescription method
GetProductPromotionDescription method
| Description: | Retrieves the description of a list of promotions for a product. | |
|---|---|---|
| Usage: | Called to retrieve the description of a list of promotions for display on the site. | |
| Signature: | GetProductPromotionDescriptionResult GetProductPromotionDescription(GetProductPromotionDescriptionRequest request) | |
| Parameters: | ||
| Shop – Mandatory The target shop. | ||
| PromotionIds – Mandatory The IDs of the promotions to retrieve. | ||
| CustomerId – Optional The ID of the customer for which the promotions are being retrieved. | ||
| Returns: | ||
| Promotions - Collection containing the requested promotions. | ||
| SystemMessages - Collection of messages from the external system. | ||
| Exceptions: | ||
| No exceptions are thrown by this method. |
Usage example:
If you have suggestions for improving this article, let us know!