Advertisement:

Author Topic: OsclassWizards - Category / Subcategory selection  (Read 974 times)

Aficionado

  • Guest
OsclassWizards - Category / Subcategory selection
« on: September 08, 2017, 03:41:00 am »
I'm posting a new topic, since the OsclassWizards theme topic is huge and cluttered.

I have 20 main categories (few) but several sub categories inside those. Currently the selection is in ONE stage and the drop-down is huge. Very user-unfriendly.

Any ideas how i can split that to (1) first select Main Category and then (2) a second form dropdown for the subcategory.

Maybe some one has done that ?

I do remember Modern theme had that.


Thanks
« Last Edit: September 08, 2017, 03:49:55 am by Aficionado »

Aficionado

  • Guest
Re: OsclassWizards - Category / Subcategory selection
« Reply #1 on: September 08, 2017, 03:56:27 am »
This is the code used in Modern for that purpose:

Code: [Select]
<div class="row">
          <label for="catId"><?php _e('Category''modern'); ?> *</label>
          <?php ItemForm::category_multiple_selects(nullnull__('Select a category''modern')); ?>
</div>

Aficionado

  • Guest
Re: OsclassWizards - Category / Subcategory selection
« Reply #2 on: September 08, 2017, 04:12:54 am »
How silly of me.

Already an option in OsclassWizards theme:

Category multiple selects



_carlison

  • Full Member
  • ***
  • Posts: 134
Re: OsclassWizards - Category / Subcategory selection
« Reply #3 on: September 08, 2017, 12:40:23 pm »
Hi Aficionado,

Try to my code :

Quote
  <!-- 
<label class="control-label" for="select_1">
              <?php _e('Category', YOUR THEME NAME); ?>
            </label>
            <div class="controls">
              <?php  if ( osc_count_categories() ) { ?>
         <?php if(osc_get_preference('category_multiple_selects', 'YOUR THEME NAME') == '1'){ ?>
           <div class="cat_multiselect"><?php ItemForm::category_multiple_selects(null, null, null, osc_esc_html(__('Select a category', YOUR THEME NAME))); ?></div>
         <?php }else{ ?>
              <?php ItemForm::category_select(null, null, osc_esc_html(__('Select a category', YOUR THEME NAME))); ?>
         <?php } ?>
              <?php  } ?>
            </div>
          </div>

-->

Please remove above code or hide like that.

and use below code :
Quote
<div class="box description"><div class="control-group">
                            <label class="control-label" for="select_1"><?php _e('Category', 'YOUR THEME NAME'); ?></label>
                            <div class="controls category"><div class="col-md-12">
                                <?php ItemForm::category_multiple_selects(null, null, __('Select a category', 'YOUR THEME NAME')); ?>
                            </div></div>
                        </div>
may be it will work for you, coz i used this code in my osclasswizard theme in item-post.php .

Aficionado

  • Guest
Re: OsclassWizards - Category / Subcategory selection
« Reply #4 on: September 08, 2017, 12:42:43 pm »
@_Carlison

Did you read the whole thread ?

Thanks, but that was already an option in OsclassWizards theme and didn't notice it. So no need for anything.

_carlison

  • Full Member
  • ***
  • Posts: 134
Re: OsclassWizards - Category / Subcategory selection
« Reply #5 on: September 08, 2017, 12:45:28 pm »
yes i have read, and you are talking about below code :
Am I right Mr Aficionado ?

This is the code used in Modern for that purpose:

Code: [Select]
<div class="row">
          <label for="catId"><?php _e('Category''modern'); ?> *</label>
          <?php ItemForm::category_multiple_selects(nullnull__('Select a category''modern')); ?>
</div>

but can you check my code, coz its something different. yes most of parts are same. but if its work for you then you will try otherwise its ok.

Aficionado

  • Guest
Re: OsclassWizards - Category / Subcategory selection
« Reply #6 on: September 08, 2017, 12:46:41 pm »
yes i have read, and you are talking about below code :
Am I right Mr Aficionado ?

This is the code used in Modern for that purpose:

Code: [Select]
<div class="row">
          <label for="catId"><?php _e('Category''modern'); ?> *</label>
          <?php ItemForm::category_multiple_selects(nullnull__('Select a category''modern')); ?>
</div>

but can you check my code, coz its something different. yes most of parts are same. but if its work for you then you will try otherwise its ok.

Not sure what you mean. Why try something not needed, since the theme natively support it ?


_carlison

  • Full Member
  • ***
  • Posts: 134
Re: OsclassWizards - Category / Subcategory selection
« Reply #7 on: September 08, 2017, 12:49:01 pm »
Sorry for my English...

 ;) ;)