How to mark product if it has already been purchased by current user? I have Drupal Commerce shop, that sells products that by their nature are most of the time not useful to buy twice. Exceptions do exist.

So what I want is to show a field or add a class on products page to mark it in very visible way, if current use has at some point bought this product, ie. if this product can be found in current users order history.

I will also want to show this mark in the product listings.

Lastly, I want to tell you that I do have some experience with templates in drupal, but not that much, especially with commerce. I also have Display Suite installed, if the code field way of doing things would be easier.
This really seems like a perfect fit for the Flag module. Excerpt from its project page (bold markup added here):


  ... Flag is a flexible flagging system that is completely customizable by the administrator. Using this module, the site administrator can provide any number of flags for nodes, comments, users, and any other type of entity. Some possibilities include bookmarks, marking important, friends, or flag as offensive. With extensive views integration, you can create custom lists of popular content or keep tabs on important content.
  
  Flags may be per-user, meaning that each user can mark an item individually, or global, meaning that the item is either marked or it is not marked, and any user who changes that changes it for everyone.
  
  In this way, additional flags (similar to published and sticky) can be put on nodes, or other items, and dealt with by the system however the administration likes.


If you're not familiar with the Flag module, checkout the set of 8 video tutorials about the flag module.

Refer to Flag's Community documentation for (way) more details.

You should configure an appropriate (non-global) flag, which you should then use to (automagically) flag products each time a user buys some product. And next time some products are shown to such user, you use that info about "has this product yes or no been flagged by this user already".

To actually flag such products, you should use the Rules module, which integrates extremely well with the Flag module. All that's left is to find the appropriate Rules Event for such rule to be triggered (somewhere along the lines of "checkout completed" I would assume).

If you'd want to take this even a step further, you could also consider what is described in the accepted answer to "How to add a custom icon or symbol to a flag link?".