Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fourthwall.com/llms.txt

Use this file to discover all available pages before exploring further.

Product data is available when iterating over a collection’s products.
{%- assign collection = collections['all'] -%}

{% for product in collection.products limit: 8 %}
  {{ product.title }}{{ product.price | money }}
{% endfor %}

Product types

Every product has a type field that determines which properties are available. The available types are:
TypeDescription
StandardRegular products with variants and options
CombinedCombined products with variants and options
GiftCardGift card products
BundleA bundle of multiple products sold together
Bundle products have a different set of properties than Standard, Combined, and GiftCard products. Properties marked with specific type availability are only present on those product types.

Common properties

These properties are available on all product types.
PropertyTypeDescription
titlestringProduct name
handlestringURL-safe identifier
descriptionstringFull product description (HTML)
urlstringProduct page URL
availablebooleanWhether the product is in stock
typestringProduct type (Standard, Combined, GiftCard, Bundle)
featured_imageimageMain product image
imagesarrayAll product images
pricemoneyCurrent price (default variant for Single types, bundle price for Bundles)
compare_at_pricemoneyOriginal price (for sales)
promoted_pricemoneyPromotional price (if active)
members_onlybooleanWhether product requires membership
available_for_all_tiersbooleanAvailable to all membership tiers
required_tiersarrayTiers required to purchase
giftbooleanWhether the product is a gift
metafieldsobjectCustom metafields
promotion_badgesarrayActive promotion badges
promotion_descriptionstringPromotion description text
promotion_descriptionsarrayAll promotion descriptions

Standard, Combined, and GiftCard properties

These properties are only available when product.type is Standard, Combined, or GiftCard.

Variants

PropertyTypeDescription
variantsarrayAll product variants
optionsarrayOption names (e.g., ["Size", "Color"])
options_with_valuesarrayOptions with their possible values
default_variantvariantThe default variant
Each variant object has:
PropertyTypeDescription
pricemoneyVariant price
compare_at_pricemoneyOriginal price (for sales)
availablebooleanWhether variant is in stock
option1stringFirst option value
option2stringSecond option value
option3stringThird option value
imageimageVariant-specific image
imagesarrayAll variant images

Additional pricing

PropertyTypeDescription
price_minmoneyLowest variant price

Other

PropertyTypeDescription
collectionsarrayCollections the product belongs to
updated_atdatetimeWhen the product was last updated

Bundle properties

These properties are only available when product.type is Bundle.
PropertyTypeDescription
offersarrayThe individual products included in the bundle (each is a Standard/Combined/GiftCard product object)
pricing_strategyobjectHow the bundle is priced

Pricing strategy

The pricing_strategy.strategy object has a type field indicating the pricing model:
Strategy typeDescriptionAdditional fields
FIXED_PRICEBundle has a fixed pricestrategy.price.value, strategy.price.currency
DISCOUNT_BASEDBundle applies a percentage discountstrategy.discount_percentage
SAME_AS_INDIVIDUALBundle price equals the sum of individual prices
{% if product.type == 'Bundle' %}
  {% assign strategy = product.pricing_strategy.strategy %}

  {% if strategy.type == 'DISCOUNT_BASED' %}
    <span>{{ strategy.discount_percentage }}% off when bought together</span>
  {% endif %}

  <p>Includes:</p>
  <ul>
    {% for offer in product.offers %}
      <li>{{ offer.title }}{{ offer.price | money }}</li>
    {% endfor %}
  </ul>
{% endif %}

Images

Image object properties

Each image object has:
PropertyTypeDescription
urlstringImage URL
altstringAlt text
widthintegerWidth in pixels
heightintegerHeight in pixels
aspect_ratiofloatWidth / height ratio
Use the img_url filter to generate optimized image URLs:
{{ product.featured_image | img_url: 'large' }}

Formatting prices

Use money filters to format prices:
{{ product.price | money }}
{{ product.compare_at_price | money }}

Membership restrictions

{% if product.members_only %}
  {% if product.available_for_all_tiers %}
    <p>Available for all members</p>
  {% else %}
    <p>Available for:
      {% for tier in product.required_tiers %}
        {{ tier.name }}{% unless forloop.last %}, {% endunless %}
      {% endfor %}
    </p>
  {% endif %}
{% endif %}

Promotions

Each badge has type and label properties:
{% if product.promotion_badges %}
  {% for badge in product.promotion_badges %}
    <span class="badge badge--{{ badge.type }}">{{ badge.label }}</span>
  {% endfor %}
{% endif %}

Example: Product card

<div class="product-card">
  {% if product.featured_image %}
    <img
      src="{{ product.featured_image | img_url: 'large' }}"
      alt="{{ product.title }}"
      loading="lazy"
    >
  {% endif %}

  {% if product.promotion_badges %}
    {% for badge in product.promotion_badges %}
      <span class="badge badge--{{ badge.type }}">{{ badge.label }}</span>
    {% endfor %}
  {% endif %}

  <h3>{{ product.title }}</h3>

  <div class="price">
    {% if product.compare_at_price %}
      <s>{{ product.compare_at_price | money }}</s>
    {% endif %}
    <span>{{ product.price | money }}</span>
  </div>

  {% if product.type == 'Bundle' %}
    <p>{{ product.offers.size }} items in this bundle</p>
  {% endif %}

  {% if product.available %}
    <a href="{{ product.url | localized_url }}">View product</a>
  {% else %}
    <p>Out of stock</p>
  {% endif %}
</div>