- Create a recommendation strategy for the top 10 trending products in a given product category. The trending products comprise the top 5 most viewed and top 5 most purchased products in the category in the past 24 hours. The product order is shuffled.
- Create a customizable template for a product recommendation slider. The template uses the
frosmo.easy.strategies.fetch()function for retrieving the recommendation data generated from the recommendation strategy. The function shuffles the product order.
- Create a modification and associated placement for displaying the recommendation on product category pages. The modification uses the recommendation slider template for its content.
- In the Control Panel, select Data Management > Recommendations > Strategies.
- Click Create recommendation strategy.
Define the following settings:
- Name: Enter "Trending in category". Note that the ID automatically completes to "trending-in-category".
- Page type: Select category.
- Algorithms: Select the following algorithms (in order):
- Most viewed on the site in the past 24 hours, 5 items
- Most bought on the site in the past 24 hours, 5 items
- Filters: Select Only return items whose type matches the viewed category. This limits the recommended products to the category currently viewed by the visitor.
- Affinity: Feel free to set the slider to any level you want. The higher the level, the more each visitor's affinities, if known, drive the recommendation results they get.
The following figure shows the complete recommendation strategy in the Control Panel. Click the figure to view a larger version.
For more information about the settings, see Creating and editing a recommendation strategy.
- Click Save. The Frosmo Platform generates the recommendation data for the new strategy. The data generation may take a while.
- Test the strategy by previewing the products it returns:
- In the Preview section, in the empty field, enter the name of a category whose recommended products you want to preview. The name must be the exact full name tracked for the category by the platform.
- Click Show. The preview displays the recommended products in slot order, that is, in the order in which the items are recommended to visitors. The preview also displays selected information, such as ID and name, for each product.
You have created and tested the recommendation strategy. You can now use its recommendation data in a modification.