Skip to main content

Utility Sections

Utility sections provide social proof widgets (fake visitor counts, stock indicators, countdown timers) and special-purpose pages (thank-you and order invoice).


Fake Visitor

File: sections/fake-visitor.liquid

Displays a simulated "X people are viewing this product" counter. The storefront animates the count between min and max on the client side.

Variables

VariableTypeDescription
minnumberMinimum visitor count
maxnumberMaximum visitor count
watching_textstringTranslated text (e.g. "people are viewing this right now")
theme_dataobjectMerchant-configured dynamic settings

Data Attributes

None required. The storefront reads data-min and data-max to drive the animation.

Events

None required.

Example

<div class="fake-visitor" data-min="{{ min }}" data-max="{{ max }}">
<span class="eye-icon" aria-hidden="true"></span>
<p>
<span class="visitor-count">{{ min }}</span> {{ watching_text }}
</p>
</div>

Fake Stock

File: sections/fake-stock.liquid

Displays a simulated low-stock indicator with a text message and optional progress bar.

Variables

VariableTypeDescription
textstringStock message (e.g. "Only 3 left in stock!")
theme_dataobjectMerchant-configured dynamic settings

Data Attributes

None required.

Events

None required.

Example

<div class="fake-stock">
<p>{{ text }}</p>
<div class="stock-bar">
<div class="stock-fill"></div>
</div>
</div>

Fake Counter

File: sections/fake-counter.liquid

Displays a countdown timer. The storefront reads data-hours and data-product-id to calculate and animate the remaining time on the client side.

Variables

VariableTypeDescription
hoursnumberCountdown duration in hours
product_idstringProduct ID (used to persist the timer)
titlestringCounter heading (e.g. "Hurry! Offer ends in")
label_daysstringTranslated "Days" label
label_hoursstringTranslated "Hours" label
label_minutesstringTranslated "Minutes" label
label_secondsstringTranslated "Seconds" label
theme_dataobjectMerchant-configured dynamic settings

Data Attributes

The storefront reads these to drive the countdown:

AttributeElementPurpose
data-hoursroot elementCountdown duration in hours
data-product-idroot elementProduct ID for persistence
data-unit="days"spanReceives the days digit
data-unit="hours"spanReceives the hours digit
data-unit="minutes"spanReceives the minutes digit
data-unit="seconds"spanReceives the seconds digit

Events

None required.

Example

<div class="countdown" data-product-id="{{ product_id }}" data-hours="{{ hours }}">
<div class="countdown-header">
<span>{{ title }}</span>
</div>
<div class="countdown-digits" dir="ltr">
<div class="unit">
<span data-unit="days">00</span>
<span class="label">{{ label_days }}</span>
</div>
<span class="sep">:</span>
<div class="unit">
<span data-unit="hours">00</span>
<span class="label">{{ label_hours }}</span>
</div>
<span class="sep">:</span>
<div class="unit">
<span data-unit="minutes">00</span>
<span class="label">{{ label_minutes }}</span>
</div>
<span class="sep">:</span>
<div class="unit">
<span data-unit="seconds">00</span>
<span class="label">{{ label_seconds }}</span>
</div>
</div>
</div>

Thanks

File: sections/thanks.liquid

The thank-you page shown after a successful order. Can display custom HTML content or a default success message.

Variables

VariableTypeDescription
contentstring | nullCustom HTML content (overrides default)
show_home_buttonbooleanWhether to show the "Go home" button
thanks_titlestringTranslated title (e.g. "Thank you!")
thanks_messagestringTranslated success message
phone_messagestring | nullOptional phone confirmation message
go_home_textstringTranslated "Go home" button text
offers_textstring | nullOptional promotional text
theme_dataobjectMerchant-configured dynamic settings

Events

EventDetailPurpose
go-homeNavigates to the store homepage

Example

<div class="thanks">
{% if content and content != "" %}
<div class="thanks-custom">{{ content }}</div>
{% else %}
<div class="thanks-default">
<h1>{{ thanks_title }}</h1>
<p>{{ thanks_message }}</p>
{% if phone_message and phone_message != "" %}
<p>{{ phone_message }}</p>
{% endif %}
</div>
{% endif %}

{% if show_home_button %}
<button type="button"
onclick="this.dispatchEvent(new CustomEvent('go-home',{bubbles:true}));">
{{ go_home_text }}
</button>
{% endif %}

{% if offers_text and offers_text != "" %}
<p class="offers">{{ offers_text }}</p>
{% endif %}
</div>

Order Invoice

File: sections/order-invoice.liquid

Displays the full order details — shipping info, line items, totals, and a copy-tracking-link button. This section has the most variables of any section.

Variables

VariableTypeDescription
orderobjectFull order object (see properties below)
order_notesarrayOrder timeline notes — each has note and created_at
currencystringCurrency symbol/code
logostringStore logo URL
store_namestringStore name
tracking_linkstringOrder tracking URL
has_contactbooleanWhether store has contact info
contact_phonestringStore phone
contact_emailstringStore email
contact_addressstringStore address

Translation variables (all strings):

t_copy_tracking_link, t_phone, t_email, t_address, t_shipping_details, t_name, t_country, t_government, t_payment_details, t_order_created, t_order_status, t_items_count, t_piece_price, t_total, t_product_total, t_shipping_cost, t_free_shipping, t_coupon_code

Order properties:

PropertyTypeDescription
order.full_namestringCustomer full name
order.phonestringCustomer phone
order.emailstringCustomer email
order.countrystringShipping country
order.governmentstringShipping state/governorate
order.addressstringShipping address
order.payment_methodstringPayment method label
order.transfer_receiptstringBank transfer receipt image URL
order.status_labelstringTranslated order status
order.created_atstringFormatted creation date
order.cart_itemsarrayLine items (see below)
order.costnumberSubtotal
order.shipping_costnumberShipping cost
order.total_costnumberGrand total
order.is_digitalbooleanWhether it's a digital-only order
order.coupon_codestringApplied coupon code
order.coupon_discountnumberCoupon discount amount

Cart item properties:

PropertyTypeDescription
item.namestringProduct name
item.thumbstringProduct thumbnail
item.quantitynumberQuantity ordered
item.pricenumberUnit price
item.totalnumberLine total
item.variantsstringSelected variant text
item.metadata_htmlstringAdditional metadata HTML

Events

EventDetailPurpose
copy-tracking-link{ link: string }Copies the tracking link to clipboard and shows a toast

Example (Abbreviated)

<div class="invoice">
<div class="invoice-header">
{% if logo and logo != "" %}
<img src="{{ logo }}" alt="{{ store_name }}" />
{% endif %}
<button type="button"
onclick="this.dispatchEvent(new CustomEvent('copy-tracking-link',{bubbles:true,detail:{link:'{{ tracking_link }}'}}));">
{{ t_copy_tracking_link }}
</button>
</div>

<div class="invoice-status">
<span>{{ t_order_status }}:</span>
<span>{{ order.status_label }}</span>
</div>

<div class="invoice-items">
{% for item in order.cart_items %}
<div class="invoice-item">
{% if item.thumb and item.thumb != "" %}
<img src="{{ item.thumb }}" alt="{{ item.name }}" />
{% endif %}
<div>
<h4>{{ item.name }}</h4>
{% if item.variants and item.variants != "" %}
<p>{{ item.variants }}</p>
{% endif %}
<p>{{ t_items_count }}: {{ item.quantity }}</p>
<p>{{ t_piece_price }}: {{ item.price }} {{ currency }}</p>
</div>
<span>{{ t_total }} {{ item.total }} {{ currency }}</span>
</div>
{% endfor %}
</div>

<div class="invoice-totals">
<div><dt>{{ t_product_total }}:</dt><dd>{{ order.cost }} {{ currency }}</dd></div>
{% unless order.is_digital %}
<div>
<dt>{{ t_shipping_cost }}:</dt>
<dd>{% if order.shipping_cost %}{{ order.shipping_cost }} {{ currency }}{% else %}{{ t_free_shipping }}{% endif %}</dd>
</div>
{% endunless %}
{% if order.coupon_code and order.coupon_code != "" %}
<div><dt>{{ t_coupon_code }}: {{ order.coupon_code }}</dt><dd>{{ order.coupon_discount }} {{ currency }}</dd></div>
{% endif %}
<div class="total-row"><dt>{{ t_total }}:</dt><dd>{{ order.total_cost }} {{ currency }}</dd></div>
</div>
</div>