Properties

$id_attribute_group

$id_attribute_group : integer

Type

integer — Group id which attribute belongs

$name

$name : string

Type

string — Name

$color

$color : 

Type

$position

$position : 

Type

$default

$default : 

Type

$definition

$definition : 

Type

$image_dir

$image_dir : 

Type

$webserviceParameters

$webserviceParameters : 

Type

Methods

__construct()

__construct(  $id = null,   $id_lang = null,   $id_shop = null) 

Parameters

$id
$id_lang
$id_shop

delete()

delete() 

update()

update(  $null_values = false) 

Parameters

$null_values

add()

add(  $autodate = true,   $null_values = false) 

Parameters

$autodate
$null_values

getAttributes()

getAttributes(integer  $id_lang,   $not_null = false) : array

Get all attributes for a given language

Parameters

integer $id_lang

Language id

$not_null

Returns

array —

Attributes

isAttribute()

isAttribute(  $id_attribute_group,   $name,   $id_lang) 

Parameters

$id_attribute_group
$name
$id_lang

checkAttributeQty()

checkAttributeQty(integer  $id_product_attribute, integer  $qty, \Shop  $shop = null) : boolean

Get quantity for a given attribute combination Check if quantity is enough to deserve customer

Parameters

integer $id_product_attribute

Product attribute combination id

integer $qty

Quantity needed

\Shop $shop

Returns

boolean —

Quantity is available or not

getAttributeQty()

getAttributeQty(  $id_product) 

Parameters

$id_product

updateQtyProduct()

updateQtyProduct(  $arr) : boolean

Update array with veritable quantity

Parameters

$arr

Returns

boolean

isColorAttribute()

isColorAttribute() : boolean

Return true if attribute is color type

Returns

boolean

getAttributeMinimalQty()

getAttributeMinimalQty(integer  $id_product_attribute) : mixed

Get minimal quantity for product with attributes quantity

Parameters

integer $id_product_attribute

Returns

mixed —

Minimal Quantity or false

updatePosition()

updatePosition(boolean  $way, integer  $position) : boolean

Move an attribute inside its group

Parameters

boolean $way

Up (1) or Down (0)

integer $position

Returns

boolean —

Update result

cleanPositions()

cleanPositions(integer  $id_attribute_group, boolean  $use_last_attribute = true) : boolean

Reorder attribute position in group $id_attribute_group.

Call it after deleting an attribute from a group.

Parameters

integer $id_attribute_group
boolean $use_last_attribute

Returns

boolean —

$return

getHigherPosition()

getHigherPosition(integer  $id_attribute_group) : integer

getHigherPosition

Get the higher attribute position from a group attribute

Parameters

integer $id_attribute_group

Returns

integer —

$position