{module_productrecommendations}

Description

Displays a list of product recommendations based on what other customers purchased on your website. This module can be inserted anywhere on your website or in email campaigns.

Conditions for feature to work

  • Minimum number of orders = 100
  • Minimum (total) number of distinct products that have been ordered = 25
  • Only orders done starting 6 months ago are processed

Default parameters in modules

  • NumberOfProducts = 10
  • targetFrame = false
  • useBackupLayout = false

Syntax

{module_productrecommendations numberOfProducts = "2" render="items" targetFrame="_blank" collection="my_custom_collection_name" useBackupLayout="false" template="/folder/template.tpl"}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

  • numberOfProducts - the number of products to display (maximum value is 10)
  • render - for this module this can only be item. For more information on how to use this parameter take a look at the render parameter's article for more details on how to use it
  • targetFrame - possible values are _blank, _self and _top. This parameter is used to specify the frame you want the item to open in.
  • useBackupLayout - use the backup layout instead of the default one. The value of this parameter is ignored if the template parameter is also present.
  • collection - use this if you need to access the module's Liquid output tags
  • template - render the module using a custom template. You can leave the value of the template parameter blank to suppress the original output and use Liquid output tags instead

This module can be rendered using:

The {module_productrecommendations} module is always rendered using either the Individual Product - Small layout or the backup one. The site visitor is redirected to the product detail view (rendered using the Individual Product - Large layout) only after clicking one of the links outputted by one of these tags: {tag_button,Your Text}, {tag_name} or {tag_itemurl_withhost}.

  • the individual product layout - on this layout you can use either the legacy tags or Liquid output tags. Here is a list of all the tags you can use: Individual Product - Small reference page
  • your own custom layout - take a look at the custom templates article for more details
  • Liquid collections - here are the Liquid output tags you can use:
Liquid tag Legacy tag Description
{{title}} The product's title
{tag_addtocart}Ability to add products to the shopping cart (vertical layout)
{tag_addtocartinputfield}Input field to enter product quantity
{tag_addtofavorites,add_Image, remove_Image}Add product to favorites list. Optionally customize to display your own custom image for adding and removing.
For additional information on how to render the output of this tag using Liquid take a look at the Enable other Liquid tags article.
{tag_button,Your Text}Replace Your Text with your own text; for example, Click for more information
{tag_buynow}Add to cart and redirects to check out
{{countryCode}} {tag_countrycode}Display the country code; for example, AU
{{countryCurrencyFormat}} {tag_countrycurrencyformat}Display the country currency code; for example, AUD
{{currencyFormat}} {tag_currencyformat}Display the currency format; for example, $
{{custom1}} {tag_custom1}Custom field #1. Use to display any information about a product
{{custom2}} {tag_custom2}Custom field #2. Use to display any information about a product
{{custom3}} {tag_custom3}Custom field #3. Use to display any information about a product
{{custom4}} {tag_custom4}Custom field #4. Use to display any information about a product
{{description}} {tag_description}Description of the product (Editor content)
{{discountPrice}} {tag_discountprice}The price if a discount applies to the current customer otherwise the normal sale price.
{{expiryDate}} {tag_expirydate}Expiration date of product
{tag_grouping}Pop-up menu of product attributes used to select a product to add to cart
{{inStock}} {tag_instock, syncWithAttributes, noSelectionMessage, disabledSelectionMessage} Number of units in stock.

Parameters:

  • syncWithAttributes – true or false
  • noSelectionMessage – specify the message displayed when site customer has not selected a variation
  • disabledSelectionMessage – specify the message displayed when site customer has selected a variation that is disabled
{{url}} {tag_itemurl_nolink}URL to the item referred, without host
{{urlWithHost}} {tag_itemurl_withhost}URL to the item referred, with host
{tag_largeimage}Large image for product
{{largeImageUrl}} {tag_largeimage_path}Outputs the file path of the image; for example /images/imagename.jpg
{{maxUnits}} {tag_maxunits}Maximum units
{{minUnits}} {tag_minunits}Minimum units
{tag_name_nolink}Name of product (does not link to product details)
{{name}} {tag_name}Name of product
{{onOrder}} {tag_onorder, syncWithAttributes, noSelectionMessage, disabledSelectionMessage} Number of units on order.

Parameters:

  • syncWithAttributes – true or false
  • noSelectionMessage – specify the message displayed when site customer has not selected a variation
  • disabledSelectionMessage – specify the message displayed when site customer has selected a variation that is disabled
{{isOnSale}} {tag_onsale}Renders 1 if product on sale, otherwise 0. If page elements need to be altered for products on sale, then embed tag in relevant javascript.
{{productCode}} {tag_productcode, syncWithAttributes, noSelectionMessage, disabledSelectionMessage} Product code. With variations enabled, tg product will render the variation code instead of the product codes in all layouts where this is used.

Parameters:

  • syncWithAttributes – true or false
  • noSelectionMessage – specify the message displayed when site customer has not selected a variation
  • disabledSelectionMessage – specify the message displayed when site customer has selected a variation that is disabled
{{releaseDate}} {tag_releasedate}Release date of item
{{reorder}} {tag_reorder}Number of units to reorder threshold
{{retailPrice}} {tag_retailprice}Retail price of the product
{{salePrice}} {tag_saleprice}Sale price of the product (the amount that customers are charged)
{{wholesalerPrice}} {tag_wholesalerprice} Wholesaler price of the product (the amount "wholesale" type customers are charged)
{{smallImage}} {tag_smallimage_nolink}Small image for product (does not link to product details)
{tag_smallimage}Small image for product
{{smallImageUrl}} {tag_smallimage_path}Outputs the file path of the image; for example /images/imagename.jpg
{{tags}} {tag_tags}Product tags (you can use field for anything)
{{tax}} {tag_tax}Tax amount for the product
{{taxCode}} {tag_taxcode}Tax code name used for item
{{taxRate}} {tag_taxrate}Tax rate used for item (%)
{{totalDiscountPrice}} {tag_totaldiscountprice}Total discounted price of the product: Discount Price + Tax.
{{totalPrice}} {tag_totalprice}Total price of the productT: Sale Price + Tax
{{totalRetailPrice}} {tag_totalretailprice}Total retail price of the product: Retail Price + Tax
{{unitType}} {tag_unittype}Product unit type: Single, by the dozen
{tag_volumeprices}Displays volume pricing for product
{{id}} {tag_productid}Displays product system id
{{catalogId}} {tag_catalogueid}Displays catalog system id the product is currently displayed in

Examples

  • {module_productrecommendations targetFrame="_blank" useBackupLayout="true" } - will display simmilar products customers purchased using the backup layout. If one clicks the product link the product detail window will open in a new tab.
  • {module_productrecommendations collection="relatedProductsCollection"} - this renders the related products using the default Small Product Layout and creates the "relatedProductsCollection" collection
  • {module_productrecommendations collection="relatedProductsCollection" template=""} - this sample does not render anything, it only creates the relatedProductsCollection collection to be used with Liquid

Syntax

{module_productrecommendations, howManyProducts, targetFrame, useBackupLayout}

Parameters

  • howManyProducts - the number of products to display (maximum value is 10)
  • targetFrame - possible values are _blank, _self and _top. This parameter is used to specify the frame you want the item to open in.
  • useBackupLayout - use the backup layout instead of the default one. The value of this parameter is ignored if the template parameter is also present.

Layouts

The {module_productrecommendations} module is always rendered using either the Individual Product - Small layout or the backup one. The site visitor is redirected to the product detail view (rendered using the Individual Product - Large layout) only after clicking one of the links outputted by one of these tags: {tag_button,Your Text}, {tag_name} or {tag_itemurl_withhost}.

Examples

  • {module_productrecommendations,5,_blank,false } - will display 5 recommended products to the Individual Product - Small. If one clicks the product link the product detail window will open in a new tab.