Feature Request: Customer Order History Product Search

Feature Request: Customer Order History Product Search

I would love to see Shopify add the ability for customers to search their complete order history by product title or SKU from within their customer account.

For businesses with large catalogs and loyal, repeat customers, it can become difficult for customers to remember whether they have previously purchased a particular item. Currently, determining this may require opening and reviewing numerous individual orders.

A simple “Search Your Purchases” field within the customer account would allow customers to enter a product name or SKU and immediately see whether they have purchased that product before, along with the corresponding order information.

This would provide a meaningful improvement to the customer experience while helping prevent accidental duplicate purchases and reducing customer service inquiries.

For businesses with long-term customers and extensive purchase histories, this would be an incredibly valuable addition to Shopify customer accounts.

@jaheskamp Good request and worth voting for. Adding the part that decides whether you can have this now or have to wait for Shopify.

It depends entirely on which customer accounts you are running, and most people dont know which one they have. Check Settings, then Customer accounts.

If you are on Classic customer accounts, you can build this yourself today, no app needed. Your account page is a theme file you control, and Liquid already gives you the logged in customers orders including every line item. So you can dump the whole purchase history into the page as data, then filter it in the browser as they type. Put something like this in templates/customers/account.liquid:

liquid

<script>
window.purchaseHistory = [];
{% paginate customer.orders by 50 %}
  {% for order in customer.orders %}
    {% for line in order.line_items %}
window.purchaseHistory.push({
  title: {{ line.title | json }},
  sku: {{ line.sku | json }},
  order: {{ order.name | json }},
  date: {{ order.created_at | date: "%d %b %Y" | json }},
  url: {{ order.customer_url | json }}
});
    {% endfor %}
  {% endfor %}
{% endpaginate %}
</script>

Then add a text input and filter that array on keyup. Its maybe forty lines of javascript in total and it runs instantly because nothing is being fetched, the data is already on the page.

One honest limit. Liquid caps how many orders you can loop through, so a customer with a very long history will not have every order in there. Fine for most stores, but if your best customers have hundreds of orders you will be showing them a partial answer, which is arguably worse than no search at all. Worth checking against your heaviest customer before you ship it.

If you are on New customer accounts, you cannot do this in the theme. That whole area is hosted by Shopify and there are no Liquid templates to edit. The only way in is a customer account UI extension, which means it has to be built as an app rather than as theme code. The data is available through the Customer Account API, so its very much possible, its just not a thing you can hand to your theme developer for an afternoon.

Thats the real reason this request matters, by the way, and I would add it to your post. On Classic, merchants have been quietly solving this themselves for years. On New customer accounts that door is closed, so what used to be a small theme tweak now needs an app. Shopify moving everyone to New accounts is exactly why this should be native.

Meanwhile, for your support team rather than your customers, you can already answer has this person bought this before by exporting orders to CSV. The export has one row per line item with SKUs, so a filter on customer email plus SKU answers it in seconds. Not what you asked for, but it takes the pressure off while you wait.

MayraApps,

We just started using Shopify so we are using the new customer accounts. So we need an app!

Thanks for your response, super helpful!

@jaheskamp Glad it helped. Two things before you go app shopping.

First, try this, it takes two minutes and it might save you the whole problem. Create a normal page in your theme, drop {{ customer.orders.size }} into it, then log in as a customer and load that page. If a number appears, Liquid can still see order history on your storefront even though you are on New customer accounts. That means the code I posted works fine, you just put it on a regular page called something like Your Purchases and link to it from your menu, instead of inside the account area. Not as tidy, but its free and its yours.

If nothing appears, that route is genuinely shut and you would need a customer account UI extension, which has to be built as an app.

Second, and this matters more if you came across from another platform. Check that your historical orders actually landed properly. Open a customer you know is long standing and look at their order count in the admin. Migrations often bring orders in without attaching them to the customer record, or bring the order totals but not the individual line items. Either way the search you want cannot work, because the data it needs isnt there. No app can fix that, its a data problem not a feature problem, and its much easier to sort out now while your migration is recent than in a year. Worth checking before you spend anything.

Fair warning on the app side too. Its a thin category. Most apps living in customer accounts do returns, loyalty or subscriptions, not purchase search. Search the App Store for customer account extension or order history and see what comes up, but dont be surprised if nothing does exactly this. Might be worth asking your theme or agency partner what a custom extension would cost, since for a store your size that could well be cheaper than waiting.

One free thing in the meantime that people forget. Your customers already have a searchable purchase history, its their email inbox. Every order confirmation has the product names in it. If your confirmation emails always include the full product title and SKU, a customer can search their own mail and answer the question themselves in seconds. Not elegant, but it works today and costs nothing.

I can see this being a pretty big customer service win. We get questions along the lines of “did I already buy this?” where the answer technically exists in their order history, but finding it means opening several orders one by one. A purchase search would make that self-service instead of making the customer contact the store.

Confirming the analysis above for new customer accounts: there’s no native search, but it’s buildable — a full-page UI extension can query the customer’s orders through the Customer Account API and filter client-side, without the Liquid order-count limits mentioned for classic accounts.

I develop an account-page app (Account Blocks) and this request comes up periodically — considering adding it. [email removed] would a “search your past orders by product” page inside the account area cover your use case, or do you specifically need it embedded in the existing order list?