Display order history, products, tracking, and shipping information in your members area
ElasticFunnels provides two ways to display order information on your pages: the <order> HTML tag (for the visual builder) and the getOrders() backend function (for code-based pages). Both retrieve the same data from the customer’s purchase history.
The <order> tag is processed server-side and automatically loops through the customer’s purchase history. See the full Order Tag reference for all placeholders and options.
For code-based pages (.ef files or pages with backend scripts), getOrders() gives you full control over the layout. It returns an array of order objects you can loop through with @foreach.
If your orders have physical shipments, tracking information is automatically extracted from fulfillment data. The system checks multiple sources for tracking numbers:
Direct conversion fields (tracking_number, tracking_url)
Fulfillment provider response data
Fulfillment order data
Carriers are auto-detected from tracking number patterns (USPS, FedEx, UPS, DHL, UniUni). If no tracking URL is provided, a universal tracking link via 17track.net is generated.order.tracking is always an array. When the order has not yet been fulfilled it is empty ([]). Use order.shipping_address as the signal that the order contains a physical product — if there is a shipping address but no tracking yet, show a “being processed” message.
Example: Physical order with processing/tracking states
@set(orders = getOrders('newest', 5))@foreach(order in orders)<div class="order"> <h3>Order #{{ order.order_number }}</h3> <p>{{ order.created_at | date:'dd MMM yyyy' }}</p> @if(order.shipping_address) <div class="shipping-address"> <h4>Ships to</h4> <p>{{ order.shipping_address }}</p> <p>{{ order.shipping_city }}, {{ order.shipping_state }} {{ order.shipping_zip }}</p> <p>{{ order.shipping_country }}</p> </div> @if(order.tracking.length gt 0) <div class="tracking-info"> <h4>Shipment Tracking</h4> @foreach(t in order.tracking) <div class="tracking-row"> <span>{{ t.carrier }}</span> <a href="{{ t.tracking_url }}" target="_blank">{{ t.tracking_number }}</a> </div> @endforeach </div> @else <div class="tracking-pending"> <p>Your order is being processed. Tracking information will appear here once your order ships.</p> </div> @endif @endif</div>@endforeach
The key pattern:
order.shipping_address is present → physical product → show the shipping address block.
Inside that block, order.tracking.length gt 0 → shipment is on the way → show carrier + tracking link.
Otherwise → show “Your order is being processed.”
Tracking numbers are auto-linked to 17track.net when no carrier URL is provided. The carrier is auto-detected from the number pattern (USPS, UPS, FedEx, DHL, UniUni). You do not need to map carriers yourself.
Thank-you pages are a natural place to show order details. Since the customer is auto-authenticated from checkout, order data is available immediately.
@set(orders = getOrders('newest', 1))<h2>Order Confirmed!</h2><p>Thank you for your purchase.</p>@if(orders.length gt 0) @foreach(order in orders) <div class="order-summary"> <p>Order #{{ order.order_number }}</p> <p>Date: {{ order.created_at | date:'dd, MMM yyyy' }}</p> @foreach(product in order.products) <div class="product"> <span>{{ product.name }}</span> <span>{{ product.price | formatPrice:product.currency_code }}</span> </div> @endforeach </div> @endforeach@else <div class="processing"> <p>Your order is still being processed. This page will refresh automatically.</p> </div>@endif<a href="/members">Access Member Area</a>
If the order hasn’t been indexed yet when the thank-you page loads, the getOrders() call may return empty. Add a JavaScript auto-refresh timer so the page retries after a few seconds — the order typically appears within 5–10 seconds.
The customer object includes: name, email, first_name, last_name, phone, order_id, order_ids, and full billing/shipping address fields. It is automatically available in every backend script and template — no function call needed.
Orders are grouped intelligently — multiple conversions from the same purchase session (e.g., a main product and an upsell bought in the same checkout flow) are combined into a single order. The grouping logic uses:
Session ID matching — Conversions from the same browser session
Time proximity — Conversions within 6 hours of each other
This means an upsell purchased immediately after the main product shows under the same order, not as a separate entry.