Skip to content
Log in

Liquid drops reference — cart and order

On this page

This article covers the Liquid drops for cart, order, checkout, fulfillment, payment, delivery, promotions, bookings, and taxes.


CartDrop

The shopping cart. Available globally as current_cart. Is nil if no cart has been created yet.

Property Type Description
id String Cart ID
items Collection Cart items
item_count Number Total items
sub_total Number Subtotal excluding taxes (when tax-exclusive)
total Number Total including tax
total_tax Number Total tax amount
shipping_cost Number Shipping cost
total_discount Number Total distributed discount
total_paid Number Amount already paid
total_payable Number Amount to be paid at checkout
total_deposit Number Total deposit amount
total_points Number Total points price
total_payable_points Number Points to be paid at checkout
currency_code String Cart currency
contact ContactDrop Cart contact
billing_address AddressDrop Billing address
shipping_address AddressDrop Shipping address
shipping_rates Collection Available shipping rates
pickup_options Collection Available pickup options
promotions Collection Applied v1 promotions
promotions_v2 Collection Applied v2 promotions
applied_vouchers Collection Applied vouchers
applied_credits Collection Applied account credits
payment_provider PaymentProviderDrop Selected payment provider
custom_forms Collection Associated custom forms
taxes Collection Tax lines
bookable? Boolean Cart has bookable products
quotable? Boolean Cart has quotable items
test_order? Boolean Is a test order
can_add_coupon? Boolean Can accept more coupon codes
cache_key String Key for template caching
created_at DateTime Creation timestamp
select_path String Path to select/switch to this cart
data Hash Custom data fields

CartItemDrop

A line item in the cart.

Property Type Description
id String Cart item ID
product ProductDrop The product
pricing ProductPricingDrop Line item pricing
quantity Number Quantity
min_quantity Number Minimum quantity
max_quantity Number Maximum quantity
total_payable Number Total amount the customer pays now
deposit_amount Number Per-unit deposit amount
total_deposit Number Total deposit (deposit × quantity)
deposit_required? Boolean Requires a deposit
name String Product name
delete_path String URL to remove this item
bundle_items Collection Items in bundle (if this is a bundle)
bundle_lead? Boolean Is the bundle lead item
in_bundle? Boolean Is part of a bundle
bookable? Boolean Is a bookable product
custom_forms Collection Associated custom forms
shipping_methods Collection Valid shipping methods
pickup_options Collection Valid pickup locations
delivery_date DateTime Selected delivery date
delivery_day String Selected delivery day
delivery_time String Selected delivery timeslot
data Hash Custom data fields

OrderDrop

A completed or pending order. Available as current_order on order pages.

Property Type Description
id String Order ID
order_number String Display order number
reference String Unique reference number
status String Order status
items Collection Order items
item_count Number Total items
sub_total Number Subtotal with exclusive taxes
total Number Total including tax
total_tax Number Total tax amount
total_shipping Number Shipping total
total_discount Number Total discount
total_paid Number Amount already paid
total_payable Number Amount still owed
total_deposit Number Total deposit amount
currency_code String Order currency
contact ContactDrop Order contact
account AccountDrop Customer account
billing_address AddressDrop Billing address
shipping_address AddressDrop Shipping address
fulfillments Collection Fulfillments/shipments
payments Collection Payments
bookings Collection Bookings
subscriptions Collection Subscriptions
custom_forms Collection Associated forms
taxes Collection Tax line items
ordered_at DateTime Order placement date
path String URL path
url String Full URL
reorder_path String Path to reorder
additional_payment_path String Path for additional payment
checkout_email String Email used at checkout
checkout_phone String Phone used at checkout
customer_notes String Customer notes from checkout
shipping_notes String Shipping notes from checkout
bookable? Boolean Has bookable products
test_order? Boolean Is a test order
deposit_owing? Boolean Has unpaid deposits
data Hash Custom data fields

OrderItemDrop

A line item in an order.

Property Type Description
id String Order item ID
product ProductDrop The product
pricing ProductPricingDrop Line item pricing
quantity Number Quantity
name String Product name
unit_price_incl_tax Number Unit price including tax
unit_price_excl_tax Number Unit price excluding tax
amount_paid Number Amount already paid
total_payable Number Remaining balance
deposit_amount Number Deposit amount (includes quantity)
deposit_required? Boolean Requires a deposit
deposit_payment_mode String Deposit mode (specify_amount, specify_percentage, all, none)
order OrderDrop Parent order
pricebook_entry PricebookEntryDrop Pricebook entry
subscription SubscriptionDrop Subscription (if recurring)
bundle_items Collection Items in bundle
bundle_lead? Boolean Is bundle lead
in_bundle? Boolean Is part of a bundle
bookable? Boolean Is bookable product
custom_forms Collection Associated forms
delivery_date DateTime Selected delivery date
delivery_day String Selected delivery day
delivery_time String Selected delivery timeslot
delivery_window DeliveryWindowDrop Selected delivery window
data Hash Custom data fields

Fulfillment & delivery drops

FulfillmentDrop

A shipment/fulfillment.

Property Type Description
tracking_number String Tracking number
carrier String Carrier name
status String Fulfillment status
items Collection Fulfilled items
shipped_at DateTime Ship date

DeliveryOptionsDrop

Delivery method options for an item. Available as current_delivery_options on checkout shipping step.

Property Type Description
delivery Boolean Supports delivery
pickup Boolean Supports pickup
collection_points Collection Click & collect locations

DeliveryWindowDrop

A delivery time window.

Property Type Description
date DateTime Delivery date
time_from String Start time
time_to String End time

ShippingRateDrop

A shipping rate option.

Property Type Description
name String Rate name
price Number Shipping price

Payment drops

PaymentDrop

A payment transaction.

Property Type Description
amount Number Payment amount
status String Payment status
method String Payment method
provider PaymentProviderDrop Payment provider
created_at DateTime Payment date

PaymentProviderDrop

A payment gateway.

Property Type Description
name String Provider name
type String Provider type

PaymentInstallmentDrop

An installment in a payment plan.

Property Type Description
amount Number Installment amount
transaction_number String Transaction number
status String Installment status
captured_at DateTime Capture date

Promotions & discount drops

PromotionDrop / Promotion2Drop

A promotion/discount rule.

Property Type Description
name String Promotion name
description String Promotion description
code String Promo code
actions Collection Promotion actions

CartPromotion2Drop

A promotion applied to a cart.

Property Type Description
discount_amount Number Discount in currency
discount_points Number Discount in points
total_discount Number Total discount
coupon_code_used String The coupon code used
auto_applied? Boolean Was auto-applied
coupon_applied? Boolean Was applied via coupon
promotion Promotion2Drop The promotion
data Hash Custom data fields

PromotionActionDrop

An action/reward defined for a promotion.

Property Type Description
id String Action ID
action String Action type
calculation String Calculation method
discount_percent Number Discount percentage
discount_value Number Discount value
discount_value_points Number Discount in points
qualifying_quantity Number Required quantity
promotion PromotionDrop Parent promotion

DiscountDrop

A discount applied to an item or order.

Property Type Description
description String Discount description
amount Number Discount amount

VoucherDrop

A redeemable voucher.

Property Type Description
code String Voucher code
value Number Voucher value
remaining_value Number Remaining balance
expiry_date DateTime Expiration date

AppliedVoucherDrop

A voucher applied to the cart or order.

Property Type Description
id String Applied voucher ID
code String Voucher code
balance Number Remaining balance
amount Number Amount applied
state String Voucher state

AppliedCreditDrop

Account credit applied to the cart or order.

Property Type Description
id String Applied credit ID
name String Credit name
amount Number Amount applied
maximum Number Maximum available

Tax drops

TaxDrop

Tax configuration.

Property Type Description
name String Tax name
rate Number Tax rate (percentage)
zone ZoneDrop Tax zone

SurchargeDrop

A surcharge/fee.

Property Type Description
identifier String Surcharge identifier
product ProductDrop Associated product
price Number Surcharge amount

Booking drops

BookingDrop

A booking/appointment.

Property Type Description
date DateTime Booking date
status String Booking status
attendees Collection Booking attendees
event BookableEventDrop Booked event
location BookableLocationDrop Booking location

BookingAttendeeDrop

A person attending a booking.

Property Type Description
id String Attendee ID
first_name String First name
last_name String Last name
email String Email
phone String Phone
attended? Boolean Has attended
is_contact? Boolean Is the main contact
booking BookingDrop Parent booking
contact ContactDrop Associated contact
data Hash Custom data fields

BookingAvailabilityDrop

Available booking times. Available as current_booking_availability.

Property Type Description
dates Collection Dates with availability
nearest_future_date DateTime Next available date
nearest_past_date DateTime Most recent past date
has_availability? Boolean Has any availability

BookingAvailabilityDateDrop

A date with available time slots.

Property Type Description
id String Date ID
date DateTime The date
location BookableLocationDrop Booking location
time_slots Collection Available time slots

BookingTimeSlotDrop

An individual time slot.

Property Type Description
start_time DateTime Start time
end_time DateTime End time
available Boolean Is available

Subscription drops

SubscriptionDrop

A recurring subscription.

Property Type Description
status String Subscription status
frequency String Billing frequency
next_payment_date DateTime Next payment date

Address drops

AddressDrop

A physical address.

Property Type Description
street String Street address (multiple lines separated by newlines)
street_lines Collection Street lines as separate items
city String City
state String State/province
postal_code String Postal/ZIP code
country String or CountryDrop Country

CountryDrop

A country.

Property Type Description
name String Country name
code String Country code (e.g., "AU")
states Collection States/provinces

CoordinateDrop

GPS coordinates.

Property Type Description
latitude Number Latitude
longitude Number Longitude

Common patterns

Accessing the cart

current_cart is available globally on every page. It is nil until a customer first adds an item.

```liquid

{% if current_cart %} {{ current_cart.item_count }} item(s) in cart {% endif %} ```

Cart page

```liquid

{% if current_cart == nil or current_cart.item_count == 0 %}

Your cart is empty.

Continue shopping {% else %} {% form “cart” %} {% for item in current_cart.items %} <div class="cart-item"> {% if item.product.image %} {{ item.product.image.alt_text | default: item.name }} {% endif %}

    <div class="cart-item__details">
      <h3><a href="{{ item.product.path }}">{{ item.name }}</a></h3>
      <p>{{ item.pricing.price | money }}</p>
    </div>

    <input
      type="number"
      name="cart_items[{{ item.id }}][quantity]"
      value="{{ item.quantity }}"
      min="1"
      {% if item.max_quantity > 0 %}max="{{ item.max_quantity }}"{% endif %}>

    <span>{{ item.total_payable | money }}</span>
    <a href="{{ item.delete_path }}">Remove</a>
  </div>
{% endfor %}

<button type="submit">Update cart</button>   {% endform %}
Subtotal
{{ current_cart.sub_total | money }}
{% if current_cart.total_discount > 0 %}
Discounts
−{{ current_cart.total_discount | money }}
{% endif %} {% if current_cart.shipping_cost > 0 %}
Shipping
{{ current_cart.shipping_cost | money }}
{% endif %} {% if current_cart.total_tax > 0 %}
Tax
{{ current_cart.total_tax | money }}
{% endif %}
Total
{{ current_cart.total | money }}
Proceed to checkout

{% endif %} ```

Cart badge in header

The cart badge typically lives in a component that reloads when the cart changes:

```liquid

{% component “header/cart-badge”, reload: “sc.cart-updated” %} ```

Inside components/header/cart-badge.liquid:

```liquid

{% if current_cart and current_cart.item_count > 0 %} {{ current_cart.item_count }} {% endif %} Cart ```

Reloadable cart component

Use the component system so the cart page re-renders automatically when items change:

```liquid

{% component “cart”, reload: “sc.cart-updated” %} ```

Promotion code form

```liquid

{% form “apply-promo-code” %} {% if form.errors.size > 0 %} {% for error in form.errors %} <p class="error">{{ error }}</p> {% endfor %} {% endif %} {% endform %} ```

Checkout guard

Before allowing checkout, validate the cart has items:

```liquid

{% if current_cart == nil or current_cart.item_count == 0 %} {% redirect to: current_store.cart_path, alert: “Your cart is empty” %} {% endif %} ```

Order confirmation page

```liquid

Thank you for your order!

Order #{{ current_order.order_number }}

Placed {{ current_order.ordered_at | date: "%B %-d, %Y" }}

Items

{% for item in current_order.items %}
{% if item.product.image %} {{ item.name }} {% endif %}

{{ item.name }}

Qty: {{ item.quantity }} × {{ item.unit_price_incl_tax | money }}

{{ item.pricing.price | money }}

{% endfor %}

Order summary

Subtotal
{{ current_order.sub_total | money }}
{% if current_order.total_discount > 0 %}
Discounts
−{{ current_order.total_discount | money }}
{% endif %} {% if current_order.total_shipping > 0 %}
Shipping
{{ current_order.total_shipping | money }}
{% endif %} {% if current_order.total_tax > 0 %}
Tax
{{ current_order.total_tax | money }}
{% endif %}
Total
{{ current_order.total | money }}

{% if current_order.shipping_address %}

Shipping to

{{ current_order.shipping_address.street }}
{{ current_order.shipping_address.city }}, {{ current_order.shipping_address.state }} {{ current_order.shipping_address.postal_code }}
{{ current_order.shipping_address.country }}

{% endif %}

{% if current_order.fulfillments.size > 0 %}

Shipments

{% for fulfillment in current_order.fulfillments %}

Status: {{ fulfillment.status }}

{% if fulfillment.tracking_number %}

Tracking: {{ fulfillment.tracking_number }} via {{ fulfillment.carrier }}

{% endif %} {% if fulfillment.shipped_at %}

Shipped: {{ fulfillment.shipped_at | date: "%B %-d, %Y" }}

{% endif %}
{% endfor %}

{% endif %} ```

Order history table

```liquid

{% if current_account.orders.size > 0 %}

{% for order in current_account.orders %} {% endfor %}
Order Date Status Total
{{ order.order_number }} {{ order.ordered_at | date: "%b %-d, %Y" }} {{ order.status }} {{ order.total | money }} View {% if order.reorder_path %} Reorder {% endif %}

{% else %}

You haven't placed any orders yet.

{% endif %} ```

Deposits and outstanding payments

```liquid

{% if current_order.deposit_owing? %}

You have {{ current_order.total_deposit | money }} in deposits outstanding.

{% if current_order.additional_payment_path %} Pay now {% endif %}

{% endif %} ```

Tax line display

```liquid

{% if current_order.taxes.size > 0 %} {% for tax in current_order.taxes %} <p>{{ tax.name }}: {{ tax.amount | money }} ({{ tax.rate }}%)</p> {% endfor %} {% endif %} ```

```liquid

{% if current_order.reorder_path %} Reorder {% endif %} ```

Was this article helpful?

Was this article helpful?