Customer Product History

lldevs
Tourist
7 0 2

We have a requirement to allow the customer (in their account page) to view all products they have purchased.  Wasn't sure if this was something Shopify exposes in liquid?

Replies 6 (6)
shayOwensby
Shopify Expert
169 40 92

@lldevs 

 

This is a built-in function for Shopify. If a customer created an account, they can login, add their personal information for a quicker checkout process as well as check their purchase history with your store.  

Did I provide you with a working solution? Give me an Approved Solution!

Likes are appreciated as well 🙂
lldevs
Tourist
7 0 2

Thanks for the quick response, and yes order history is available - I was wondering if "product history" was also as easily available.  Currently, the only workaround I can think of is iterating over each order to get their respective line item variants.

shayOwensby
Shopify Expert
169 40 92
This is kind of a grey area from what I’ve found in the past. The best solution that a Shopify Guru gave me at one point was to search your Orders for that product sku, select all of your selection and export those. That will give you a count of product order history for that specific sku. However, if someone ordered 2, they’ll be grouped together on the csv so at the bottom of that column you can create a formula to add it all up for you.
Did I provide you with a working solution? Give me an Approved Solution!

Likes are appreciated as well 🙂
lldevs
Tourist
7 0 2

Thanks again!

The end goal is for a single customer to view their product history on their "account page" so they can "reorder/filter" - displayed like a collection page, so I think the only solution is the iteration of their order history.  But thank you again very much for taking the time to offer your suggestions!

MarinaP
Tourist
8 0 3

I know it's an old post, but if someone has troubles with it:

 {% for line_item in order.line_items %}
           {{ line_item.title }}
           {{ line_item.image | img_url: '100x100' | img_tag }}
. . . . . . .  . . . . . . 
{% endfor %}

Hope this helps! 🙂 

steven111
Visitor
1 0 0

@shayOwensby 

How can I get purchase history of logged-in customer in JavaScript?