Products category/filter

Hello, I am having trouble figuring out the way products should be put into my sylius shop. My case is automobile parts eshop. All products can be imported into categories/subcategories, but every product also has to be related to particular car model, so that later I could filter all parts for particular car model. Is there a way to do it in sylius or I just need separate table with relations? Any help is appreciated :slight_smile:


You can use options and attributes to achieve it. For instance, you can create a category called Ford with Mustang subcategory and then give it a model attribute called β€œFord Mustang 2015” or β€œFord Mustang 2018”.

You can write a simple dynamic form, which will first require to choose the car brand and then a car model. Once the user does it, you can load a list of attributes. If the prices depend on which model the part will be used to, apply the same logic for options.

For a dynamic filter use, you can use our Open Source Elasticsearch plugin, which you will find here - in the free option, and here - with the availability to purchase some support, if needed.

Love cars btw. Good luck!

1 Like

Thanks for answer @bitbager :+1: So your suggestion is to have Ford (category) then Mustang (subcategory) and then add an attribute to the product of model/engine with which the product is compatible. But most products are compatible with many different models/engines and I can add only one attribute with the same name to the product. Am I missing something? And event if I could add many model/engine attributes to product, I am missing relation to which makes those attributes belong :smiley:

You can consider using a select attribute, writing your own custom attribute (like a dictionary) or, if you sell parts to cars, using associations. Actually, there are many native combinations. Could you send me a part of specification needed for this feature? I think I might be able to suggest you a proper architecture once I take a look at specific use case.