I have a categories option set & sub-categories option set?
But i don’t know how to make relationship between them?
I feel my option set structure is wrong
or should i use database or what am i doing wrong?
Assuming you don’t need to programmatically add or remove categories or subcategories in your app, I’d definitely stick with option sets as they’re much faster to load.
In terms of how to structure them, there are 2 possibilities, and they’re both equally effective:
1: Have a list of subcategories on each category
or
2 Have a single Category on each Sub-category…
Personally, I’d opt for the first option, as it makes it easier to set things up in the editor (no need to use filters on the option set, just refer to the Category’s Subcategory wherever you need to).
Also, If I’m interoperating your screenshots correctly, it looks as though you’re actually using 3 layers of categories and subcategories here… (or maybe even 4?)… (a Sub-Category of Electronics, with a Sub-Sub-category of Laptops, and a Sub-Sub-Sub Category of Macbook etc…)…
In any case, each layer should refer to the relevant other option-set type (not a text).
Well, a short answer if you care at all about mobile is don’t have a user experience that is based on hovering. Personally, I hate when I hover over things in an app and stuff just happens, but I’m probably in the minority there.
I don’t think there is an easy way to do it, but if you search the forum for showing a menu on hover, you will find some stuff to read.