• Resolved thisisbbc

    (@thisisbbc)


    Hi,

    After updating to the latest version of WC2.3, our quantity selectors are gone on the product page. Is this by design?
    I tried to look up in the settings but didn’t see anything related to that.

    PS : I deactivated all plugins to see if it was a conflict and the problem persisted.

    Kind regards,
    BBC

    https://www.ads-software.com/plugins/woocommerce/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Thread Starter thisisbbc

    (@thisisbbc)

    Alright thanks for the swift reply!

    ??

    Thank you Mike Jolley, I forgot about that!

    That worked perfect!

    Is there a way to style these for mobile devices? Before I had nice square buttons that worked well, now on phones they are round, and I can’t figure out how to change them back.

    Thread Starter thisisbbc

    (@thisisbbc)

    @b-summers

    You can use media query to apply CSS rules only to devices with a maximum width, that’s how I build our responsive websites.

    @media screen and (max-width: 470px) {
    // Your CSS
    }

    The selectors for the + and – buttons are
    .woocommerce .quantity .plus
    and
    .woocommerce .quantity .minus

    Good luck ??

    Did anyone actually have luck with properly fixing this that way? I am struggling with getting it done with my theme.

    Thread Starter thisisbbc

    (@thisisbbc)

    The plugin worked OOTB for me.
    You can try and implement the code in your functions.php manually but I can’t see how that would be different from using the plugin.
    Maybe you use a caching plugin?

    Tried both, just in case. No caching plugin neither. Very strange. Contacted my theme’s developer for support. Let’s see. This is not good though at the moment ??

    I installed the plugin and now I add the amount of tickets to the cart. However, when I do that, I get a blank cart page. Please try yourself at Haarlembeachfestival.nl. Please help out asap as it’s very urgent!!

    the code
    <input type="number" />
    should show me a number field with two litle arrow to increase and decrease numners…but what i get is a simple sad textfield with no arrow…
    is that correct?

    Oh…. it didn’t work on my site. Why??
    I should add the code in theme functions.php, right?

    Hi bros,

    Just paste this code to your .js theme file :

    jQuery(function($){$(“div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)”).addClass(“buttons_added”).append(‘<input type=”button” value=”+” class=”plus” />’).prepend(‘<input type=”button” value=”-” class=”minus” />’),$(document).on(“click”,”.plus, .minus”,function(){var t=$(this).closest(“.quantity”).find(“.qty”),a=parseFloat(t.val()),n=parseFloat(t.attr(“max”)),s=parseFloat(t.attr(“min”)),e=t.attr(“step”);a&&””!==a&&”NaN”!==a||(a=0),(“”===n||”NaN”===n)&&(n=””),(“”===s||”NaN”===s)&&(s=0),(“any”===e||””===e||void 0===e||”NaN”===parseFloat(e))&&(e=1),$(this).is(“.plus”)?t.val(n&&(n==a||a>n)?n:a+parseFloat(e)):s&&(s==a||s>a)?t.val(s):a>0&&t.val(a-parseFloat(e)),t.trigger(“change”)})});

    And it ‘s working ,Enjoy !
    You can see here:https://taleeshop.com/shop/ao-thun-nam-co-tru-phoi-vang-xanh-bt94/

    Reece

    (@firstclasscode)

    Wrong thread, sorry.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘No more quantity selector after update’ is closed to new replies.