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!
@shayOwensby
How can I get purchase history of logged-in customer in JavaScript?
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! 🙂
User | RANK |
---|---|
21 | |
21 | |
8 | |
8 | |
7 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023