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 |
---|---|
33 | |
25 | |
17 | |
9 | |
9 |
Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023With 2-Factor Authentication being required to use Shopify Payments, we’re here to help yo...
By Imogen Apr 26, 2023