Thread tagged as: Question, Shop

Perch shop product filter

Hi, How do I add a filter for my categories? This is working

     <? perch_shop_products([
      'count' => 10,
      'filter' => 'trade_price',
      'match' => 'eq',
      'value' => 1
       ]); ?>

but this isn't

<? perch_shop_products([
 'count' => 10,
 'filter' => 'category',
 'match' => 'eq',
 'value' => 'Birthday'
]); ?>

is there something I'm missing here?


William Chicken

William Chicken 1 points

  • 5 years ago

Hi William,

perch_shop_products works the same as perch_content_custom, so to achieve what you are after I think you would need:

    'count' => 10,
    'category' => 'products/birthday'

You need the set as well as the category when specifying, so I have guessed it is products in this case but you may have something different.

Your exactly right and a life saver. Thank you again Mike )