The product object

The product object has the following attributes:

product.available

Returns true if a product is available for purchase. Returns falseif 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.collections

Returns an array of all of the collections that a product belongs to, except any collections that are not available on the sales channel being used.

product.compare_at_price

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

If none of the product variants have a value for compare at price, product.compare_at_price will return nil.

product.compare_at_price_max

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

If none of the product variants have a value for compare at price, product.compare_at_price_max will return 0.

product.compare_at_price_min

Returns the lowest compare at price of all the product's variants entered in the Shopify admin.

If none of the product variants have a value for compare at price, product.compare_at_price_min will return 0.

product.compare_at_price_varies

Returns true if the compare_at_price_min is different from the compare_at_price_max. Returns false if they are the same.

product.content

Returns the description of the product. Alias for product.description.

product.created_at

Returns a timestamp for when a product was created in the admin.

product.description

Returns the description of the product.

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.

Can be used to render the first piece of media attached to the product.

product.first_available_variant

Returns the variant object of the first product variant that is available for purchase. In order for a variant to be available, its variant.inventory_quantity must be greater than zero or variant.inventory_policy must be set to continue. A variant with no inventory_policy is considered available.

product.gift_card?

Returns true if the product is a gift card.

product.handle

Returns the handle of a product.

product.has_only_default_variant

Returns true if the product only has the default variant. This lets you determine whether to show a variant picker in your product forms.

Products that don't have customized variants have a single default variant with its "Title" option set to "Default Title".

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 Shopify's content delivery network (CDN).

product.media

Retur