Liquid, JavaScript, themes, sales channels
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?
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.
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.
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!
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! 🙂
@shayOwensby
How can I get purchase history of logged-in customer in JavaScript?
User | RANK |
---|---|
25 | |
20 | |
8 | |
7 | |
6 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023