The CheckoutContract is the interface for the checkout repository. This interface allows to set the shipping country ID, the payment method ID, the shipping profile ID and the currency in the checkout.
Plenty\Modules\Frontend\Contracts
public getShippingCountryId():int
Gets the shipping country ID.
public setShippingCountryId(int $shippingCountryId):void
Updates the ID of the shipping country. The ID must be specified.
int | $shippingCountryId | The ID of the shipping country |
public getPaymentMethodId():int
Gets the payment method id of the current shopping cart.
public setPaymentMethodId(int $paymentMethodId):void
Updates the ID of the payment method. The ID must be specified.
int | $paymentMethodId | The ID of the payment method |
public getShippingProfileId():int
Gets the shipping profile id of the current shopping cart.
public setShippingProfileId(int $shippingProfileId):void
Updates the ID of the shipping profile. The ID must be specified.
int | $shippingProfileId | The ID of the shipping profile |
public setCurrency(string $currency):void
Updates the currency. The currency must be specified.
string | $currency | The currency |
public setBasketReferrerId(int $referrerId):void
Updates the ID of the order referrer. The ID must be specified.
int | $referrerId | The ID of the order referrer. The order referrer settings can be changed in the plentymarkets back end. |
public getCustomerInvoiceAddressId():int
Gets the invoice address id of the current shopping cart.
public setCustomerInvoiceAddressId(int $invoiceAddressId):void
Sets the invoice address id for the current shopping cart.
int | $invoiceAddressId |
public getCustomerShippingAddressId():int
Gets the shipping address id of the current shopping cart.
public setCustomerShippingAddressId(int $shippingAddressId):void
Sets the shipping address id for the current shopping cart.
int | $shippingAddressId |
public validateCheckout():ValidateCheckoutEvent
The CurrencyExchangeRatioRepositoryContract is the interface for the currency exchange repository. This interface allows you to get the default system currency, to get exchange ratios for every currency and to convert an amount from the default currency into a given currency or from a given currency into the default currency.
Plenty\Modules\Frontend\Contracts
public getExchangeRatioByCurrency(string $currency):float
string | $currency |
public getDefaultCurrency():string
Get the default currency.
public convertFromDefaultCurrency(string $currency, float $amount, float $exchangeRatio = 0.0):float
Converts the given value from the default currency to the given currency.
string | $currency | |
float | $amount | |
float | $exchangeRatio |
public convertToDefaultCurrency(string $currency, float $amount, float $exchangeRatio = 0.0):float
Converts the given value to the default currency from the given currency.
string | $currency | |
float | $amount | |
float | $exchangeRatio |
The event is triggered when the currency is changed in the online store.
Plenty\Modules\Frontend\Events
public getCurrency():string
Gets the currency.
public getCurrencyExchangeRatio():float
Gets the exchange rate used for converting the currency.
The event is triggered when a customer address is changed in the online store.
Plenty\Modules\Frontend\Events
The event is triggered when the language is changed in the online store.
Plenty\Modules\Frontend\Events
public getLanguage():string
Gets the language of the online store.
The event is triggered when the payment method is changed in the online store.
Plenty\Modules\Frontend\Events
public getPaymentMethodId():void
Gets the ID of the payment method.
public setPaymentMethodId($paymentMethodId):void
Updates the ID of the payment method. The ID must be specified.
$paymentMethodId |
The event is triggered when the referrer id is changed in the online store.
Plenty\Modules\Frontend\Events
public getReferrerId():void
public setReferrerId($referrerId):FrontendReferrerChanged
$referrerId |
The event is triggered when the shipping country is changed in the online store.
Plenty\Modules\Frontend\Events
public getShippingCountryId():int
Gets the ID of the shipping country.
public setShippingCountryId(int $shippingCountryId):FrontendShippingCountryChanged
Updates the ID of the shipping country. The ID must be specified.
int | $shippingCountryId | The ID of the shipping country |
The event is triggered when the shipping profile is changed in the online store.
Plenty\Modules\Frontend\Events
public getShippingProfileId():void
Gets the ID of the shipping profile.
public setShippingProfileId($shippingProfileId):void
Updates the ID of the shipping profile. The ID must be specified.
$shippingProfileId |
The event is triggered when the delivery address is changed in the online store.
Plenty\Modules\Frontend\Events
public getAccountAddressId():int
Gets the ID of the address saved for the account.
The event is triggered when the invoice address is changed in the online store.
Plenty\Modules\Frontend\Events
public getAccountAddressId():int
Gets the ID of the address saved for the account.
The event is triggered when the payment method is changed in the online store.
Plenty\Modules\Frontend\Events
public getPaymentMethodId():int
Gets the ID of the payment method.
The event is triggered when the shipping method is updated in the online store.
Plenty\Modules\Frontend\Events
public getShippingCosts():float
Gets the shipping costs.
public getParcelServiceId():int
Gets the ID of the shipping service provider.
public getParcelServicePresetId():int
Gets the preset ID of the shipping service provider.
validation event
Plenty\Modules\Frontend\Events
public getErrorKeysList():array
public addErrorKey(string $errorKey):Events
string | $errorKey |
Frontend-Factory
Plenty\Modules\Frontend\Factories
public getLocale():LocaleService
public getAgent():AgentService
public getSystem():SystemService
public getAccount():AccountService
public getFile():FileService
frontend total vat model
Plenty\Modules\Frontend\Models
Type | Name | Description |
---|---|---|
int | vatId | |
float | vatAmount | |
float | vatValue |
public toArray()
Returns this model as an array.
Frontend-service for customer information
Plenty\Modules\Frontend\Services
public getIsAccountLoggedIn():bool
public getAccountContactId():int
Frontend-Service for agent information
Plenty\Modules\Frontend\Services
public getLanguages():array
public getBrowser():string
public getPlatform():string
public getDevice():string
public getIsDesktop():bool
public getRobotName():string
public getIsRobot():bool
public getHttpHeaders():array
public getIsMobile():bool
public getIsTablet():bool
Frontend-service for file information
Plenty\Modules\Frontend\Services
public addJsFile(string $jsFile):void
string | $jsFile |
public get(string $key):void
string | $key |
public hasGetMutator(string $key):bool
Determine if a get mutator exists for an attribute.
string | $key |
public setAttributes($attributes):void
$attributes |
public setAttribute(string $key, $value):Models
Set a given attribute on the model.
string | $key | |
$value |
public hasSetMutator(string $key):bool
Determine if a set mutator exists for an attribute.
string | $key |
public changeValue(string $key, callable $callback):void
string | $key | |
callable | $callback |
public offsetExists($offset):bool
$offset |
public offsetGet($offset):void
$offset |
public offsetSet($offset, $value):void
$offset | ||
$value |
public offsetUnset($offset):void
$offset |
public toArray(bool $translate = false):array
bool | $translate | Flag indicating if values should be translated. |
public toJson(int $options):string
int | $options |
public jsonSerialize():void
public fill(array $attributes):Models
Fill the model with an array of attributes.
array | $attributes |
public isFillable(string $key):bool
Determine if the given attribute may be mass assigned.
string | $key |
public getFillable():array
Get the fillable attributes for the model.
public fillable(array $fillable):Models
Set the fillable attributes for the model.
array | $fillable |
public hasCast(string $key, $types = null):bool
Determine whether an attribute should be cast to a native type.
string | $key | |
$types |
public fromJson(string $value, bool $asObject = false):void
Decode the given JSON back into an array or object.
string | $value | |
bool | $asObject |
frontend service for changing current language
Plenty\Modules\Frontend\Services
public setLanguage(string $newLanguage, bool $fireEvents = true):void
string | $newLanguage | |
bool | $fireEvents |
Frontend-service for customer information
Plenty\Modules\Frontend\Services
public uploadFile(array $fileData):string
array | $fileData |
public getFileURL(string $key):string
string | $key |
public getFile(string $key):StorageObject
string | $key |
public copyBasketFileToOrder(string $filename):string
string | $filename |
public deleteFile(string $filename):void
string | $filename |
Frontend-service for system information
Plenty\Modules\Frontend\Services
public getPlentyId():int
public getWebstoreId():int
Frontend-service for vat information
Plenty\Modules\Frontend\Services
public getCountryVatId():int
public getCurrentTotalVats():array
public getVat(string $taxIdNumber = ""):Vat
string | $taxIdNumber |
public getLocationId(int $countryId = null):int
Get the ID of the location
int | $countryId |
Repository contract for LegalInformation model.
Plenty\Modules\Frontend\LegalInformation\Contracts
public find(int $plentyId, string $lang, string $type):LegalInformation
Get legal information of an online store
int | $plentyId | The ID of the online store |
string | $lang | The language of the legal information text as ISO 639-1 code, e.g. e.g. en for English |
string | $type | The type of the legal information text. The types available are:
|
public save(array $data, int $plentyId, string $lang, string $type):LegalInformation
Save legal information for an online store
array | $data | Array of data for 'plainText' and 'htmlText' |
int | $plentyId | The plenty ID of the online store |
string | $lang | The language of the legal information text as ISO 639-1 code, e.g. en for English |
string | $type | The type of the legal information text. The types available are:
|
The legal information model.
Plenty\Modules\Frontend\LegalInformation\Models
Type | Name | Description |
---|---|---|
int | plentyId | The unique identifier of the plenty client |
string | lang | The language of the legal information text |
string | type | The type of the legal information text. The types available are:
|
string | plainText | The text value of the legal information text |
string | htmlText | The html value of the legal information text |
public toArray()
Returns this model as an array.
The FrontendPaymentMethodRepositoryContract is the interface for the front end payment method repository. Get the payment method information to be displayed in the online store.
Plenty\Modules\Frontend\PaymentMethod\Contracts
public getCurrentPaymentMethodsList():array
Lists all payment methods of the current customer session.
public getCurrentPaymentMethodsListForSwitch(int $currentPaymentMethodId, int $orderId = null, string $lang = "de"):array
Lists all payment methods for switch.
int | $currentPaymentMethodId | |
int | $orderId | |
string | $lang |
public getCurrentPaymentMethodsForExpressCheckout():array
Lists all payment methods if express checkout is available
public getPaymentMethodName(PaymentMethod $paymentMethod, string $lang):string
Gets the name of the payment method in the specified language.
PaymentMethod | $paymentMethod | The payment method |
string | $lang | The language |
public getPaymentMethodFee(PaymentMethod $paymentMethod):float
Gets additional costs for the payment method. Additional costs can be entered in the config.json.
PaymentMethod | $paymentMethod | The payment method |
public getPaymentMethodIcon(PaymentMethod $paymentMethod, string $lang):string
Gets the icon of the payment method. The path of the icon can be entered in the config.json.
PaymentMethod | $paymentMethod | The payment method |
string | $lang | The language |
public getPaymentMethodDescription(PaymentMethod $paymentMethod, string $lang):string
Gets the description of the payment method. The description can be entered in the config.json.
PaymentMethod | $paymentMethod | |
string | $lang |
public getPaymentMethodSourceUrl(PaymentMethod $paymentMethod):string
Gets the detail link of the payment method. The detail link can be entered in the config.json.
PaymentMethod | $paymentMethod |
public getIsSwitchableTo(PaymentMethod $paymentMethod, int $orderId = null):bool
Gets the detail link of the payment method. The detail link can be entered in the config.json.
PaymentMethod | $paymentMethod | |
int | $orderId |
public getIsSwitchableFrom(PaymentMethod $paymentMethod, int $orderId = null):bool
Gets the detail link of the payment method. The detail link can be entered in the config.json.
PaymentMethod | $paymentMethod | |
int | $orderId |
public getPaymentMethodIsSelectable(PaymentMethod $paymentMethod):bool
Get true if the payment method can be selected in the payment method list
PaymentMethod | $paymentMethod |
public getPaymentMethodNameById(int $paymentMethodId, string $lang):string
Gets the name of the payment method by ID and language. The ID of the payment method and the language must be specified.
int | $paymentMethodId | The ID of the payment method |
string | $lang | The language |
public getPaymentMethodFeeById(int $paymentMethodId):float
Gets additional costs for the payment method by ID. The ID of the payment method must be specified.
int | $paymentMethodId | The ID of the payment method |
public getPaymentMethodIconById(int $paymentMethodId, string $lang):string
Gets the icon of the payment method by ID and language. The ID of the payment method and the language must be specified.
int | $paymentMethodId | The ID of the payment method |
string | $lang | The language |
public getPaymentMethodDescriptionById(int $paymentMethodId, string $lang):string
Gets the description of the payment method by ID and language. The ID of the payment method and the language must be specified.
int | $paymentMethodId | The ID of the payment method |
string | $lang | The language |
public getPaymentMethodSwitchToById(int $paymentMethodId, int $orderId = null):bool
int | $paymentMethodId | |
int | $orderId |
public getPaymentMethodSwitchFromById(int $paymentMethodId, int $orderId = null):bool
int | $paymentMethodId | |
int | $orderId |
public getPaymentMethodSwitchableToById(int $paymentMethodId, int $orderId = null):bool
int | $paymentMethodId | |
int | $orderId |
public getPaymentMethodSwitchableFromById(int $paymentMethodId, int $orderId = null):bool
int | $paymentMethodId | |
int | $orderId |
public getAllowedPaymentMethodListForContact():void
The event is triggered after a session is created.
Plenty\Modules\Frontend\Session\Events
The FrontendSessionStorageFactoryContract is the interface for the front end session storage repository. This interface allows to get information about the locale, the customer, the order, the plugin and the forum from the session.
Plenty\Modules\Frontend\Session\Storage\Contracts
public getLocaleSettings():LocaleSettings
Get the locale settings from the session storage.
public getCustomer():Customer
Get the customer data from the session storage.
public getOrder():Order
Get the order data from the session storage.
public getPlugin():Plugin
Get the plugin data from the session storage.
public getForum():Forum
Get the forum data from the session storage.
The session storage model for customer data.
Plenty\Modules\Frontend\Session\Storage\Models
Type | Name | Description |
---|---|---|
int | deliveryCountryId | The ID of the country of delivery |
bool | showNetPrice | Flag that indicates if the shown price is the net price |
string | ebaySellerAccount | The eBay seller account |
string | accountContactSign | The reference sign specified by the contact |
int | accountContactClassId | The ID of the contact class |
int | sourceItemWishListAccountContactId | The ID of the contact that created the wish list |
int | sourceItemWishListAccountAddressId | The ID of the address that created the wish list |
string | salesAgent | The sales representative |
public toArray()
Returns this model as an array.
The session storage model for forum data.
Plenty\Modules\Frontend\Session\Storage\Models
Type | Name | Description |
---|---|---|
int | forumGroupId | The ID of the forum group |
string | forumUsername | The name of the user in the forum |
array | forumConfig | The forum configuration |
array | forumPermissions | The forum permissions |
int | forumLastVisitTime | The time the forum was visited last |
public toArray()
Returns this model as an array.
The session storage model for locale settings.
Plenty\Modules\Frontend\Session\Storage\Models
Type | Name | Description |
---|---|---|
string | currency | The currency |
float | currencyExchange | The exchange rate for the currency |
string | language | The language |
public toArray()
Returns this model as an array.
The session storage model for order data.
Plenty\Modules\Frontend\Session\Storage\Models
Type | Name | Description |
---|---|---|
int | deliveryAddressId | The ID of the delivery address |
int | invoiceAddressId | The ID of the invoice address |
int | parcelServiceId | The ID of the parcel service |
int | parcelServicePresetId | The preset ID of the parcel service |
int | methodOfPayment | The payment method |
bool | isNet | Flag that indicates if the shown price is the net price |
int | shippingCosts | The shipping costs |
string | orderinfoText | Additional information specified by the customer in the order |
int | payDataComplete | |
array | itemOrderParams | The parameters of the order |
array | uploadedFileStack | |
array | trustedShopBuyerProtection | |
string | trustedShopApplicationId | |
string | coupon | The coupon code |
string | couponDisplay | |
CouponCodeValidation | couponCodeValidation | |
array | activePaymentMethodsList | A list of active payment methods |
int | referrerId | The ID of the order referrer |
int | referrerPriceColumn | The price column for the order referrer |
int | referrerItemId | The ID of the item referrer |
int | schedulerId | The ID of the subscription |
int | schedulerIntervalId | The ID of the interval of a subscription |
int | schedulerOrderExecutionId | The ID for the execution of the order |
int | schedulerFirstDeliveryDate | The date for the first delivery of a subscription |
public toArray()
Returns this model as an array.
The session storage model for plugins.
Plenty\Modules\Frontend\Session\Storage\Models
public setValue(string $key, $value):void
Updates the value of a key. The key and the new value must be specified.
string | $key | |
$value |
public getValue(string $key):void
Gets a value for a key. The key must be specified.
string | $key |
public unsetKey(string $key):void
Unsets a key. The key must be specified.
string | $key |