MLT module
Dependencies
The client-side More Like This (MLT) integration has the following requirement:
- Bloomreach Mobile Search
Description
The MLT module extends the Search module to show your customers products that are similar to products they searched for or viewed. MLT displays products based on a customer's searches and product views. For example, if your customer looks at a red cocktail dress, then MLT might display links to other cocktail dresses or red shoes and other accessories.
You can implement MLT through any combination of search results, category pages, and product page widgets.
Search results
Products returned by the Search module have corresponding links that your customers can follow to do an MLT search on the selected product. You can attach these links to buttons or icons that are rendered with each search result. Your customers can refine their searches to products that match their interests.
Category pages
Similar to search results, you can render products on category pages with a button or icon to allow your customers to find more products like the ones they already viewed. These pages aren't rendered by Bloomreach Mobile. The JavaScript API does an MLT search based on supplied product information, such as a product name, ID, or brand.
Product page widget
You can add an MLT widget to product pages to automatically search for products that are similar to the product that your customer is already viewing. The MLT widget lets your customers jump directly to similar or related products without doing a new search.
Example
var mltWidgetContainer = $('#brm-mlt-widget'); mltWidgetContainer.append($('<h4></h4>', {'class': 'brm-mlt-heading'}).text('More Like This:')); /* Default configuration */ var mltConfig = { searchConfig: searchConfig, renderFunction: function(results) { var productGrid = $('<div></div>', {'class': 'productgridpage'}); mltWidgetContainer.append($('<div></div>', {'class': 'productgrid'}).append(productGrid)); renderProducts(results.products, productGrid, results.brTrkData); mltWidgetContainer.append($('<a></a>', {'href': results.viewMore}).text('View More')); } }; /* Initialize the plug-in */ $(document).ready(function() { /* Make sure to do this only on a product page */ var productTitle = $.trim($('h4#product-title').first().text()); if (productTitle) { var product = {title: productTitle}, productID = $.trim($('#product-id').first().text().replace(/Product #:/g, '')); if (productID) { product.pid = productID; } mltConfig.product = product; mltWidgetContainer.brm_mlt(mltConfig); } });