Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I want to display the products purchased by the customer after logging in. Thank you
Solved! Go to the solution
This is an accepted solution.
Hello @AnhTien,
In order to display the products purchased by the customer after logging in,
you need to make changes to the code on the customer account page:-
{% for order in customer.orders %}
{% if order.fulfillment_status_label == 'Fulfilled' %}
{% for line_item in order.line_items%}
{{ line_item.title }}
{{ line_item.image | img_url: '100x100' | img_tag }}
{% endfor %}
{%endif%}
{% endfor %}
Note: This is a specimen code for displaying the product title and image, it may vary depending on the theme you are using.
Hope it helps. Let us know if you need any further assistance.
All the best,
CedCommerce
Hi there,
It should be available on default on "Order History" which is displayed once customer logs into the store.
Thanks.
This is an accepted solution.
Hello @AnhTien,
In order to display the products purchased by the customer after logging in,
you need to make changes to the code on the customer account page:-
{% for order in customer.orders %}
{% if order.fulfillment_status_label == 'Fulfilled' %}
{% for line_item in order.line_items%}
{{ line_item.title }}
{{ line_item.image | img_url: '100x100' | img_tag }}
{% endfor %}
{%endif%}
{% endfor %}
Note: This is a specimen code for displaying the product title and image, it may vary depending on the theme you are using.
Hope it helps. Let us know if you need any further assistance.
All the best,
CedCommerce
Thank you so much
How do you overcome the 20 Order limit from Customer.Orders w/o using pagination?
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025