- Posts: 8
- Thank you received: 0
Filtering search results - after search
- Paine
- Topic Author
- Offline
- New Member
Less
More
9 years 2 months ago #2306
by Paine
Filtering search results - after search was created by Paine
Please excuse this post if the subject has been discusses elsewhere. I have searched all the CP3 posts and not found it.
First to explain my aim, I run a website promoting shoes. There are two main menu items 'Ladies' and Men'. Within those menu items, I want to list all the relevant shoes i.e. shoes for ladies and shoes for men. I can see that it is possible using CP 3.
After the shoe list is displayed I would like to then have the ability to sort and filter again by shoe width (i.e. narrow, wide, extra-wide, extra-extra-wide.) I don't think this is possible in CP3. The only way is to create a search where you specify all the required tag values and click on the search button to view the results. There isn't a way of refining the search after the results have appeared. You have to start again for another search.
Also I understand that it is not possible to sort by the custom properties.
Is that correct?
First to explain my aim, I run a website promoting shoes. There are two main menu items 'Ladies' and Men'. Within those menu items, I want to list all the relevant shoes i.e. shoes for ladies and shoes for men. I can see that it is possible using CP 3.
After the shoe list is displayed I would like to then have the ability to sort and filter again by shoe width (i.e. narrow, wide, extra-wide, extra-extra-wide.) I don't think this is possible in CP3. The only way is to create a search where you specify all the required tag values and click on the search button to view the results. There isn't a way of refining the search after the results have appeared. You have to start again for another search.
Also I understand that it is not possible to sort by the custom properties.
Is that correct?
Please Log in or Create an account to join the conversation.
- andrea_4g
- Offline
- Administrator
Less
More
- Posts: 1122
- Thank you received: 163
9 years 2 months ago #2307
by andrea_4g
Replied by andrea_4g on topic Filtering search results - after search
Assuming there are no shoes that belongs at the same time to both 'men' and 'ladies' categories, there's a setup that'll possibly satisfy your requirements.
- create 2 Joomla categories: Men, Ladies (optionally under a 'Shoes' parent category)
- place the 'shoes' content items into the relevant category
- add two 'Articles > Category Blog' menu items: one to display articles in 'men' category, another one for 'ladies' articles
At this stage you'll be able to list men and ladies shoes content items separately, by clicking the relevant menu items. Now add the relevant search modules.
- add a new menu; let's name it 'Hidden Menu'; do not add a module to publish this menu;
- add 2 'Custom Properties ยป Custom Properties Layout' menu items; name the first one 'Search Men shoes', and bind it to the 'men' category, name the second one 'Search Ladies shoes' and bind it to the 'ladies' category; ** take note of the numeric menu item ids of each menu item **
- add 2 CP Search modules: one for 'men' and one for 'ladies'; the former will have parameter 'Search scope restriction' > 'Bind to category' set to 'Men', the latter to 'ladies'; ** set the 'Itemid' parameter of each module to corresponding menu item id (the ones of the previous step) **
- assign each module to two menu items: the corresponding 'Category Blog' menu item and 'Custom Properties Layout' menu item; E.g. the Search Men Shoes will be assigned to 'Men' Category blog menu item and to the 'Search Men shoes' Custom Properties menu item.
Now, when you click the 'Men shoes' menu item you'll list 'men' shoes menu items.
On the same page there will also be the 'Search men shoes' Cp search module.
When you search with this module all matching results will be displayed under the corresponding 'Custom Properties Layout' menu item; the Cp search module will be displayed on this page too, thus letting you refine your search.
Note: we used the same setup on our demo sites (e.g. www.solidsystem.it/demo31/index.php/en/ , with Food and Wine categories)
And you are right: you can't sort by the custom properties (although that might be an interesting future development).
- create 2 Joomla categories: Men, Ladies (optionally under a 'Shoes' parent category)
- place the 'shoes' content items into the relevant category
- add two 'Articles > Category Blog' menu items: one to display articles in 'men' category, another one for 'ladies' articles
At this stage you'll be able to list men and ladies shoes content items separately, by clicking the relevant menu items. Now add the relevant search modules.
- add a new menu; let's name it 'Hidden Menu'; do not add a module to publish this menu;
- add 2 'Custom Properties ยป Custom Properties Layout' menu items; name the first one 'Search Men shoes', and bind it to the 'men' category, name the second one 'Search Ladies shoes' and bind it to the 'ladies' category; ** take note of the numeric menu item ids of each menu item **
- add 2 CP Search modules: one for 'men' and one for 'ladies'; the former will have parameter 'Search scope restriction' > 'Bind to category' set to 'Men', the latter to 'ladies'; ** set the 'Itemid' parameter of each module to corresponding menu item id (the ones of the previous step) **
- assign each module to two menu items: the corresponding 'Category Blog' menu item and 'Custom Properties Layout' menu item; E.g. the Search Men Shoes will be assigned to 'Men' Category blog menu item and to the 'Search Men shoes' Custom Properties menu item.
Now, when you click the 'Men shoes' menu item you'll list 'men' shoes menu items.
On the same page there will also be the 'Search men shoes' Cp search module.
When you search with this module all matching results will be displayed under the corresponding 'Custom Properties Layout' menu item; the Cp search module will be displayed on this page too, thus letting you refine your search.
Note: we used the same setup on our demo sites (e.g. www.solidsystem.it/demo31/index.php/en/ , with Food and Wine categories)
And you are right: you can't sort by the custom properties (although that might be an interesting future development).
The following user(s) said Thank You: Paine
Please Log in or Create an account to join the conversation.
- Paine
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
9 years 2 months ago #2308
by Paine
Replied by Paine on topic Filtering search results - after search
Thank you for preparing the instructions for a possible solution. It looks like it might be suitable. I will certainly try and see how it goes.
The sort by custom properties would be a useful feature for a future release.
The sort by custom properties would be a useful feature for a future release.
Please Log in or Create an account to join the conversation.
- Paine
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
9 years 2 months ago #2309
by Paine
Replied by Paine on topic Filtering search results - after search
Believe it or not, there are some shoes that can be worn by women and men, i.e. special purpose, medical grade shoes. For these, I am thinking of creating a separate category, for example 'unisex'.
Then a small adjustment to your instructions for creating search options is to also bind the menu items to the 'unisex' category. So one will bind to 'ladies'+'unisex' categories and the other to 'men'+'unisex' categories. Would that work?
Of course, an alternative is to create duplicate shoe articles within the ladies and men categories, but I prefer not to duplicate the shoes.
Then a small adjustment to your instructions for creating search options is to also bind the menu items to the 'unisex' category. So one will bind to 'ladies'+'unisex' categories and the other to 'men'+'unisex' categories. Would that work?
Of course, an alternative is to create duplicate shoe articles within the ladies and men categories, but I prefer not to duplicate the shoes.
Please Log in or Create an account to join the conversation.
- Paine
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
9 years 2 months ago - 9 years 2 months ago #2310
by Paine
Replied by Paine on topic Filtering search results - after search
For simplicity's sake, I have created a test for just men's shoes (footwear).
www.comfoot.co.nz/index.php/men
The search is working but the search results layout needs refining. It suddenly looks different from the original men's shoe category blog layout due to the image sizes being smaller in the search results.
I had the search filtering options at the top of the main body but the check-boxes looked bad arranged vertically so I moved the module to the right position. Is it possible to arrange the check-box groups across the page?
Also the check-box groups need headings. Is that possible? **** Note - I have fixed this. It is done via the "Custom Properties Search" Module options 'Show Checkbox Field Name'. I think this should be set to 'Yes' by default.
Thanks in advance for your help.
www.comfoot.co.nz/index.php/men
The search is working but the search results layout needs refining. It suddenly looks different from the original men's shoe category blog layout due to the image sizes being smaller in the search results.
I had the search filtering options at the top of the main body but the check-boxes looked bad arranged vertically so I moved the module to the right position. Is it possible to arrange the check-box groups across the page?
Also the check-box groups need headings. Is that possible? **** Note - I have fixed this. It is done via the "Custom Properties Search" Module options 'Show Checkbox Field Name'. I think this should be set to 'Yes' by default.
Thanks in advance for your help.
Last edit: 9 years 2 months ago by Paine.
Please Log in or Create an account to join the conversation.
- andrea_4g
- Offline
- Administrator
Less
More
- Posts: 1122
- Thank you received: 163
9 years 2 months ago #2311
by andrea_4g
Replied by andrea_4g on topic Filtering search results - after search
You can arrange the checkboxes horizontally with a few CSS lines.
For example:
TBH, I like it more with all checkboxes neatly stacked vertically, but that's just me.
For example:
Code:
fieldset.cp-field{
width:100%;
}
.cp-cb-value{
float:left;
margin-right: 1em;
}
TBH, I like it more with all checkboxes neatly stacked vertically, but that's just me.
The following user(s) said Thank You: Paine
Please Log in or Create an account to join the conversation.
Time to create page: 0.180 seconds