Sunnysideup\Ecommerce\Pages\ProductController
Synopsis
class ProductController
extends PageController
{
- // members
- protected bool $isCurrentVersion = true;
- private static array $allowed_actions = ;
- // methods
- public void viewversion()
- public void ajaxview()
- public Form|string AddProductForm()
- public void addproductfromform()
- public void IsOlderVersion()
- public void SidebarProducts()
- public null|Product NextProduct()
- public null|Product PreviousProduct()
- public void HasPreviousOrNextProduct()
- public void debug()
- protected void init()
- protected array getListOfIDs()
Hierarchy
Extends
- PageController
Members
private
- $allowed_actions
protected
- $isCurrentVersion
—
Sunnysideup\Ecommerce\Pages\bool
is this the current version?
Methods
protected
- getListOfIDs() — returns an array of product IDs, as saved in the last ProductGroup view (saved using session).
- init() — Standard SS method.
public
- AddProductForm() — returns a form for adding products to cart.
- HasPreviousOrNextProduct() — This method can be extended to show products in the side bar.
- IsOlderVersion() — Is this an older version?
- NextProduct() — This method can be extended to show products in the side bar.
- PreviousProduct() — This method can be extended to show products in the side bar.
- SidebarProducts() — This method can be extended to show products in the side bar.
- addproductfromform() — executes the AddProductForm.
- ajaxview() — Standard SS method Returns a snippet when requested by ajax.
- debug()
- viewversion() — view earlier version of a product returns error or changes datarecord to earlier version if the ID does not match the Page then we look for the variation.