*

Yogesh

  • ***
  • 27 posts
Price Field - bounding classified website categories
« on: May 07, 2016, 06:55:08 PM »
when we disable price field in some categories, it shouldn't show in item page. but it show in  item page..... "price-check with seller"
in publish listing page price field will hide automatically when we select a price field disabled category. and that is what we need in item page also.

because in some categories like matrimonial/personal and job offer, price tag is not LEGAL. In a category like matrimonial there no work of price section.

can we put any code condition there that when price field is disabled in osclass category price option will not show in item page.
when i looked at item.php page there was an "if' condition but i think it is related to optional price field checkbox of listing setting in osclass.

please solve my problem.... it is bounding my classified
thanx...

*

MB Themes

Re: Price Field - bounding classified website categories
« Reply #1 on: May 08, 2016, 10:30:40 AM »
@Yogesh
Thanks for your tip, actually this fix does not exist even in bender theme.

Go to file oc-content/themes/zara/item.php

At bottom above this block:
Code: [Select]
  <?php if(!$content_only) { ?>
    <?php osc_current_web_theme_path('footer.php') ; ?>
  <?php ?>


Place following code:
Code: [Select]
  <!-- CHECK IF PRICE IN THIS CATEGORY IS ENABLED -->
  <script>
  $(document).ready(function(){
    var cat_id = <?php echo osc_item_category_id(); ?>;
    var catPriceEnabled = new Array();

    <?php
      $categories 
Category::newInstance()->listAllfalse );
      foreach( 
$categories as $c ) {
        if( 
$c['b_price_enabled'] != ) {
          echo 
'catPriceEnabled[ '.$c['pk_i_id'].' ] = '.$c'b_price_enabled' ].';';
        }
      }
    
?>


    if(catPriceEnabled[cat_id] == 0) {
      $(".item-details .price.elem").hide(0);
    }
  });
  </script>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Yogesh

  • ***
  • 27 posts
Re: Price Field - bounding classified website categories
« Reply #2 on: May 08, 2016, 02:52:57 PM »
Thanx a lot......

*

MB Themes

Re: Price Field - bounding classified website categories
« Reply #3 on: May 08, 2016, 04:03:03 PM »
@Yogesh
Welcome, nice tip ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oluwatohbee

  • ***
  • 54 posts
Re: HOW TO REMOVE THE FREE
« Reply #4 on: May 10, 2016, 09:12:44 AM »
HOW can i remove the Free botton

*

oluwatohbee

  • ***
  • 54 posts
Re: Price Field - bounding classified website categories
« Reply #5 on: May 10, 2016, 09:40:12 AM »
The code is not working, any other way

*

MB Themes

Re: Price Field - bounding classified website categories
« Reply #6 on: May 10, 2016, 11:20:30 AM »
@oluwatohbee
Checked source code on your site and you did not placed code I have suggested.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oluwatohbee

  • ***
  • 54 posts
Re: Price Field - bounding classified website categories
« Reply #7 on: May 10, 2016, 11:46:06 AM »
I DID that is the image below

*

MB Themes

Re: Price Field - bounding classified website categories
« Reply #8 on: May 10, 2016, 12:20:18 PM »
@oluwatohbee
Sorry, I was checking different URL.
Post your url please.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots


*

MB Themes

Re: Price Field - bounding classified website categories
« Reply #10 on: May 10, 2016, 12:35:27 PM »
@oluwatohbee
As you can see from file where you should place code, this is valid only on listing page only.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oluwatohbee

  • ***
  • 54 posts
Re: Price Field - bounding classified website categories
« Reply #11 on: May 10, 2016, 12:39:04 PM »
I DON'T GET you

*

MB Themes

Re: Price Field - bounding classified website categories
« Reply #12 on: May 10, 2016, 01:43:51 PM »
@oluwatohbee
Solution is valid for listing/item page only, not for search, home or any other.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oluwatohbee

  • ***
  • 54 posts
Re: Price Field - bounding classified website categories
« Reply #13 on: May 10, 2016, 02:07:38 PM »
ok