Thread tagged as: Question, Shop

Filter by brand

Hi, I'm tring to filter products by brand and am having no luck with it at the moment. I've arranged a brands landing page which lists all of the brands but when clicked the client wants to show all of the products that are by that brand. Below is my brand.php code


    'filter' => 'shop_brand',
    'match' => 'eq',
    'value' => perch_get('b'),

Jade Marling

Jade Marling 0 points

  • 4 years ago

Hi Jade

Try this. Works for me.

NB I've taken out the template and variant options for simplicity.

    <?php   perch_shop_products([
            'filter' => 'brand.slug',
            'match' => 'eq',
            'value' => perch_get('brand')

That works great, thanks Jonathan!