Mark previously purchased items for a customer

Highlighted
Tourist
4 0 0

Hello and thank you for your time!

Is there anyway to show a customer if they have previously purchased an item when they are on the item page?

There doesn't appear to be any apps or code snippets that I could find to do this.

Thank you!

0 Likes
Highlighted
Shopify Partner
2294 116 353

You would have to loop through that customers orders and check each line item,

If you do this only in liquid this can significantly decrease theme performance if a customer has a lot of orders since you'd be running this operation on every single load of a product page.

So it would be best to have a max threshold at which point you use an ajax method to do the check on the clientside for logged in customers.

This information could be set in a cookie or web storage and do the marking on the clientside as well.

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
1 Like
Highlighted
Tourist
4 0 0

Thank you for the response! 

Yes, I definitely wouldn't want it affecting the loading time of pages in any significant manner.

How much would you expect a solution like this to cost to implement?

0 Likes
Highlighted
Shopify Partner
2294 116 353

Any assumed performance hit would only be for logged in customers that have alot of orders. 

 

Prices will vary and the theme used is a factor as is the level of sophistication needed(ajax fallback,cookies,etc).

Senior designers should be able to implementation a simple version in an afternoon since they still have to dig through the theme for all the places a product might be displayed.

Then there's the actual design of the messaging to the customer on the products.

 

I can be emailed(in signature) or forum PM'd with details for an estimate

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes
Highlighted
Tourist
4 0 0

I appreciate the reply!  I might take you up on that in a month or so.  It's not something we need implemented immediately.

0 Likes