Skip to content

getProduct(int product_id)

The getProduct method is used to get a Product object that represents product in the storefront.

Input parameters

product_id

int Numeric identifier of the product.

Returned value

The Product object.

Example

source
{% set product = ObjectApi.getProduct(product_id) %}
{{ Product.name }}
output
Example product name