CheckoutService
This service class contains methods for manipulating the checkout.
All public functions are available in the Twig template renderer.
Namespace
IO\Services
Type | Name | Description |
---|---|---|
|
This repository exposes functionality related to payment methods |
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods
public __construct($frontendPaymentMethodRepository, $checkout, $basketRepository, $sessionStorage, $customerService, $parcelServicePresetRepo, $currencyExchangeRepo, $basketService, $sessionStorageRepository, $webstoreConfigurationRepository, $dispatcher, $checkoutRepository, $contactRepository)
CheckoutService constructor.
Type |
Name |
Description |
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
public getCheckout($retry = true):array
Get the relevant data for the checkout.
Type |
Name |
Description |
|
Try loading checkout again on failure (e.g. problems during calculating totals) |
public getCurrency():string
Deprecated!
since 5.0.0 will be removed in 6.0.0 |
Get the current currency from the session.
public setCurrency($currency)
Deprecated!
since 5.0.0 will be removed in 6.0.0 |
Set the current currency in the session.
Type |
Name |
Description |
|
The currency to be used. |
public getCurrencyList():array
Get array with all active currencies.
public getCurrencyData():array
Get the name and the symbol for the currently selected currency.
public getCurrencyPattern():array
Get all required information about how to display monetary values.
public getMethodOfPaymentId():int
Get the id of the current payment method.
public setMethodOfPaymentId($methodOfPaymentID)
Set the id of the current payment method.
Type |
Name |
Description |
|
Id of the method of payment to be used. |
public preparePayment():array
Prepare the payment.
public getMethodOfPaymentList():array
List all available payment methods.
public getMethodOfPaymentExpressCheckoutList():array
List all payment methods available for express checkout.
public getCheckoutPaymentDataList():array
Get a list of the payment method data.
public getShippingProfileList():array
Get the list of available shipping profiles.
public getShippingCountryId():int
Deprecated!
since 5.0.0 will be removed in 6.0.0 |
Get the ID of the current shipping country
public setShippingCountryId($shippingCountryId)
Set the id of the current shipping country.
Type |
Name |
Description |
|
Id of the shipping country to select. |
public getShippingProfileId():int
Get the ID of the current shipping profile.
public setShippingProfileId($shippingProfileId)
Set the ID of the current shipping profile.
Type |
Name |
Description |
|
Id of the shipping profile to select. |
public getDeliveryAddressId():int
Get the ID of the current delivery address.
public setDeliveryAddressId($deliveryAddressId)
Set the ID of the current delivery address.
Type |
Name |
Description |
|
Id of the address to be used as delivery address when creating an order. |
public getBillingAddressId():int
Get the ID of the current invoice address.
public setBillingAddressId($billingAddressId)
Set the ID of the current invoice address.
Type |
Name |
Description |
|
Id of the address to be used as billing address when creating an order. |
public setDefaultShippingCountryId()
Reset the current shipping country to the default defined in the webstore configuration.
public getMaxDeliveryDays():array
Get the maximum days of delivery for each shipping profile.
public setReadOnlyCheckout($readonly)
Set the checkout to be readonly.
Type |
Name |
Description |
|
Enable/disable readonly mode for checkout. |
public getReadOnlyCheckout():bool
Check if checkout should display data from external checkout processes in readonly mode.
public getContactWish():string
Returns the given contact wish from session.
public fromMemoryCache()
public resetMemoryCache($key = null)
Type |
Name |
Description |
|