SilverCommerce\GroupedProducts\ProductGroup
Product that acts as a "Parent" for a grouping of products
Synopsis
class ProductGroup
extends Product
{
- // members
- private static string $table_name = 'ProductGroup';
- private static string $singular_name = 'Product Group';
- private static string $plural_name = 'Product Groups';
- private static string $description = "'Parent' for a grouping of products";
- private static array $has_many = ;
- // methods
- public void getSortedProducts()
- public SS_List SortedImages()
- protected GroupedProduct|null getProductFromRequest()
- public float getNoTaxPrice()
- public float getTaxAmount()
- public string getTaxString()
- public FieldList getCMSFields()
Hierarchy
Extends
- Product
Members
private
- $description
—
string
Description for this object that will get loaded by the website when it comes to creating it for the first time. - $has_many
- $plural_name
—
string
Human-readable plural name - $singular_name
—
string
Human-readable singular name. - $table_name
Methods
protected
- getProductFromRequest() — Are we viewing a child of this product group?
public
- SortedImages() — Compile sorted images from all children
- getCMSFields() — Update the default products gridfield to use custom config
- getNoTaxPrice() — If viewing a grouped product, we want to return that product's price
- getSortedProducts()
- getTaxAmount() — If viewing a grouped product, we want to return that product's tax
- getTaxString() — If viewing a grouped product, we want to return that product's tax string