- Posts: 21
- Thank you received: 0
OS Property support center
Custom price filter dropdown in quick search
- Stefano
- Topic Author
- Offline
- Junior Member
-
Less
More
10 years 8 months ago - 10 years 8 months ago #49698
by Stefano
Custom price filter dropdown in quick search was created by Stefano
Hello!
In quick search module I've made a custom dropdown that contains some prices range that I've also set in back-end.
So, my dropdown is created as the original:
I've created this custom dropdown because I've to search different prices depending on property type. For example, if an user select "For Rent" as property type, he can select correct prices range from the price dropdown. Otherwise if an user doesn't change the "Property type", the dropdown remains the default one. That's a simple jQuery that manage this.
But, what's the problem? Well, if I leave the default dropdown and I try to search, it returns no results! If I change the "Property type" dropdown and select the new prices range, I obtain some results, but not for all prices even if there are properties that matches with them.
So, is <select name="price" ...> wrong?
I've tried to set price ranges in backend for "All properties" and even "For Sale", but without success. If an user tries to search "For Sale" properties, the system returns no results. Even searching with "For Rent" with its own prices ranges sometimes returns correct result, sometimes not.
I've also checked IDs of price range on backend, using the cid value and not the number on the left of the price table:
www.mysite.it/administrator/index.php?op...ask=pricegroup_edit& cid[]=5
Any suggestion?
EDIT: PROBLEM SOLVED
Thanks
In quick search module I've made a custom dropdown that contains some prices range that I've also set in back-end.
So, my dropdown is created as the original:
Code:
<select id="price" name="price" class="input-large">
<option value="16">< € 450,00/mese</option>
<option value="17">€ 451,00 - € 600,00/mese</option>
<option value="18">€ 601,00 - € 800,00/mese</option>
<option value="19">€ 801,00 - € 1.000,00/mese</option>
<option value="20">> € 1.001,00/mese</option>
</select>
I've created this custom dropdown because I've to search different prices depending on property type. For example, if an user select "For Rent" as property type, he can select correct prices range from the price dropdown. Otherwise if an user doesn't change the "Property type", the dropdown remains the default one. That's a simple jQuery that manage this.
But, what's the problem? Well, if I leave the default dropdown and I try to search, it returns no results! If I change the "Property type" dropdown and select the new prices range, I obtain some results, but not for all prices even if there are properties that matches with them.
So, is <select name="price" ...> wrong?
I've tried to set price ranges in backend for "All properties" and even "For Sale", but without success. If an user tries to search "For Sale" properties, the system returns no results. Even searching with "For Rent" with its own prices ranges sometimes returns correct result, sometimes not.
I've also checked IDs of price range on backend, using the cid value and not the number on the left of the price table:
www.mysite.it/administrator/index.php?op...ask=pricegroup_edit& cid[]=5
Any suggestion?
EDIT: PROBLEM SOLVED
Thanks
Last edit: 10 years 8 months ago by Stefano.
Please Log in or Create an account to join the conversation.
- Fabio
-
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 1
10 years 8 months ago #49836
by Fabio
Replied by Fabio on topic Custom price filter dropdown in quick search
Ciao Stefano, anche io volevo effettuare un modifica simile, puoi dirci come hai risolto?
Grazie
Grazie
Please Log in or Create an account to join the conversation.
- Stefano
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 21
- Thank you received: 0
10 years 7 months ago #49891
by Stefano
Replied by Stefano on topic Custom price filter dropdown in quick search
Ciao Fabio,
il problema era che oltre ad aver definito una modifica nella select del prezzo, avevo anche creato una dropdown che veniva visualizzata solo quando veniva selezionata la tipologia di proprietà affitto. Questo causava che la variabile di questa select veniva inviata e quindi sballava i risultati (alcune volte nemmeno venivano visualizzati).
Ho quindi aggiunto una option vuota alla suddetta select aggiuntiva, in modo da non inviare nessun parametro al momento del submit del form.
Per le altre modifiche o il check delle select ho agito utilizzando jQuery. Mentre per aggiungere la select ho modificato il file default.php dentro la cartella template del modulo quick search.
Se devo essere più specifico dimmi pure.
il problema era che oltre ad aver definito una modifica nella select del prezzo, avevo anche creato una dropdown che veniva visualizzata solo quando veniva selezionata la tipologia di proprietà affitto. Questo causava che la variabile di questa select veniva inviata e quindi sballava i risultati (alcune volte nemmeno venivano visualizzati).
Ho quindi aggiunto una option vuota alla suddetta select aggiuntiva, in modo da non inviare nessun parametro al momento del submit del form.
Per le altre modifiche o il check delle select ho agito utilizzando jQuery. Mentre per aggiungere la select ho modificato il file default.php dentro la cartella template del modulo quick search.
Se devo essere più specifico dimmi pure.
Please Log in or Create an account to join the conversation.
- Fabio
-
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 1
10 years 7 months ago #49893
by Fabio
Replied by Fabio on topic Custom price filter dropdown in quick search
Grazie ho capito, solo che non riuscirei a farlo da solo, se non mi viene richiesto lascio stare altrimenti ti scrivo qui, grazie comunque
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam, Nguyen Phu Quan
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.