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