Ivan Amador
July 2, 2015, 03:08 AM
How to change the "Price" input fields to a dropdown menu where you can select a fixed pricing. (ie: $1,000 - $500,000)
But this needs to be related to the currency and the Property for (rent or sale) selected by user. The range for Sale shouldn't be the same as the range for Rent.
If I change this code here FTP > templates > your template > tpl > blocks > field_search.tpl
<input {if $fVal.$fKey.from}value="{$fVal.$fKey.from}"{/if} placeholder="{$lang.from}" class="numeric" type="text" name="f[{$field.Key}][from]" maxlength="15" />
<input {if $fVal.$fKey.to}value="{$fVal.$fKey.to}"{/if} placeholder="{$lang.to}" class="numeric" type="text" name="f[{$field.Key}][to]" maxlength="15" />
with this one:
<select title="{$lang.from}" name="f[{$field.Key}][from]">
<option value="0">{$lang.any|replace:'-':''}</option>
{section name=from start=1000 loop=20000 step=1000}
<option value="{$smarty.section.from.index}" {if $smarty.section.from.index == $fVal.$fKey.from}selected="selected"{/if}>{$smarty.section.from.index}</option>
{/section}
</select>
<select title="{$lang.from}" name="f[{$field.Key}][to]">
<option value="0">{$lang.any|replace:'-':''}</option>
{section name=to start=1000 loop=20000 step=1000}
<option value="{$smarty.section.to.index}" {if $smarty.section.to.index == $fVal.$fKey.to}selected="selected"{/if}>{$smarty.section.to.index}</option>
{/section}
</select>
As Dmitry said here: http://www.flynax.com/forum/showthread.php?1965-Modification-to-the-frontend-search-engine&p=9273&viewfull=1#post9273
I will get the dropdown, but the prices wouldn't be related to the "currency" and "Property for" options.
Any idea?
Thanks.
But this needs to be related to the currency and the Property for (rent or sale) selected by user. The range for Sale shouldn't be the same as the range for Rent.
If I change this code here FTP > templates > your template > tpl > blocks > field_search.tpl
<input {if $fVal.$fKey.from}value="{$fVal.$fKey.from}"{/if} placeholder="{$lang.from}" class="numeric" type="text" name="f[{$field.Key}][from]" maxlength="15" />
<input {if $fVal.$fKey.to}value="{$fVal.$fKey.to}"{/if} placeholder="{$lang.to}" class="numeric" type="text" name="f[{$field.Key}][to]" maxlength="15" />
with this one:
<select title="{$lang.from}" name="f[{$field.Key}][from]">
<option value="0">{$lang.any|replace:'-':''}</option>
{section name=from start=1000 loop=20000 step=1000}
<option value="{$smarty.section.from.index}" {if $smarty.section.from.index == $fVal.$fKey.from}selected="selected"{/if}>{$smarty.section.from.index}</option>
{/section}
</select>
<select title="{$lang.from}" name="f[{$field.Key}][to]">
<option value="0">{$lang.any|replace:'-':''}</option>
{section name=to start=1000 loop=20000 step=1000}
<option value="{$smarty.section.to.index}" {if $smarty.section.to.index == $fVal.$fKey.to}selected="selected"{/if}>{$smarty.section.to.index}</option>
{/section}
</select>
As Dmitry said here: http://www.flynax.com/forum/showthread.php?1965-Modification-to-the-frontend-search-engine&p=9273&viewfull=1#post9273
I will get the dropdown, but the prices wouldn't be related to the "currency" and "Property for" options.
Any idea?
Thanks.