Filtering search results - after search

  • Paine
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
9 Anni 2 Mesi fa #2306 da Paine
Filtering search results - after search è stato creato da 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?

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
9 Anni 2 Mesi fa #2307 da andrea_4g
Risposta da andrea_4g al 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).
I seguenti utenti hanno detto grazie : Paine

Si prega Accesso o Crea un account a partecipare alla conversazione.

  • Paine
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
9 Anni 2 Mesi fa #2308 da Paine
Risposta da Paine al 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.

Si prega Accesso o Crea un account a partecipare alla conversazione.

  • Paine
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
9 Anni 2 Mesi fa #2309 da Paine
Risposta da Paine al 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.

Si prega Accesso o Crea un account a partecipare alla conversazione.

  • Paine
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
9 Anni 2 Mesi fa - 9 Anni 2 Mesi fa #2310 da Paine
Risposta da Paine al 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.
Ultima Modifica 9 Anni 2 Mesi fa da Paine.

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
9 Anni 2 Mesi fa #2311 da andrea_4g
Risposta da andrea_4g al topic Filtering search results - after search
You can arrange the checkboxes horizontally with a few CSS lines.
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.
I seguenti utenti hanno detto grazie : Paine

Si prega Accesso o Crea un account a partecipare alla conversazione.

Tempo creazione pagina: 0.146 secondi