product

The product object has the following attributes:

product.available

Returns true if a product is available for purchase. Returns false if all of the products variants' inventory_quantity values are zero or less, and their inventory_policy is not set to "Allow users to purchase this item, even if it is no longer in stock."

product.compare_at_price

Returns the lowest compare at price of all the product's variants entered in the Shoplazza admin. This attribute is similar to product.compare_at_price_min.

product.compare_at_price_max

Returns the highest compare at price of all the product's variants entered in the Shoplazza admin.

product.description

Returns the description of the product.

product.featured_image

Returns an image object of the product's featured image. The first image for each product is known as the featured, or main, image.

Referencing just product.featured_image will return the relative URL of the image.

URL: {{ product.featured_image }}
Aspect ratio: {{ product.featured_image.aspect_ratio }}
URL: {{ product.featured_image.src }}
URL: products/name.png
Aspect ratio: 1.0
URL: products/name.png

product.id

Returns the id of the product.

product.images

Returns an array of the product's images. Use the img_url filter to link to the product image on Shoplazza's content delivery network (CDN).

product.options

Returns an array of the product's option names.

product.price

Returns the lowest price of all the product's variants. This attribute is the same as product.price_min.

product.price_max

Returns the highest price of all the product's variants.

product.price_min

Returns the lowest price of all the product's variants.

product.title

Returns the title of the product.

product.type

Returns the type of the product.

product.url

Returns the relative URL of the product.

product.variants

Returns an array of the product's variants.

product.vendor

Returns the vendor of the product.


Did this page help you?