@infobahn I think using vue.js is a great solution for this, there is also a great series on vue.js here on laracast.
Creating filters for an eCommerce site
Hi everyone,
I am building an e-commerce platform from scratch (because we have more enthusiasm than good sense). I have just got to the product filters that you would typically see on a product listing page. How do people approach these?
This is more about how to make the front end and back end work together. I have created queries that can get the relevant products from the database, but what I have trouble wrapping my head around is how you create filters that can be used by the user to narrow their search, and then update the filters to show which ones are disabled etc.
For instance, if you were to search for 'black' on a clothing website and then you chose the jeans category to refine your search, the filters for brands will now have some disabled as certain brands won't be available in the jeans section.
I was thinking of using angular but I can't see how I won't just be doing lots and lots of foreach loops to count every time how many products have a certain brand etc.
Any suggestions would be great, and apologies if this is way too broad a question!
Please or to participate in this conversation.