1. Osclass Forum
  2. Ideas/Improvements
  3. Is it possible to make advance search page in osclass?

Is it possible to make advance search page in osclass?

Started by Moin, December 1, 2019, 7:56 am

  • 1

Moin

hi,i want to show custom fields in searched result and also want to add a text box
to search by a particular custom field example ..type of seller (wholesaler/retailer/distributor/exporter)
i have tried html tag - input type text ...but then dont know
whats to put in name and value field
is it identifier name which is seen in admin panel??
let me know
thanks in advance

calinbehtuk

Custom field are in search if you allow this when you seth the field.

Moin

Actually i wanted an advance search functionality on a page ..where i can have main search box, city, and type of seller..so city and main are working the last one is not working

calinbehtuk

Quote from: Moin on December 1, 2019, 9:44 am

Actually i wanted an advance search functionality on a page ..where i can have main search box, city, and type of seller..so city and main are working the last one is not working


I don't understand what you mean by advanced search.

What theme do you use?

If you want to filter by user type you can use one of our premium themes, that already has that option included


https://osclass.calinbehtuk.ro/themes/general/cbk-osclass-premium-theme_i36

  • << Last edit: December 1, 2019, 9:56 am by calinbehtuk >>
  • Quote

Moin

Thanks for the response calinbehtuk..i have now abandoned the idea of that advance search page as i think now that feature is not needed as we already have filters ...


One again thanks for quick response.

Moin

Actually i saw this in stack overflow


<form action="<?php echo osc_base_url(true); ?>" method="get" class="search" onsubmit="javascript:return doSearch();">
    <input type="hidden" name="page" value="search" />
    <fieldset class="main">
        <input type="text" name="sPattern"  id="query" value="<?php echo osc_esc_html( ( osc_search_pattern() != '' ) ? osc_search_pattern() : $sQuery ); ?>" />
       

<input type="text" name="sCity"  id="sCity" value="<?php _e('Enter your city here'); ?>" />



        <?php  if ( osc_count_categories() ) { ?>
            <?php osc_categories_select('sCategory', null, __('Select a category', 'modern')); ?>
        <?php  } ?>
        <button type="submit"><?php _e('Search', 'modern'); ?></button>
    </fieldset>
    <div id="search-example"></div>
</form>





Where


<input type="text" name="sCity"  id="sCity" value="<?php _e('Enter your city here'); ?>" />


Is added in search codes so that user can get option to search by city by entering city name in text box...hence i thought why not to add custom field text box ...so want to know .name , id and value ..so that i can have that functionality of searching by type of seller ...



The custom field is a dropdown which is ..."type of seller" ..(retailer,wholesaler,distributor,exporter).


Hence do you have any idea about how to add a search dropdown where user can have option of searching through that custom field dropdown.

  • 1
Subscribe
X

Subscribe!

Subscribe to get the latest listings, updates and special offers delivered directly in your inbox.