[Resolved] Input Comma in quantity field

Home Forums Support [Resolved] Input Comma in quantity field

Home Forums Support Input Comma in quantity field

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #1682054
    Jochen

    Hej,
    I am selling mostly products based on weight. Hence, the customers will be able to order decimal quantities.

    However, I just realised that I am not able to enter a Comma in the single-products quantity input, e.g. https://www.kraemerladen.bio/produkt/bio-datteln-medjool/

    I figured out that this is due to the events fired by your theme on keyup, given in plugins/gp-premium/woocommerce/functions/js/woocommerce.min.js?ver=1.12.3 on line 1025.

    Any quick fix for that?

    Thanks,
    jochen

    #1682297
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That’s strange, I’m not seeing anything in our javascript that would prevent this. The file you mentioned in the minified version – can you spot the issue in the non-minified version?

    Is the issue only when manually inputting a number with a comma vs. a decimal?

    #1682367
    Jochen

    Hej,
    Thanks!

    How can I force generatePress to use the non-minified version?

    It is only when manually inputting a number via keyboard. I just figured out, that it works if you enter a decimal value reeeeally fast.

    #1683493
    Tom
    Lead Developer
    Lead Developer

    This is how to test the non-minified version: https://wordpress.org/support/article/debugging-in-wordpress/#script_debug

    Does the same issue happen if you turn off the quantity buttons in Customize > Layout > WooCommerce?

    #1683530
    Jochen

    Thanks,
    I realised some things:

    – the issue does not occur in Edge
    – the issues does not occur in Chrome
    > It is just Firefox, even in Safe Mode.

    – using quantity buttons from the plugin “Woocommerce Min Max Step Control” is not generating this issue
    – using the non-minified js does not change anything
    – any different character than a number brings up the issue (“,”, “.”,”-” ..)

    Any idea?
    Thanks

    #1684746
    Tom
    Lead Developer
    Lead Developer

    Did you see if it was still an issue with the quantity buttons turned off?

    #1685158
    Jochen

    It is not an issue with the buttons turned off.

    #1685692
    Tom
    Lead Developer
    Lead Developer

    Thanks for confirming. I’ll test this some more and will get back to you 🙂

    #1686082
    Tom
    Lead Developer
    Lead Developer

    I’m not able to get the standard quantity input to accept , at all, even if I change the decimal separator in the WooCommerce settings, or set my WordPress language to a language that uses commas.

    Can you link me to a page where it’s possible maybe?

    #1686357
    Jochen

    I disabled the themes quantity buttons. Now it is possible, but I would like to keep the buttons.

    https://www.kraemerladen.bio/produkt/bio-amaranth/

    #1687079
    Tom
    Lead Developer
    Lead Developer

    I’m not able to use a comma in there. What language is your keyboard set to?

    #1687102
    Jochen

    Well,that is getting more and more weird 😉
    I am using a German keyboard setting. However, if I set it to English it works as well.

    As soon as I enable the themes’ quantity button it is not possible in Firefox anymore.

    #1687117
    Tom
    Lead Developer
    Lead Developer

    Are you using a plugin or a specific setting to allow decimal steps in the quantity field?

    #1687128
    Jochen

    as mentioned above I am using the plugin “Woocommerce Min Max Step Control”

    #1687185
    Tom
    Lead Developer
    Lead Developer

    Can you try replacing your woocommerce.min.js file with this?: https://pastebin.com/raw/Ldg6SJ1x

    Any change?

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