VariantMatrix ​
- Type
- Class
- Namespace
- craft\commerce\helpers
- Inherits
- craft\commerce\helpers\VariantMatrix
- Since
- 2.0
Class VariantMatrix
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.
Arguments ​
$product(craft\commerce\elements\Product) – The product model$name(string) – The input name (sans namespace). Default is 'variants'.
Returns ​
string – The variant matrix HTML
Throws ​
\Twig\Error\LoaderError\Twig\Error\RuntimeError\Twig\Error\SyntaxError- yii\base\Exception
- yii\base\InvalidConfigException