VariantMatrix
- Type
- Class
- Namespace
- craft\commerce\helpers
- Inherits
- craft\commerce\helpers\VariantMatrix
- Since
- 2.0
Class VariantMatrix
View source (opens new window)
# Public Methods
Method | Description |
---|---|
getVariantMatrixHtml() | Returns the HTML for a given product’s variant matrix. |
# getVariantMatrixHtml()
Returns the HTML for a given product’s variant matrix.
View source (opens new window)
Arguments
$product
(craft\commerce\elements\Product) – The product model$name
(string (opens new window)) – The input name (sans namespace). Default is 'variants'.
Returns
string (opens new window) – The variant matrix HTML
Throws
\Twig\Error\LoaderError
\Twig\Error\RuntimeError
\Twig\Error\SyntaxError
- yii\base\Exception (opens new window)
- yii\base\InvalidConfigException (opens new window)
← Purchasable Install →