Product list field type

The productlist field type can be used to select products from the official Perch Shop app. You can use it in any namespace (perch:blog, perch:shop, perch:content, etc).

There isn’t much use to it inside a template for output, so it’s a good idea to disable the output with suppress="true". Instead you would bypass the template processing to get the value of the field, an array of product slug(s), and utilise it there.

<perch:shop id="accessories" type="productlist" label="Accessories" suppress="true" />

The field type displays the product in a dropdown list (like the Category filed) and allows you to select more than one product. You can limit the number of products that can be selected by using the max attribute.

For more details check the documentation and the recent blog post Displaying Similar Products.

You can download it from here.