Search with empty property fields returns no match
- APCLO
- Autore della discussione
- Offline
- Nuovo Utente
Less
Di più
10 Anni 6 Mesi fa #1833
da APCLO
The greatness of a nation and its moral progress can be judged by the way its animals are treated --- Gandhi
Search with empty property fields returns no match è stato creato da APCLO
Hello,
this is something I had already seen in the previous version but never asked about.
When you use the search module and no property field is filled in, the result is the message saying "Please make some selections".
I bound my search to a specific category and would like to get all the articles belonging to it if no value is entered.
Would it be possible to set up the module in order to display all of the articles if any property value is entered?
Thanks
Silvia
this is something I had already seen in the previous version but never asked about.
When you use the search module and no property field is filled in, the result is the message saying "Please make some selections".
I bound my search to a specific category and would like to get all the articles belonging to it if no value is entered.
Would it be possible to set up the module in order to display all of the articles if any property value is entered?
Thanks
Silvia
The greatness of a nation and its moral progress can be judged by the way its animals are treated --- Gandhi
Si prega Accesso o Crea un account a partecipare alla conversazione.
- openwire
- Offline
- Nuovo Utente
Less
Di più
- Messaggi: 1
- Ringraziamenti ricevuti 1
10 Anni 5 Mesi fa #1846
da openwire
Risposta da openwire al topic Search with empty property fields returns no match
It turned to be easy:
in /administrator/components/com_customproperties/helpers/cpquery.class.php, in getRows function around line 700 there's code looking like this:
swap these two conditions so it looks like
Now category filter is treated like other filters and query doesn't get halted.
I'd love to see this implemented in next releases at least as an option.
Cheers,
Kostya
in /administrator/components/com_customproperties/helpers/cpquery.class.php, in getRows function around line 700 there's code looking like this:
Code:
if(! count($search_pars) > 0 )
{
array_push($this->errors, "no pars");
return false;
}
if(!empty($bind_to_categories ))
{
$search_pars['bind_to_category'] = $bind_to_categories;
}
swap these two conditions so it looks like
Code:
if(!empty($bind_to_categories ))
{
$search_pars['bind_to_category'] = $bind_to_categories;
}
if(! count($search_pars) > 0 )
{
array_push($this->errors, "no pars");
return false;
}
Now category filter is treated like other filters and query doesn't get halted.
I'd love to see this implemented in next releases at least as an option.
Cheers,
Kostya
I seguenti utenti hanno detto grazie : APCLO
Si prega Accesso o Crea un account a partecipare alla conversazione.
- APCLO
- Autore della discussione
- Offline
- Nuovo Utente
9 Anni 6 Mesi fa #2232
da APCLO
The greatness of a nation and its moral progress can be judged by the way its animals are treated --- Gandhi
Risposta da APCLO al topic Search with empty property fields returns no match
thank you Kostya!
The greatness of a nation and its moral progress can be judged by the way its animals are treated --- Gandhi
Si prega Accesso o Crea un account a partecipare alla conversazione.
Tempo creazione pagina: 0.157 secondi