Accessory Loop

The accessory loop lists products accessories. As an accessory is itself a product, this loop behaves like a product loop. Therefore you can use all product loop arguments and outputs.

{loop type="accessory" name="the-loop-name" [argument="value"], [...]}

Important informations :

* : argument is required
** : at least one of ** marked argument is required

Loop arguments

Argument Description
all product loop arguments

example : order="min_price", max_price="100"


A list of values

Expected values :
  • accessory : manual accessory order
  • accessory_reverse : reverse manual accessory order
  • all product loop orders

default : accessory

example : order="accessory,max_price"

product *

A single product id.

example : product="2"

Loop outputs

Variable Description
$ACCESSORY_ID The product ID of the accessory
$ID The accessory ID
all product loop outputs, except ID, which is the accessory ID
I want to display all accessories which are in category 1, order by ascending price, for all products in category 2.
{loop type="product" name="products_in_category_2" category="2"}
    {loop type="accessory" name="accessories_in_category_1_order_by_min_price" category="1" product="$ID" order="min_price"}
        <li>{$TITLE} ({$REF})</li>