Support Forums - Classified Ads Script Osclass

General osclass questions => Report bug => Topic started by: morfik on February 24, 2023, 10:49:18 PM

Title: The price field set to off, but in the dashboard is visible while editing an ad
Post by: morfik on February 24, 2023, 10:49:18 PM
Under Settings>Categories there's an option called Enable / Disable the price field, which can hide the price field on certain category listings. This works well. But when editing such listing in dashboard, the fields are visible. I think they should be hidden here too, because it creates a lot of confusion when they're present.
Title: Re: The price field set to off, but in the dashboard is visible while editing an ad
Post by: MB Themes on February 25, 2023, 01:33:45 PM
In "dashboard" you mean in backoffice?
Title: Re: The price field set to off, but in the dashboard is visible while editing an ad
Post by: morfik on February 25, 2023, 01:52:29 PM
In "dashboard" you mean in backoffice?

Yes.
Title: Re: The price field set to off, but in the dashboard is visible while editing an ad
Post by: MB Themes on February 25, 2023, 02:07:44 PM
@morfik
Prefer to have more options in backoffice.
See your point but right now not sure...
Title: Re: The price field set to off, but in the dashboard is visible while editing an ad
Post by: morfik on February 25, 2023, 02:16:39 PM
But since the fields don't apply to the listings, why just not to remove them? They have no purpose in such listings and only confuse admins/mods.
Title: Re: The price field set to off, but in the dashboard is visible while editing an ad
Post by: MB Themes on February 25, 2023, 02:19:04 PM
It's going to be blank. What would be confusion?
Title: Re: The price field set to off, but in the dashboard is visible while editing an ad
Post by: morfik on February 25, 2023, 02:37:07 PM
Because of their existence. If they have no purpose in some listings, they shouldn't exist there -- the principle is the same as with other fields.
Title: Re: The price field set to off, but in the dashboard is visible while editing an ad
Post by: kriskoyk on May 17, 2023, 12:28:21 AM
I changed this:

<fieldset class="s4">   
        <h2><?php _e('Price', 'beta'); ?></h2>

        <div class="in">
          <!-- PRICE -->
          <?php if(osc_price_enabled_at_items()) { ?>
            <div class="price-wrap">
              <div class="inside">
                <div class="enter<?php if($price_type == 'FREE' || $price_type == 'CHECK') { ?> disable<?php } ?>">
                  <div class="input-box">
                    <?php ItemForm::price_input_text(); ?>
                    <?php echo bet_simple_currency(); ?>
                  </div>
                  <div class="or"><?php _e('or', 'beta'); ?></div>
                </div>               
                <div class="selection">
                  <a href="#" data-price="0" <?php if($price_type == 'FREE') { ?>class="active"<?php } ?> title="<?php osc_esc_html(__('Item is offered for free', 'beta')); ?>"><span class="isTablet isDesktop"><?php _e('Free', 'beta'); ?></span><span class="isMobile"><?php _e('Item for free', 'beta'); ?></span></a>
                  <a href="#" data-price="" <?php if($price_type == 'CHECK') { ?>class="active"<?php } ?> title="<?php osc_esc_html(__('Based on agreement with seller', 'beta')); ?>"><span class="isTablet isDesktop"><?php _e('Deal', 'beta'); ?></span><span class="isMobile"><?php _e('Check with seller', 'beta'); ?></span></a>
                </div>
              </div>
            </div>
          <?php } ?>               
      </fieldset>

to this:

<?php if(bet_check_category_price(osc_item_category_id())) { ?>
      <fieldset class="s4">   
        <h2><?php _e('Price', 'beta'); ?></h2>

        <div class="in">
          <!-- PRICE -->
          <?php if(osc_price_enabled_at_items()) { ?>
            <div class="price-wrap">
              <div class="inside">
                <div class="enter<?php if($price_type == 'FREE' || $price_type == 'CHECK') { ?> disable<?php } ?>">
                  <div class="input-box">
                    <?php ItemForm::price_input_text(); ?>
                    <?php echo bet_simple_currency(); ?>
                  </div>
                  <div class="or"><?php _e('or', 'beta'); ?></div>
                </div>               
                <div class="selection">
                  <a href="#" data-price="0" <?php if($price_type == 'FREE') { ?>class="active"<?php } ?> title="<?php osc_esc_html(__('Item is offered for free', 'beta')); ?>"><span class="isTablet isDesktop"><?php _e('Free', 'beta'); ?></span><span class="isMobile"><?php _e('Item for free', 'beta'); ?></span></a>
                  <a href="#" data-price="" <?php if($price_type == 'CHECK') { ?>class="active"<?php } ?> title="<?php osc_esc_html(__('Based on agreement with seller', 'beta')); ?>"><span class="isTablet isDesktop"><?php _e('Deal', 'beta'); ?></span><span class="isMobile"><?php _e('Check with seller', 'beta'); ?></span></a>
                </div>
              </div>
            </div>
          <?php } ?>               
      </fieldset>
<?php } ?>

 in the item_post.php file 

The price box doesn't show up when editing an existing post, but still shows up in a new post. Where is the mistake?