In MyCashflow theme system, there are tags with which you can retrieve your online store's cross-sale products (compatible and similar) for different purposes.

In the store theme, cross-sell products can be printed in two main ways:

1) Cross-sale tags

You can add lists of cross-sell products to your store theme by using tags for different types of cross-selling.

When the tags are used in a scope for which a product or products have been set, the cross-sell products included in the list are selected based on the products included in the scope. For example, on the brand page, the tag prints all products marked as similar to the ones that are already visible on the page – just like in the shopping cart or on the product page.

Cross-sell products can be printed by using the following tags:

  • {SimilarProducts}: Prints products marked as similar to the selected products.
  • {CompatibleProducts}: Prints the products that were marked as compatible with the selected products.
  • {AddOnProducts}: Prints the products that are marked as accessories of the selected products.
  • {SparePartProducts}: Prints the products that are marked as spare parts of the selected products.
  • {CrossSaleProducts}: Based on the customer's purchase history, the tag prints products that have often been purchased together with the selected products.

    This tag differs from other cross-sell tags in that the products included on the list are selected automatically based on the products that were sold together with the product in question.

    You may want to use the tag e.g. in the shopping cart to recommend to the customer other products based on the ones that have already been added to the cart.

You can define the list's contents in a variety of ways by using the tag's attributes.

Cross-sale tags are aliases for the {Products} tag, which means that you can print precisely the same content by using the {Products} tag's cross-sale attributes.

2) Cross-sale attributes of the {Products} tag

All of the above mentioned cross-sale tags are aliases, which indirectly call the {Products} tag. The {Products} tag has five attributes that can be used to set the tag to print cross-sell products:

  • similar_to: similar products
  • compatible_to:: compatible products
  • spare_part_to: spare parts
  • add_on_to: accessories
  • crosssales_for: cross-sold based on purchase history

If you want to display fixed cross-sell products for a particular product on one of the online store pages, you can use e.g. the following markup:

{Products(
    similar_to: 2|4|26
)}

You can also use the {Products} tag to print cross-sell products for all products on the brand or product category page:

{Products(
    similar_to: '{CategoryProducts(type: 'ids')}',
    compatible_to: '{CategoryProducts(type: 'ids')}',
    brand: 'ALL',
    category: 'ALL',
    campaign: 'ALL'
)}

The example given above could be used, for example, on a product list page to print cross-sell products for all products within a product category.

Note that in such case the value of the brand, category and campaign attributes must be set to 'ALL' so that the tag prints products from all of those categories.

The attributes can also be used to display similar/compatible products that are sometimes purchased with the product in question. It can be especially useful if there are many cross-sell products and they should be prioritized:

{Products(
    similar_to: {ProductID},
    crosssales_for: {ProductID}
)}

For example, the above markup displays similar products on the product page and filters out products that have been purchased together with that product.

The {Products} tag can also print cross-sell products based on the customer's session. All cross-sell attributes can be assigned the following values that return products based on customer session:

  • 'cart': cross-sell products based on products added to the shopping cart
  • 'last_viewed': cross-sell products based on the last viewed products
  • 'last_bought': cross-sell products based on the last purchased products (works only if the customer is logged in)

For example, if you want to print products that have often been bought together with the products in the shopping cart, use the following markup:

{Products(
    crosssales_for: 'cart'
)}

Default cross-selling values (using the fallback attribute)

Both cross-sell attributes and their shortcuts use the fallback: true/false attribute for defining whether tags should use the scope's default values for printing cross-sell products.

If cross-sell attributes are used with filters (e.g. 'last_viewed'), it may happen that no cross-sell products will be found. In such cases, the scope's products will replace the filters by default if there are any products in the scope.

The scope refers to the content type available in the tag environment. E.g. on a campaign page, the scope will contain all products belonging to the campaign.

Learn more about the scopes of Interface tags.

To prevent replacing the filter with the scope's products, you should use the following attribute setting: fallback:false, in which case the tag won't print anything if no products fulfill the criteria set by the filter.

Cross-selling titles and attributes allow you to create highly flexible recommendations on different pages of your online store. If you have any questions on this topic, contact our customer service via our chat, for example, or create a support request.