PHP Class ProductVariationsExtension, silvershop-core

Inheritance: extends DataExtension
Afficher le fichier Open project: burnbright/silverstripe-shop

Méthodes publiques

Méthode Description
PriceRange ( )
contentcontrollerInit ( $controller )
generateVariationsFromAttributes ( ProductAttributeType $attributetype, array $values ) Generates variations based on selected attributes.
getVariationByAttributes ( array $attributes ) : null Pass an array of attribute ids to query for the appropriate variation.
onAfterDelete ( ) Make sure variations are deleted with product.
possibleValuesForAttributeType ( $type ) : DataList Get all the {@link ProductAttributeValue} for a given attribute type, based on this product's variations.
updateCMSFields ( FieldList $fields ) Adds variations specific fields to the CMS.

Method Details

PriceRange() public méthode

public PriceRange ( )

contentcontrollerInit() public méthode

public contentcontrollerInit ( $controller )

generateVariationsFromAttributes() public méthode

Generates variations based on selected attributes.
public generateVariationsFromAttributes ( ProductAttributeType $attributetype, array $values )
$attributetype ProductAttributeType
$values array

getVariationByAttributes() public méthode

Pass an array of attribute ids to query for the appropriate variation.
public getVariationByAttributes ( array $attributes ) : null
$attributes array
Résultat null

onAfterDelete() public méthode

Make sure variations are deleted with product.
public onAfterDelete ( )

possibleValuesForAttributeType() public méthode

Get all the {@link ProductAttributeValue} for a given attribute type, based on this product's variations.
public possibleValuesForAttributeType ( $type ) : DataList
Résultat DataList

updateCMSFields() public méthode

Adds variations specific fields to the CMS.
public updateCMSFields ( FieldList $fields )
$fields FieldList