*

piter

  • ****
  • 104 posts
Improved logic for Extra Fields
« on: April 14, 2019, 05:23:34 PM »
Here is the code from item-post.php for showing extra fields:

Code: [Select]
        <!-- 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 alp_simple_currency(); ?>
                </div>

                <div class="or"><?php _e('or''alpha'); ?></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''alpha')); ?>"><?php _e('Free''alpha'); ?></a>
                <a href="#" data-price="" <?php if($price_type == 'CHECK') { ?>class="active"<?php ?> title="<?php osc_esc_html(__('Based on agreement with seller''alpha')); ?>"><?php _e('Deal''alpha'); ?></a>
              </div>
            </div>
          </div>
        <?php ?>


        <!-- CONDITION & TRANSACTION -->
        <div class="status-wrap">
          <div class="transaction">
            <label for="sTransaction"><?php _e('Transaction''alpha'); ?></label>
            <?php echo alp_simple_transaction(); ?>
          </div>

          <div class="condition">
            <label for="sCondition"><?php _e('Condition''alpha'); ?></label>
            <?php echo alp_simple_condition(); ?>
          </div>
        </div>

The conditional check hides the PRICE input field if FOR FREE or OFFER is selected.
Code: [Select]
<div class="enter<?php if($price_type == 'FREE' || $price_type == 'CHECK') { ?> disable<?php ?>">
Can you please help and to add the same condition to CONDITION & TRANSACTION block?
I need that if FOR FREE or OFFER is selected the TRANSACTION TYPE options will be disabled too.
When not active the TRANSACTION TYPE list can be grayed out (same as price field) or hidden.
« Last Edit: April 14, 2019, 05:44:58 PM by piter »

*

piter

  • ****
  • 104 posts
Re: Improved logic for Extra Fields
« Reply #1 on: April 17, 2019, 01:07:34 AM »
...anyone ? ???

*

MB Themes

Re: Improved logic for Extra Fields
« Reply #2 on: April 17, 2019, 03:31:00 PM »
@piter
That's jquery works, you may find how it is made for prices at bottom of item-post.php or global.js
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

piter

  • ****
  • 104 posts
Re: Improved logic for Extra Fields
« Reply #3 on: April 18, 2019, 09:14:42 PM »
noo... I've looked into the files but its above my knowledge. I'm dealing with GUI and usability, jquery is not my story :(