There are multiple ways to achieve this.
It depends on how you select the products that are of interest to the customer.
The outline how I would solve it:
- Create a list of products the customer viewed. Assign these to the current user.
- Show the customer the most sold products in the same category (by defining the data source).
- Define which products should be shown after all similar products are shown. You could do that by setting a yes/no field OR you could create a number field which counts the times a product was sold. That allows you to show the most sold products, filtered to not show the similar products as in step 2.
It really depends on how you want to create that logic behind it. Does that help a little?
Or does your question tend in the direction of how to combine the two items (products)? One idea to solve this is to create a slider, because you mentioned Amazon. For example the first slide has the 5 products that are personal recommendations and the next slide has the other 5.