Advertisement:

Author Topic: [SOLVED]search on Mobile Theme  (Read 1352 times)

zahra

  • Newbie
  • *
  • Posts: 18
  • OSCLASS_VERSION 3.0.2
[SOLVED]search on Mobile Theme
« on: February 14, 2014, 02:27:47 am »
Hello

I have a problem with search filter on mobile theme!!!

I want the search filter by category, country and region so I did the following:

in plugins/osc_mobile/themes/mobile/inc.search.php
i add this code:
Code: [Select]
<?php MblItemForm::location_javascript(); ?>

and there where we call the list of Categories i add:
Code: [Select]
<?php  if ( osc_count_categories() ) { ?>
            <?php osc_categories_select() ; ?>
<fieldset data-role="fieldcontain">
                        <h3><?php _e('Item Location''osc_mobile'); ?></h3>
                        <fieldset data-role="fieldcontain">
                            <label for="countryId"><?php _e('Country''osc_mobile'); ?></label>
                            <?php MblItemForm::country_select(osc_get_countries(), osc_user()) ; ?>
                        </fieldset>
                        <fieldset id="field_select_region" data-role="fieldcontain" style="display:none;">
                            <label for="regionId"><?php _e('Region''osc_mobile'); ?></label>
<?php MblItemForm::region_select(osc_get_regions(osc_user_country()), osc_user()) ; ?>
                        </fieldset>
            </fieldset>
        <?php  ?>

Now it show me the seach input field, select category, select country but if i select a country it show me all regions of all countries!!

what am I doing wrong??? :-[

thank you for your help!
« Last Edit: February 23, 2014, 10:45:11 pm by zahra »

maxeem

  • Newbie
  • *
  • Posts: 13
Re: search on Mobile Theme
« Reply #1 on: February 14, 2014, 03:54:44 pm »
hey Sarah,

wich os-Version do you use?

MaX

zahra

  • Newbie
  • *
  • Posts: 18
  • OSCLASS_VERSION 3.0.2
Re: search on Mobile Theme
« Reply #2 on: February 14, 2014, 05:40:22 pm »
hello Max  :)

i'm using Osclass 3.0.2.

I have spent a lot of time to solve this Problem but without success  :(

Thanks for your help

Zahra

zahra

  • Newbie
  • *
  • Posts: 18
  • OSCLASS_VERSION 3.0.2
Re: search on Mobile Theme
« Reply #3 on: February 15, 2014, 04:02:45 am »
any help??? :(

aide2001

  • Guest
Re: search on Mobile Theme
« Reply #4 on: February 16, 2014, 09:26:12 pm »
whats your site, i'll have a look

never under estimate the power of the mind
« Last Edit: March 18, 2014, 10:05:16 pm by aide2001 »

zahra

  • Newbie
  • *
  • Posts: 18
  • OSCLASS_VERSION 3.0.2
Re: search on Mobile Theme
« Reply #5 on: February 17, 2014, 02:55:58 pm »
hello aide2001,

my site: www.i3lani.net ... it's a beta :)

my code:

Code: [Select]
<?php  if ( osc_count_categories() ) { ?>
            <?php osc_categories_select() ; ?>
        <?php  ?>
<fieldset data-role="fieldcontain">
                        <h3><?php _e('Item Location''osc_mobile'); ?></h3>
                        <fieldset data-role="fieldcontain">
                            <?php MblItemForm::country_select(osc_get_countries(), osc_user()) ; ?>
                        </fieldset>
                        <fieldset id="field_select_region" data-role="fieldcontain" style="display:none;">
                            <?php MblItemForm::region_select(osc_get_regions(osc_user_country()), osc_user()) ; ?>
                        </fieldset>
            </fieldset>
        <button type="submit"><?php _e('Search''osc_mobile') ; ?></button>

thanks and best regards

zahra
« Last Edit: February 17, 2014, 02:58:03 pm by zahra »

maxeem

  • Newbie
  • *
  • Posts: 13
Re: search on Mobile Theme
« Reply #6 on: February 17, 2014, 04:27:56 pm »
nice work :)

i think you should try with select Options in jquery mobile so all regions should let Show as Options ...

your Problem is here:
Code: [Select]
<fieldset id="field_select_region" data-role="fieldcontain" style="display:none;">
                            <?php MblItemForm::region_select(osc_get_regions(osc_user_country()), osc_user()) ; ?>
                        </fieldset>
good luck

MaX
« Last Edit: February 17, 2014, 04:30:38 pm by maxeem »

maxeem

  • Newbie
  • *
  • Posts: 13
Re: search on Mobile Theme
« Reply #7 on: February 18, 2014, 05:06:37 pm »
try this:
Code: [Select]
<h3><strong><?php _e('Location''modern') ; ?></strong></h3>
                            <div class="row one_input">
                       
<?php ItemForm::country_select(osc_get_countries(), osc_user()) ; ?>
<?php ItemForm::region_select(osc_get_regions(osc_user_country()), osc_user()) ; ?>
                            </div>

MaX