I want to display the products purchased by the customer after logging in. Thank you
Hi there,
It should be available on default on “Order History” which is displayed once customer logs into the store.
Thanks.
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:-
- From your Shopify admin go to the online store
- Click on the Action button of your live theme and click on edit code
- Open the customer account file and add the below-provided code
{% 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?