This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Olegs

  • ****
  • 123 posts
Bug - Extra Fields exclude Categories
« on: July 04, 2019, 11:15:34 AM »
If i  would like to disable using Transaction, Condition and Status fields in some categories. I need to enter IDs for category.

For example i would like to disable for vehicle-car category, i enter category ID number:

And it works for publish listening page. Here is everything OK.

But Transaction, Condition and Status fields they do not disappear from the filter menu on category pages.

@Mb themes
« Last Edit: July 04, 2019, 01:39:51 PM by Olegs »

*

Olegs

  • ****
  • 123 posts
Re: Bug - Extra Fields exclude Categories
« Reply #1 on: July 08, 2019, 11:30:15 AM »
@Mb themes ????

*

MB Themes

Re: Bug - Extra Fields exclude Categories
« Reply #2 on: July 08, 2019, 11:33:50 AM »
@Olegs
All categories & subcategories IDs must be entered, have you? Did you try with ajax search enabled or disabled?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Olegs

  • ****
  • 123 posts
Re: Bug - Extra Fields exclude Categories
« Reply #3 on: July 08, 2019, 12:09:03 PM »
All ID numbers are entered, and it works for new item page only. Ajax is enabled

Marked as best answer by frosticek on July 19, 2019, 06:18:07 PM
*

MB Themes

Re: Bug - Extra Fields exclude Categories
« Reply #4 on: July 08, 2019, 12:51:28 PM »
In file:
oc-content/themes/veronika/js/global.js

Find line:
Code: [Select]
      var sidebarReload = false;
replace with:
Code: [Select]
      var sidebarReload = true;

Then in file:
oc-content/themes/veronika/search.php

Find code:
Code: [Select]
              <div class="row">
                <h4><?php _e('Transaction''veronika') ; ?></h4>                           
                <div class="input-box">
                  <?php echo veronika_simple_transaction(); ?>
                </div>
              </div>

              <div class="row">
                <h4><?php _e('Condition''veronika') ; ?></h4>                           
                <div class="input-box">
                  <?php echo veronika_simple_condition(); ?>
                </div>
              </div>

Replace with:
Code: [Select]
             
              <?php if(@!in_array($search_cat_id$exclude_tr_con)) { ?>
                <div class="row">
                  <h4><?php _e('Transaction''veronika') ; ?></h4>                           

                  <div class="input-box">
                    <?php echo veronika_simple_transaction(); ?>
                  </div>
                </div>

                <div class="row">
                  <h4><?php _e('Condition''veronika') ; ?></h4> 
 
                  <div class="input-box">
                    <?php echo veronika_simple_condition(); ?>
                  </div>
                </div>
              <?php ?>


Then find:
Code: [Select]
      $search_cat_id = isset($search_cat_id[0]) ? $search_cat_id[0] : '';
and bellow this line put:
Code: [Select]
      $exclude_tr_con = explode(',', osc_get_preference('post_extra_exclude', 'veronika_theme'));
« Last Edit: July 08, 2019, 12:53:57 PM by MB Themes »
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Olegs

  • ****
  • 123 posts
Re: Bug - Extra Fields exclude Categories
« Reply #5 on: July 13, 2019, 10:02:50 PM »
@Mb themes
Works, thanks
« Last Edit: July 14, 2019, 11:16:26 PM by Olegs »