Documentation

Shop_Purchase_Discount_Controller extends Core_Servant_Properties
in package

Online shop.

Tags
subpackage

Shop

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

Properties

$_allowedProperties  : array<string|int, mixed>
Allowed object properties
$_aReturn  : array<string|int, mixed>
Array of discounts
$_propertiesValues  : array<string|int, mixed>
Properties values
$_shop  : Shop_Model
Shop
$_unlimitedProperties  : bool
Object has unlimited number of properties

Methods

__construct()  : mixed
Constructor.
addAllowedProperties()  : self
Add additional allowed properties
addAllowedProperty()  : self
Add additional allowed property
getDiscounts()  : mixed
Расчет скидки на сумму товара, в соответствии со списком скидок, доступных для указанного магазина $return array
getReturn()  : array<string|int, mixed>
Get $this->_aReturn
set()  : self
Run when writing data to inaccessible properties
setReturn()  : self
Set $this->_aReturn
setUnlimitedProperties()  : self
Set unlimitedProperties

Properties

$_allowedProperties

Allowed object properties

protected array<string|int, mixed> $_allowedProperties = array( 'amount', // сумма заказа 'quantity', // количество товаров в заказе 'weight', // масса товаров в заказе 'couponText', // текст купона, если есть 'siteuserId', // Идентификатор пользователя сайта, нужен для расчета накопительных скидок 'prices', // массив цен товаров, используется при расчете скидки на N-й товар 'dateTime', )

$_aReturn

Array of discounts

protected array<string|int, mixed> $_aReturn = array()

$_propertiesValues

Properties values

protected array<string|int, mixed> $_propertiesValues = array()

$_unlimitedProperties

Object has unlimited number of properties

protected bool $_unlimitedProperties = \FALSE

Methods

addAllowedProperties()

Add additional allowed properties

public addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
$array : array<string|int, mixed>

array of properties' names

Return values
self

addAllowedProperty()

Add additional allowed property

public addAllowedProperty(string $property) : self
Parameters
$property : string

property name

Return values
self

getDiscounts()

Расчет скидки на сумму товара, в соответствии со списком скидок, доступных для указанного магазина $return array

public getDiscounts() : mixed
Tags
hostcms-event

Shop_Purchase_Discount_Controller.onBeforeGetDiscounts

hostcms-event

Shop_Purchase_Discount_Controller.onAfterGetDiscounts

getReturn()

Get $this->_aReturn

public getReturn() : array<string|int, mixed>
Return values
array<string|int, mixed>

set()

Run when writing data to inaccessible properties

public set(string $property, string $value) : self
Parameters
$property : string

property name

$value : string

property value

Return values
self

setReturn()

Set $this->_aReturn

public setReturn(array<string|int, mixed> $array) : self
Parameters
$array : array<string|int, mixed>
Return values
self

setUnlimitedProperties()

Set unlimitedProperties

public setUnlimitedProperties([bool $value = TRUE ]) : self
Parameters
$value : bool = TRUE

default TRUR

Return values
self

        
On this page

Search results