Support » Plugin: WooCommerce Fixed Quantity » Quantity box as table

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Habibillah

    (@habibillah)

    yes, you can change the template. Please follow this instruction https://wordpress.org/plugins/woocommerce-fixed-quantity/faq/

    adroitC

    (@adroitc)

    Hi,
    I followed your instructions on the FAQ page but still was not able to get radio buttons instead of dropdown. Can you tell me what to change in the code:

    <div class=”quantity_select”>
    <select name=”<?php echo esc_attr( $input_name ); ?>”
    title=”<?php _ex( ‘Qty’, ‘Product quantity input tooltip’, ‘woocommerce’ ); ?>”
    class=”qty”>
    <?php foreach ($data[‘woofix’] as $item): ?>

    <?php
    $woofix_price = $item[‘woofix_price’];
    $woofix_qty = $item[‘woofix_qty’];
    $price = wc_price($woofix_price);
    $total = wc_price($woofix_price * $woofix_qty);

    $woofix_desc = !empty($item[‘woofix_desc’])? $item[‘woofix_desc’] : WOOFIXCONF_QTY_DESC;
    $description = str_replace(
    array(‘{qty}’, ‘{price}’, ‘{total}’, ‘ ‘),
    array($woofix_qty, $price, $total, ‘ ‘),
    $woofix_desc
    );
    ?>

    <option value=”<?php echo $woofix_qty; ?>”
    data-qty=”<?php echo $woofix_qty; ?>”
    data-price=”<?php echo $woofix_price; ?>” <?php echo ($selected_quantity == $woofix_qty)? “selected” : “”; ?>>

    <?php echo $description; ?>
    </option>

    <?php endforeach; ?>
    </select>
    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Quantity box as table’ is closed to new replies.