Forum

Thread tagged as: Question, Shop

Filter products by tags or options

Is there any way to display products by tags or options? Basically want to give some products the new or promotion tag or option.

Lexi McGee

Lexi McGee 3 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

How are you tagging the products? Do you have a field for that?

If so, you should be able to filter by that field.

Depends. Products tags says Apply these tags _on purchase_. So that leaves product options and modifying the default product template. Is that what you mean? adding a new field to the template?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that's what I mean.

Product tags are tags that are applied to the customer when they purchase the product. Those aren't helpful to you here.

<perch:if id="new_tag" match="eq" value="1">
<perch:shop id="title" />
</perch:if>

This returns all products. What's the right way to filter by specific dynamic fields?

Drew McLellan

Drew McLellan 2638 points
Perch Support

'filter' => 'new_tag',
'value' => '1',