\ProductForm
Form for adding items to the cart from a {@link Product} page.
Synopsis
class ProductForm
extends Form
{
- // members
- protected $product;
- protected $quantity;
- protected $redirectURL;
- private static array $allowed_actions = ;
- // methods
- public void __construct()
- public void setupFormErrors()
- public void createFields()
- public void createActions()
- public void createValidator()
- public void validate()
- public void add()
- private DataObject getProduct()
- private void getVariation()
- private Int getQuantity()
- private void getOptions()
- private void goToNextPage()
Hierarchy
Extends
- Form
Members
private
- $allowed_actions
protected
- $product
- $quantity
- $redirectURL
Methods
private
- getOptions()
- getProduct() — Find a product based on current request - maybe shoul dbe deprecated?
- getQuantity() — Find the quantity based on current request
- getVariation()
- goToNextPage() — Send user to next page based on current request vars, if no redirect is specified redirect back.
public
- __construct()
- add() — Add an item to the current cart ({@link Order}) for a given {@link Product}.
- createActions()
- createFields()
- createValidator()
- setupFormErrors() — Set up current form errors in session to the current form if appropriate.
- validate() — Overloaded so that form error messages are displayed.