class SimpleProduct implements PrimaryKeyInterface, SimpleProductDependencyInterface

SimpleProduct

Properties

protected int $numberInStock Available quantity, total quantity decreased by reserved quantity
protected int $minQuantity Minimal quantity that can be added to cart
protected int $totalQuantity Total quantity in stock, including reserved quantity
protected int $reservedQuantity Reserved quantity
protected int $minQuantityLightValue Minimal quantity light value
protected int $maxQuantityLightValue Maximal quantity light value
protected Product $baseProduct Main product
protected ArrayCollection $groupedSimpleProducts List of associated group products
protected ArrayCollection $configurableProducts List of associated configurable products
protected ArrayCollection $attributeSets List of associated attribute sets

Methods

__construct()

Constructor

getBaseProduct()

No description

setBaseProduct(Product $baseProduct)

No description

setId(int $id)

No description

integer
getId()

Get id

addGroupedSimpleProduct(GroupSimpleProduct $groupedSimpleProducts)

Add groupedSimpleProducts

removeGroupedSimpleProduct(GroupSimpleProduct $groupedSimpleProduct)

Remove GroupSimpleProduct

ArrayCollection
getGroupedSimpleProducts()

Get GroupSimpleProduct

addConfigurableProduct(ConfigurableProduct $configurableProduct)

Add configurableProduct

setConfigurableProducts(ArrayCollection $configurableProducts)

No description

setGroupedProducts(ArrayCollection $groupedProducts)

No description

removeConfigurableProduct(ConfigurableProduct $configurableProduct)

Remove configurableProduct

ArrayCollection
getConfigurableProducts()

Get configurableProducts

mixed
setNumberInStock(int $numberInStock)

Set numberInStock

mixed
getNumberInStock()

Get numberInStock

addAttributeSet(AttributeSet $attributeSet)

Add attributeSet

setAttributeSets(ArrayCollection $attributeSets)

No description

removeAttributeSet(AttributeSet $attributeSet)

Remove attributeSet

ArrayCollection
getAttributeSets()

Get attributeSets

int
getMinQuantity()

No description

setMinQuantity(int $minQuantity)

No description

int
getTotalQuantity()

No description

setTotalQuantity(int $totalQuantity)

No description

int
getReservedQuantity()

No description

setReservedQuantity(int $reservedQuantity)

No description

increaseReservedQuantity(int $qty)

Increase reserved quantity and decrease available quantity

decreaseReservedQuantity(integer $qty)

Decrease reserved quantity and increase available quantity

increaseTotalQuantity(integer $qty)

Increase reserved quantity

decreaseTotalQuantity(integer $qty)

Decrease total quantity

int
getMinQuantityLightValue()

No description

setMinQuantityLightValue(int $minQuantityLightValue)

No description

int
getMaxQuantityLightValue()

No description

setMaxQuantityLightValue(int $maxQuantityLightValue)

No description

Details

at line 166
__construct()

Constructor

at line 176
Product getBaseProduct()

Return Value

Product

at line 184
setBaseProduct(Product $baseProduct)

Parameters

Product $baseProduct

at line 194
SimpleProduct setId(int $id)

Parameters

int $id

Return Value

SimpleProduct

at line 206
integer getId()

Get id

Return Value

integer

at line 219
SimpleProduct addGroupedSimpleProduct(GroupSimpleProduct $groupedSimpleProducts)

Add groupedSimpleProducts

Parameters

GroupSimpleProduct $groupedSimpleProducts

Return Value

SimpleProduct

at line 234
SimpleProduct removeGroupedSimpleProduct(GroupSimpleProduct $groupedSimpleProduct)

Remove GroupSimpleProduct

Parameters

GroupSimpleProduct $groupedSimpleProduct

Return Value

SimpleProduct

at line 247
ArrayCollection getGroupedSimpleProducts()

Get GroupSimpleProduct

Return Value

ArrayCollection

at line 260
SimpleProduct addConfigurableProduct(ConfigurableProduct $configurableProduct)

Add configurableProduct

Parameters

ConfigurableProduct $configurableProduct

Return Value

SimpleProduct

at line 272
SimpleProduct setConfigurableProducts(ArrayCollection $configurableProducts)

Parameters

ArrayCollection $configurableProducts

Return Value

SimpleProduct

at line 282
setGroupedProducts(ArrayCollection $groupedProducts)

Parameters

ArrayCollection $groupedProducts

at line 294
SimpleProduct removeConfigurableProduct(ConfigurableProduct $configurableProduct)

Remove configurableProduct

Parameters

ConfigurableProduct $configurableProduct

Return Value

SimpleProduct

at line 306
ArrayCollection getConfigurableProducts()

Get configurableProducts

Return Value

ArrayCollection

at line 318
mixed setNumberInStock(int $numberInStock)

Set numberInStock

Parameters

int $numberInStock

Return Value

mixed

at line 330
mixed getNumberInStock()

Get numberInStock

Return Value

mixed

at line 343
SimpleProduct addAttributeSet(AttributeSet $attributeSet)

Add attributeSet

Parameters

AttributeSet $attributeSet

Return Value

SimpleProduct

at line 358
SimpleProduct setAttributeSets(ArrayCollection $attributeSets)

Parameters

ArrayCollection $attributeSets

Return Value

SimpleProduct

at line 372
SimpleProduct removeAttributeSet(AttributeSet $attributeSet)

Remove attributeSet

Parameters

AttributeSet $attributeSet

Return Value

SimpleProduct

at line 384
ArrayCollection getAttributeSets()

Get attributeSets

Return Value

ArrayCollection

at line 392
int getMinQuantity()

Return Value

int

at line 402
SimpleProduct setMinQuantity(int $minQuantity)

Parameters

int $minQuantity

Return Value

SimpleProduct

at line 412
int getTotalQuantity()

Return Value

int

at line 422
SimpleProduct setTotalQuantity(int $totalQuantity)

Parameters

int $totalQuantity

Return Value

SimpleProduct

at line 432
int getReservedQuantity()

Return Value

int

at line 442
SimpleProduct setReservedQuantity(int $reservedQuantity)

Parameters

int $reservedQuantity

Return Value

SimpleProduct

at line 455
SimpleProduct increaseReservedQuantity(int $qty)

Increase reserved quantity and decrease available quantity

Parameters

int $qty

Return Value

SimpleProduct

at line 469
SimpleProduct decreaseReservedQuantity(integer $qty)

Decrease reserved quantity and increase available quantity

Parameters

integer $qty

Return Value

SimpleProduct

at line 483
SimpleProduct increaseTotalQuantity(integer $qty)

Increase reserved quantity

Parameters

integer $qty

Return Value

SimpleProduct

at line 497
SimpleProduct decreaseTotalQuantity(integer $qty)

Decrease total quantity

Parameters

integer $qty

Return Value

SimpleProduct

at line 508
int getMinQuantityLightValue()

Return Value

int

at line 518
SimpleProduct setMinQuantityLightValue(int $minQuantityLightValue)

Parameters

int $minQuantityLightValue

Return Value

SimpleProduct

at line 528
int getMaxQuantityLightValue()

Return Value

int

at line 538
SimpleProduct setMaxQuantityLightValue(int $maxQuantityLightValue)

Parameters

int $maxQuantityLightValue

Return Value

SimpleProduct