SalesPriceService
This service class contains functions related to sales prices.
All public functions are available in the Twig template renderer.
Namespace
IO\Services
Type | Name | Description |
---|---|---|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods
public __construct($app, $salesPriceSearchRepo, $contactRepository, $checkoutRepository, $basketService)
SalesPriceService constructor.
Type |
Name |
Description |
|
||
|
||
|
||
|
||
|
public setClassId($classId):Services
Set the contact class id used for calculations
Type |
Name |
Description |
|
public setCurrency($currency):Services
Set the currency used for calculations
Type |
Name |
Description |
|
public setShippingCountryId($shippingCountryId):Services
Set the id for the shipping country used for calculations
Type |
Name |
Description |
|
public getSalesPriceForVariation($variationId, $type = "default", $quantity = 1):SalesPriceSearchResponse
Get a sales price for a specific variation
Type |
Name |
Description |
|
A variation id to get sales price for |
|
|
Optional: What type of sales price to get (Default: 'default') |
|
|
Optional: Quantity of the variation. Used for graduated prices. |
public getAllSalesPricesForVariation($variationId, $type = "default"):array
Get all sales prices of a single type for a specific variation
Type |
Name |
Description |
|
The variation to find sales prices for |
|
|
The type of sales prices to find |
public applyCurrencyConversion($salesPrice):SalesPriceSearchResponse
Apply currency conversions to the prices of a sales price
Type |
Name |
Description |
|
A sales price |