trait PriceList

Price list table trait

Methods

Relatioin|null
currency()

Currency relation

int|null
getCurrency(string|null $code = null)

Get currency id

string|null
getCurrencyClass()

Get currency model class

string|null
getPriceTypeClass()

Get price type model class

string|null
getPriceListDefinitionClass()

Get price list definition model class

Model|null
getType(string|null $key = null)

Get price type

Model|false
createPrice(integer $productId, string $key, string|null $currencyCode = null, mixed $price = null)

Create price

boolean
createPiceList(integer $productId, string|null $typeName, string $currency = null)

Create price list

Model|null
getPrice(string $key, $productId)

Get price

QueryBuilder
getPriceListQuery(integer $productId)

Get price list query

Model|null
getPriceList(integer $productId)

Get price list

bool
hasPrice(string $key, $productId)

Return true if price exist

boolean
savePrice($productId, $key, $price, $currency)

Save price

boolean
savePriceList($productId, array $data, $currency = null)

Save price list

Details

at line 25
Relatioin|null currency()

Currency relation

Return Value

Relatioin|null

at line 36
int|null getCurrency(string|null $code = null)

Get currency id

Parameters

string|null $code

Return Value

int|null

at line 53
string|null getCurrencyClass()

Get currency model class

Return Value

string|null

at line 63
string|null getPriceTypeClass()

Get price type model class

Return Value

string|null

at line 73
string|null getPriceListDefinitionClass()

Get price list definition model class

Return Value

string|null

at line 84
Model|null getType(string|null $key = null)

Get price type

Parameters

string|null $key

Return Value

Model|null

at line 104
Model|false createPrice(integer $productId, string $key, string|null $currencyCode = null, mixed $price = null)

Create price

Parameters

integer $productId
string $key
string|null $currencyCode
mixed $price

Return Value

Model|false

at line 130
boolean createPiceList(integer $productId, string|null $typeName, string $currency = null)

Create price list

Parameters

integer $productId
string|null $typeName
string $currency

Return Value

boolean

at line 153
Model|null getPrice(string $key, $productId)

Get price

Parameters

string $key
$productId

Return Value

Model|null

at line 166
QueryBuilder getPriceListQuery(integer $productId)

Get price list query

Parameters

integer $productId

Return Value

QueryBuilder

at line 177
Model|null getPriceList(integer $productId)

Get price list

Parameters

integer $productId

Return Value

Model|null

at line 189
bool hasPrice(string $key, $productId)

Return true if price exist

Parameters

string $key
$productId

Return Value

bool

at line 205
boolean savePrice($productId, $key, $price, $currency)

Save price

Parameters

$productId
$key
$price
$currency

Return Value

boolean

at line 225
boolean savePriceList($productId, array $data, $currency = null)

Save price list

Parameters

$productId
array $data
$currency

Return Value

boolean