PDA

View Full Version : Search form on the home page



AidPr
November 1, 2012, 05:58 PM
Hello

Template Auto Modern

Quick search form buttons (new/used) whith are located on the home page, I'd like to change to the drop-down field.

Is it possible to do this from the admin panel?

Please check the photo

Vladimir
November 30, 2012, 05:02 AM
Hello,

I suggest that you use the following solution:

- open file: templates/your_template/tpl/header_home.tpl
- find this code:



<ul class="search_tabs">
{foreach from=$search_forms item='search_form' key='sf_key' name='stabsF'}<li class="{if $smarty.foreach.stabsF.first}first active{elseif $smarty.foreach.stabsF.last}last{/if}">{$search_form.name}</li>{/foreach}
</ul>


and replace it by:



<select name="condition" id="search_forms">
{foreach from=$search_forms item='search_form' key='sf_key' name='stabsF'}
<option value="{$sf_key}">{$search_form.name}</option>
{/foreach}
</select>

<script type="text/javascript">
{literal}
$(document).ready(function() {
$('#search_forms').change(function()
{
$('#search_forms').find('option').each(function()
{
if($(this).prop('selected') == true)
{
$('#search_form_' + $(this).val()).fadeIn('normal');
}
else
{
$('#search_form_' + $(this).val()).hide();
}
});
});
});
{/literal}
</script>

AidPr
January 22, 2013, 04:50 PM
Hello Vladimir

These buttons, new/used, previously I have changed to cars/bikes/parts
and they works fine.

So, each category has different fields on the search form.

The problem is that when I make changes you mentioned, I see the same fields does not matter which category I choose.
And the search results I am getting only from the first category.

Maaz Surchy
January 22, 2013, 08:38 PM
I tried the same as AidPr and there is just one result, for the first category. When you change from New to Used the search will be done for New.

Mike
January 23, 2013, 12:27 PM
You have just disable Condition field from the Arrange Field setting of the listing type - it will remove two tabs.
Also you have to add Condition field to the right search form

on our demosite example
open this page
http://auto.demoflynax.com/admin/index.php?controller=listing_types&action=edit&key=listings
find Arrange Settings - it's latest group of settings on the page and select 'disable' there, save changes

AidPr
January 25, 2013, 02:01 PM
Still can not make that that field work as it should

attached screenshot how it looks when I make changes..

http://imageshack.us/a/img542/770/31516551.png

Angel Martinez
January 30, 2013, 04:55 AM
Any update in this subject? I'm also interested in a similar functionality.

Nguyen Dat tai
October 16, 2013, 04:32 AM
Hi,

I donnt see condition field on Arrange the boxes by

http://4.bp.blogspot.com/-E1LHA7nMcek/Ul4WrWB5_2I/AAAAAAAAEdQ/ckKarOai0uw/s1600/arrange.png

Thanks,
Nguyen

Ammar Alkraidi
January 9, 2014, 07:20 AM
Hi,

I donnt see condition field on Arrange the boxes by

http://4.bp.blogspot.com/-E1LHA7nMcek/Ul4WrWB5_2I/AAAAAAAAEdQ/ckKarOai0uw/s1600/arrange.png

Thanks,
Nguyen


Hi Nguyen,
You tried to modify the "condition" listing filed and Condition disappeared in Arrange Boxes, right?
Well I tried the same and been through the same, so, to enable it back go to AP> Database> then type this line in sql query
UPDATE `{sql_prefix}listing_fields` SET `Condition`= '' WHERE `Key` = 'condition' LIMIT 1

press go, it should comeback.

Original thread
http://www.flynax.com/forum/showthread.php?588-Problem-in-Condition&highlight=arrange+boxes

Best Regards,