[Resolved] change justify setting for div.quantity.buttons-added in mobile

Home Forums Support [Resolved] change justify setting for div.quantity.buttons-added in mobile

Home Forums Support change justify setting for div.quantity.buttons-added in mobile

  • This topic has 7 replies, 3 voices, and was last updated 2 months ago by Fernando.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2241102
    Heinrich

    hi team,

    struggling with adressing the correct class to change the justify-content setting which is in mobile: flex-end, i want to have it centered in mobile too. thought it has to be “div.quantity.buttons-added” but i cannot address this class. the whole thing is about the quantity buttons.

    can you please have a look and give me a hint?

    #2241199
    David
    Staff
    Customer Support

    Hi there,

    what element exactly are you trying to change ?

    The div.quantity.buttons-added container is for the Quantity Buttons on a single product – but i don’t see them on your products ?

    #2241211
    Heinrich

    hi david,

    we show this on the archive as you can see on the link i sent you. and on archive in mobile i habe the problem.

    the snippet we use to show quantity on archive is:

    add_filter( ‘woocommerce_loop_add_to_cart_link’, ‘quantity_inputs_for_woocommerce_loop_add_to_cart_link’, 10, 2 );
    function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) {
    if ( $product && $product->is_type( ‘simple’ ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold_individually() ) {
    $html = ‘<form action=”‘ . esc_url( $product->add_to_cart_url() ) . ‘” class=”cart” method=”post” enctype=”multipart/form-data”>’;
    $html .= woocommerce_quantity_input( array(), $product, false );
    $html .= ‘<button type=”submit” class=”button alt”>’ . esc_html( $product->add_to_cart_text() ) . ‘</button>’;
    $html .= ‘</form>’;
    }
    return $html;
    }

    #2241228
    David
    Staff
    Customer Support

    I don’t see them on the link you provided as is see this:

    You must log in before you can shop with us.
    Continue reading
    #2241327
    Heinrich

    ah, you have to be logged in. i send you the credentials

    #2241896
    Fernando
    Customer Support

    Hi Heinrich,

    Here’s a CSS you may try adding in Appearance > Customize > Additional CSS to address the issue:

    @media (max-width: 768px) {
        .products .quantity.buttons-added {
            justify-content: center;
        }
    }

    Kindly let us know how it goes!

    #2242225
    Heinrich

    perfect, tks

    #2244463
    Fernando
    Customer Support

    You’re welcome Heinrich!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.