PHP Class ProductVariation, silvershop-core

Provides a means for specifying many variations on a product. Used in combination with ProductAttributes, such as color, size. A variation will specify one particular combination, such as red, and large.
Inheritance: extends DataObject, implements Buyable
Show file Open project: burnbright/silverstripe-shop Class Usage Examples

Public Methods

Method Description
IsInCart ( ) * Returns if the product variation is already in the shopping cart.
Item ( ) * Returns the order item which contains the product variation
addLink ( )
canPurchase ( $member = null, $quantity = 1 )
createItem ( $quantity = 1, $filter = [] )
getCMSFields ( )
getCategories ( )
getCategoryIDs ( )
getTitle ( )
onBeforeWrite ( ) Save selected attributes - somewhat of a hack.
sellingPrice ( )

Method Details

IsInCart() public method

* Returns if the product variation is already in the shopping cart.
public IsInCart ( )

Item() public method

* Returns the order item which contains the product variation
public Item ( )

canPurchase() public method

public canPurchase ( $member = null, $quantity = 1 )

createItem() public method

public createItem ( $quantity = 1, $filter = [] )

getCMSFields() public method

public getCMSFields ( )

getCategories() public method

public getCategories ( )

getCategoryIDs() public method

public getCategoryIDs ( )

getTitle() public method

public getTitle ( )

onBeforeWrite() public method

Save selected attributes - somewhat of a hack.
public onBeforeWrite ( )

sellingPrice() public method

public sellingPrice ( )