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?
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024