PDA

View Full Version : How to add search by State?



Jose Bonilla
May 8, 2012, 10:32 PM
Hello team, I own this site www.autosdeleste.com and would like to know how to add a search by State on the Search Form? Can some one explain step by step how to do this?

Thanks.
Josebon

Viktor
May 9, 2012, 05:00 AM
Hello Jose Bonilla,

You may add this field in search form in admin panel>>Search forms. Choose form and click build icon. Then you will see all fields but you can find 'US States' and click green plus for add this field in search form.
if you want create new states for other country go to Admin panel >> Data Formats click add new data format. After added you will see your new data format in grid click build icon around and add your states. Then go to Listing fields add new field with type Dropdown List and below you can see all data formats. Select your States. Then you can add your new field in category for show in add listings forms and add this field in search form too.

Jose Bonilla
May 9, 2012, 02:05 PM
Thanks Victor for your quick reply.

I did created a new Data Format called R.D States and new states was added using manage icon. Then I went to Listings Fields and added a new Dropdown which I bind with the Datat Format that I called R.D States, I also added in the quick search form, up to this point I am doing ok.

But this line below could not figure this out.

**Then you can add your new field in category for show in add listings forms and add this field in search form too**

How do I add new field in category?

Please provide me with this steps.

Thanks

Chris Brown
May 9, 2012, 04:04 PM
think he means add it to your category build a submit form

Viktor
May 10, 2012, 11:40 AM
Hello Jose Bonilla,

Yes Chris is correct understood me. You can go to Admin panel >> categories find general category or simple category and click build icon and click 'Build a Submit Form' then add your new field in.
It needs for see this field when users will add listings and select States for his listings and then other users want to find this listings from search form. :)

Jose Bonilla
May 10, 2012, 10:26 PM
Thanks Viktor,

I follow your advise and added the fields in the categories, when I am uploading an Auto I am able to select the State from the Dropdown that was created, and was added to the quick search as well. But when I go to search Autos from specific State it only shows 3 Autos, eventhough there is more than 3 that I personally uploaded.

I need this feature added in my site, Can I create ticket to customize it?

Thanks

Viktor
May 11, 2012, 03:42 AM
Hello Jose,


I need this feature added in my site, Can I create ticket to customize it?

Yes please create a new ticket with your request. Our tech department check it.

Jose Bonilla
May 14, 2012, 03:57 PM
Hello Viktor,

I just figure this out and is working, but has small issues still, when I search by Provincia (State) La Altagracia it shows 19 Autos found, these are the ones added after the Search by State category was added. And display Page 1 of 2, It shows 10 auto per page, but when you click on page 2 it does not show any Files, just the Search Form.

Please take a look and tell me how to fix it.

Thanks

Viktor
May 15, 2012, 04:46 AM
Hello Jose Bonilla,



I just figure this out and is working, but has small issues still, when I search by Provincia (State) La Altagracia it shows 19 Autos found, these are the ones added after the Search by State category was added. And display Page 1 of 2, It shows 10 auto per page, but when you click on page 2 it does not show any Files, just the Search Form.
Please take a look and tell me how to fix it.
Thanks

Yes you are right it was small bug in search page in version 3.2. I have fixed it and it works fine for now.

I have removed code in: ftp:>>includes>>controllers>>search.inc.php
at line ~3 in first condition:


if ( ($body_style || $_POST['form'] || ($_SESSION['post'] && ($page_info['prev'] == $page_info['Key']))) && !isset($_GET['reset']) && !isset($_GET['modify']) )


I have removed:


&& ($page_info['prev'] == $page_info['Key'])

but this problem in version 3.2 ONLY

Jose Bonilla
May 15, 2012, 11:14 AM
Hi Viktor,

Thanks again, yes is working!