SilverShop\Forms\VariationForm
Synopsis
class VariationForm
extends AddProductForm
{
- // members
- private static bool $include_json = true;
- protected array $requiredFields = ;
- // Inherited members from AddProductForm
- protected integer $maxquantity;
- protected array $saveablefields;
- // methods
- public void __construct()
- public mixed addtocart()
- public void getBuyable()
- protected void getFormFields()
- protected void getFormValidator()
- // Inherited methods from AddProductForm
- public void __construct()
- public void setMaximumQuantity()
- public void setSaveableFields()
- public void addtocart()
- public void getBuyable()
- protected FieldList getFormFields()
- protected FieldList getFormActions()
- protected Validator getFormValidator()
Hierarchy
Extends
Members
private
- $include_json — SilverShop\Forms\bool
protected
- $maxquantity
—
int
Populates quantity dropdown with this many values - $requiredFields
- $saveablefields
—
array
Fields that can be saved to an order item.
Methods
protected
public
- __construct()
- addtocart() — Adds a given product to the cart. If a hidden field is passed (ValidateVariant) then simply a validation of the user including that product is done and the users cart isn't actually changed.
- getBuyable()
Inherited from SilverShop\Forms\AddProductForm
protected
public
- addtocart()
- getBuyable()
- setMaximumQuantity() — Choose maximum value to populate quantity dropdown
- setSaveableFields()