Add type column to the category to determine what logic you should go with.
Oct 6, 2022
3
Level 2
Every category has it's logic
Hello, i have categories
when the user click category it opens the category page
the problem is some of these categories has it's logic
category A : i will get it's items with a query A and the page has search input box
category B : i will get it's items with a another query B (small changes than query A) and the page has search input box and search dropdoenlist
in categoryController in show category function
i get the category by alias no problem
but how can i seperate the logic of every category
check category id and according to it make it's logic ? any good way to do this
Thanks
Level 51
1 like
Please or to participate in this conversation.