1

I have a the view 'Browse Products by Category'

with the path: /taxonomy/term/%

and a contextual filter: Product: Category (field_category)

and let's say I have these categories:

  • Sensors

--- Accelerometers

--- Current Sensors

--- Direction Sensors

  • Robotics & Motors

--- Dc Geared Motors

--- Digital Servo

--- Motor Drivers

then if I selected 'Sensors', I get no products, although there are products tagged with 'Accelerometers'

Is there anyway that I can configure view to show products in sub categories.

That could be done easily when showing contents but not commerce products, case content offers a contextual filter that supports depth out-of-box.

enter image description here enter image description here

0

There are two approaches to solving this problem:

  1. Use the product_taxonomy_filter module to add the missing filter. Note that the performance impact of this module is unclear (it adds a subquery since it can't rely on the taxonomy_index table).

  2. Build your product catalog the recommended way, using Search API. The official docs cover this use case (via adding the "Index hierarchy") processor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.