Quantity Input Field Cut Off

Home Forums Ticket Products Event Tickets Plus Quantity Input Field Cut Off

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1020102
    Nicolas
    Participant

    Hello,

    I am having an issue with Tickets for Woocommerce. The issue may be on the Woocommerce side, but hopefully you can help.

    I am new to these plugins, so bear with me. My quantity input in my event, and the cart, is too small. The arrows show up, but the numbers are cut off. What can I do to fix this? I found some CSS for turning the input into a dropdown field, but it caused item to not show up in the cart at all.

    Second question: is it possible to move the Tickets area of an event page up, so that it is above the Details and Venue boxes? I want people to be able to buy right away, without scrolling to the bottom. Here’s a link to my event page:

    https://www.mediumplus.com/event/holiday-fare-and-french-wine-pairing/?preview=true&preview_id=1017&preview_nonce=8aa594a7b9

    Thanks!

    Nick

    #1020197
    Brian
    Member

    Hi,

    Thanks for using our plugins. I can try to help out here, but I am limited in theme compatibility issues.

    I tried to take a look at your site, but cannot access the draft. Can you publish so I can see it?

    As for moving the ticketing form we have this guide for that:

    https://theeventscalendar.com/knowledgebase/moving-the-ticket-form/

    Let me know.

    Thanks

    #1020432
    Nicolas
    Participant

    Hello Brian,

    Thank you for your quick reply. I was able to find another snippet of code that ended up working to change the quantity field. I’ll include that below, for your reference.

    I wasn’t able to get the code to work from you site about making the ticket area move, but that’s ok. I actually like its position where it is. Your help is appreciated!

    Cheers,

    Nick

    // Place the following code in your theme’s functions.php file

    // override the quantity input with a dropdown

    // Note that you still have to invoke this function like this:

    /*

    $product_quantity = woocommerce_quantity_input( array(

    ‘input_name’ => “cart[{$cart_item_key}][qty]”,

    ‘input_value’ => $cart_item[‘quantity’],

    ‘max_value’ => $_product->backorders_allowed() ? ” : $_product->get_stock_quantity(),

    ‘min_value’ => ‘0’

    ), $_product, false );

    */

    function woocommerce_quantity_input($data) {

    global $product;

    $defaults = array(

    ‘input_name’ => $data[‘input_name’],

    ‘input_value’ => $data[‘input_value’],

    ‘max_value’ => apply_filters( ‘woocommerce_quantity_input_max’, ”, $product ),

    ‘min_value’ => apply_filters( ‘woocommerce_quantity_input_min’, ”, $product ),

    ‘step’ => apply_filters( ‘woocommerce_quantity_input_step’, ‘1’, $product ),

    ‘style’ => apply_filters( ‘woocommerce_quantity_style’, ‘float:left; margin-right:10px;’, $product )

    );

    if ( ! empty( $defaults[‘min_value’] ) )

    $min = $defaults[‘min_value’];

    else $min = 1;

    if ( ! empty( $defaults[‘max_value’] ) )

    $max = $defaults[‘max_value’];

    else $max = 10;

    if ( ! empty( $defaults[‘step’] ) )

    $step = $defaults[‘step’];

    else $step = 1;

    $options = ”;

    for ( $count = $min; $count <= $max; $count = $count+$step ) {

    $selected = $count === $defaults[‘input_value’] ? ‘ selected’ : ”;

    $options .= ‘<option value=”‘ . $count . ‘”‘.$selected.’>’ . $count . ‘</option>’;

    }

    echo ‘<div class=”quantity_select” style=”‘ . $defaults[‘style’] . ‘”><select name=”‘ . esc_attr( $defaults[‘input_name’] ) . ‘” title=”‘ . _x( ‘Qty’, ‘Product quantity input tooltip’, ‘woocommerce’ ) . ‘” class=”qty”>’ . $options . ‘</select></div>’;

    }

    #1020720
    Brian
    Member

    I am glad to see you were able to figure it out and thanks for sharing.

    I am going to go ahead and close this ticket. If you have a similar issue or another in the future, please do not hesitate to create a new ticket.

    Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Quantity Input Field Cut Off’ is closed to new replies.