Related Loop

A related loop lets you loop through related items on a particular page or product. The operational tag is related. The parameter is a number. This number is the number of items to show relating the current product page. This number can range from 1 up to 30. All the variables within the related loop are the same as the Product Loop.

{% loop related(5) %}
   	 <div class="item">
      	<a href="{related.product_url}">
      	<div class="detail">
        	<a class="product-title" href="{related.product_url}">{related.product_name}</a>
      	<div class="detail">
        	<span>Part #:</span>
        	<a class="product-title" href="{related.product_url}">{related.attr_part_number}</a>
{% endloop related %}

NOTE: Currently, the related loop only supports products on a product page.

The following output tags are available:

Output Tag Description
{has_related} Boolean Value for if related loop has values or not

Start your free, no-risk trial today.