*

nijamutheen

  • ****
  • 110 posts
Hide Transaction / Condition in some categories
« on: August 22, 2017, 09:39:19 PM »
How to hide some search field when go to particular category http://prntscr.com/gbrsb6
« Last Edit: August 23, 2017, 09:04:50 AM by frosticek »

*

MB Themes

Re: hide some search field when go to particular category
« Reply #1 on: August 23, 2017, 09:04:13 AM »
@nijamutheen

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 it with:
Code: [Select]
              <?php
                $transaction_exclude 
= array(1,2,3);   // enter IDs of categories where transaction will not be shown
                
$condition_exclude = array(1,2,3);     // enter IDs of categories where condition will not be shown
              
?>


              <?php if(!in_array($search_cat_id$transaction_exclude)) { ?>
                <div class="row">
                  <h4><?php _e('Transaction''veronika') ; ?></h4>                           
                  <div class="input-box">
                    <?php echo veronika_simple_transaction(); ?>
                  </div>
                </div>
              <?php ?>

              <?php if(!in_array($search_cat_id$condition_exclude)) { ?>
                <div class="row">
                  <h4><?php _e('Condition''veronika') ; ?></h4>                           
                  <div class="input-box">
                    <?php echo veronika_simple_condition(); ?>
                  </div>
                </div>
              <?php ?>

Modify IDs in variables $transaction_exclude, $condition_exclude and enter there IDs of categories where you want to hide transaction or condition.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

nijamutheen

  • ****
  • 110 posts
Re: Hide Transaction / Condition in some categories
« Reply #2 on: August 23, 2017, 08:32:09 PM »
Thanks for ur quick reply Bro,

Sorry for asking I forgot one thing I need to hide price slider also for particular categories bro
« Last Edit: August 23, 2017, 08:40:30 PM by nijamutheen »

*

MB Themes

Re: Hide Transaction / Condition in some categories
« Reply #3 on: August 23, 2017, 08:55:33 PM »
Use same logic for price slider field.
More, price slider should auto-hide on categories where price is disabled.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

nijamutheen

  • ****
  • 110 posts
Re: Hide Transaction / Condition in some categories
« Reply #4 on: August 24, 2017, 02:44:15 PM »
Is this correct Bro
I entered all subcategries and categories Id's
Code: [Select]
<?php
                $transaction_exclude 
= array(467,466,465,464,463,462,461,460,459,458,457,456,455,469,470,468,413,428,427,426,425,424,423,422,415,405,404,403,414,402,436,435,434,433,432,432,430,58,420,42,418,417,416,412,411,410,409,408,407,406,446,447,445,444,443,451,450,449,448,442,441,440,449,438,454,453,439,452,437,157,383,385,384,382,150,386,398,397,396,395,153,394,399,400,393,401,388,389,392,391,390,387,352,373,381,380,379,351,378,377,376,375,374,368,369,370,371,372,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,344,345,346,347,348,349,350,343,333,334,335,336,337,338,339,340,341,342,322,323,324,325,326,327,328,329,330,331,332,312,313,314,315,316,317,318,319,320,321,306,307,308,309,310,311,303,304,305,299,294,300,301,302,106,7,3,122,123,128,38,131,125,130,124,39,40,126,129,127,132,41,133,42,8,75,134,76,77,78,79,80,81,82,83,84,136,135,85,86,87,88,89,90,91,92,93,95,,5,139,140,295,296,297,298,291,138,137,52,142,141,167,53,146,144,147,143,145,54,148,149,55,150,56,151,57,58,153,152,155,154,169,156,158,157,59,60,159,161,160,162,163,164,61,107,165,172,168,171,170,166,62,6,63,64,65,66,67,68,198,199,9,200,201,202,203 );   // enter IDs of categories where transaction will not be shown
                
$condition_exclude = array(467,466,465,464,463,462,461,460,459,458,457,456,455,469,470,468,413,428,427,426,425,424,423,422,415,405,404,403,414,402,436,435,434,433,432,432,430,58,420,42,418,417,416,412,411,410,409,408,407,406,446,447,445,444,443,451,450,449,448,442,441,440,449,438,454,453,439,452,437,157,383,385,384,382,150,386,398,397,396,395,153,394,399,400,393,401,388,389,392,391,390,387,352,373,381,380,379,351,378,377,376,375,374,368,369,370,371,372,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,344,345,346,347,348,349,350,343,333,334,335,336,337,338,339,340,341,342,322,323,324,325,326,327,328,329,330,331,332,312,313,314,315,316,317,318,319,320,321,306,307,308,309,310,311,303,304,305,299,294,300,301,302,106,7,3,122,123,128,38,131,125,130,124,39,40,126,129,127,132,41,133,42,8,75,134,76,77,78,79,80,81,82,83,84,136,135,85,86,87,88,89,90,91,92,93,95,,5,139,140,295,296,297,298,291,138,137,52,142,141,167,53,146,144,147,143,145,54,148,149,55,150,56,151,57,58,153,152,155,154,169,156,158,157,59,60,159,161,160,162,163,164,61,107,165,172,168,171,170,166,62,6,63,64,65,66,67,68,198,199,9,200,201,202,203 );     // enter IDs of categories where condition will not be shown
              
?>


              <?php if(!in_array($search_cat_id$transaction_exclude)) { ?>
                <div class="row">
                  <h4><?php _e('Transaction''veronika') ; ?></h4>                           
                  <div class="input-box">
                    <?php echo veronika_simple_transaction(); ?>
                  </div>
                </div>
              <?php ?>

              <?php if(!in_array($search_cat_id$condition_exclude)) { ?>
                <div class="row">
                  <h4><?php _e('Condition''veronika') ; ?></h4>                           
                  <div class="input-box">
                    <?php echo veronika_simple_condition(); ?>
                  </div>
                </div>
              <?php ?>


But i confused price hididng how to change this see this is my price script
Code: [Select]
            <?php if( osc_price_enabled_at_items() ) { ?>
              <fieldset class="price-box">
                <div class="row price">
                  <h4><?php _e('Price''veronika'); ?>:</h4>
                  <div id="amount-min"></div><div id="amount-del">-</div><div id="amount-max"></div>
                </div>

                <div class="slider-span">
                  <div id="slider-range"></div>
                </div>
              </fieldset>
            <?php ?>
« Last Edit: August 24, 2017, 02:54:27 PM by nijamutheen »

*

Ghany

  • ****
  • 227 posts
Re: Hide Transaction / Condition in some categories
« Reply #5 on: August 24, 2017, 08:44:15 PM »
This willnot reflecting home page search, how to do same for home search?
Unlock the power of visibility without breaking the bank - https://www.adycart.in/

*

MB Themes

Re: Hide Transaction / Condition in some categories
« Reply #6 on: August 25, 2017, 10:28:47 AM »
@Ghany
On homepage search you can remove them or not.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ghany

  • ****
  • 227 posts
Re: Hide Transaction / Condition in some categories
« Reply #7 on: August 25, 2017, 01:12:33 PM »
@frosticek

i want to hide transaction filed on Home Page for some categories like matrimonial

i have used above code what you have provided to nijamutheen, its working well with search page, not with home search.

i think i have to add some code in inc.search.php,
can you provide that code if its possible?

Unlock the power of visibility without breaking the bank - https://www.adycart.in/

*

MB Themes

Re: Hide Transaction / Condition in some categories
« Reply #8 on: August 25, 2017, 03:29:54 PM »
@Ghany
There is no reload on home page.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ghany

  • ****
  • 227 posts
Re: Hide Transaction / Condition in some categories
« Reply #9 on: August 25, 2017, 05:13:53 PM »
No problem, hided transaction field on homepage,

Thank you
Unlock the power of visibility without breaking the bank - https://www.adycart.in/

*

nijamutheen

  • ****
  • 110 posts
Re: Hide Transaction / Condition in some categories
« Reply #10 on: August 26, 2017, 03:29:50 PM »
Transaction And condition  succesfully hidden on Dektop  when go to particular category But not not mobile format bro
still now mobile format showing transaction and condition when go to particular category
« Last Edit: September 23, 2017, 08:57:12 PM by nijamutheen »