Product

Type
Class
Namespace
craft\commerce\helpers
Inherits
craft\commerce\helpers\Product
Since
2.0

Product helper

View source (opens new window)

# Public Methods

Method Description
populateProductFromPost() Populates a product from the post data.
populateProductVariantModel() Populates all Variant Models from HUD or POST data
productFromPost() Instantiates the product specified by the post data.

# populateProductFromPost()

Populates a product from the post data.

View source (opens new window)

Arguments

Returns

craft\commerce\elements\Product

Throws

# populateProductVariantModel()

Populates all Variant Models from HUD or POST data

View source (opens new window)

Arguments

Returns

craft\commerce\elements\Variant

# productFromPost()

Since
3.1.3

Instantiates the product specified by the post data.

View source (opens new window)

Arguments

Returns

craft\commerce\elements\Product

Throws