Hi, I’ve built a Shopify theme from scratch and am currently working on designing the customer orders page. I’ve placed test orders using the Bogus payment gateway, but when I try to display the orders using Liquid (e.g., customer.orders_count), it always shows 0.
Could you guide me on how to properly work with the Order object in Liquid?
Did you login customer account when checking object for it?
And try ‘customer.orders.size’. For example code:
{%- if customer.orders.size > 0 -%}
{%- for order in customer.orders -%}
{% comment %} show code order here {% endcomment %}
{%- endfor -%}
{%- endif -%}