What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: Show purchased products in shopify

Solved

How to display purchased products to customers in Shopify?

AnhTien
Tourist
19 0 0

I want to display the products purchased by the customer after logging in. Thank you

Accepted Solution (1)

Cedcommerce
Shopify Partner
718 76 114

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:-

 

  • 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

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here

View solution in original post

Replies 4 (4)

Sajat
Shopify Partner
311 35 45

Hi there,

It should be available on default on "Order History" which is displayed once customer logs into the store.

Thanks.

Cedcommerce
Shopify Partner
718 76 114

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:-

 

  • 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

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here
AnhTien
Tourist
19 0 0

Thank you so much

DaveBitton
Shopify Partner
11 0 1

How do you overcome the 20 Order limit from Customer.Orders w/o using pagination?