Error with products that use "Step"

HomeForumsWooCommerce User Role MinimumsError with products that use "Step"

Tagged: , ,

Viewing 5 reply threads
  • Author
    Posts
    • #17272
      Laurent
      Participant

      Hi,

      we recently upgraded wordpress, theme and plugins and everything seems to work fine, except your plugin in certain cases. When product have MIN (for example 4) value it works fine, but if that same product have STEP enabled (for example 4) customers get error message that number isn’t right, no matter if they chose 4, 8, 12…

      I really hope you have any idea how to solve that problem as my business heavily depends on my web store. If you need any more info, please contact me.

      Thanks for your time and have a nice day,

      Laurent Resman

    • #17276
      Stephen Sherrard
      Keymaster

      Is your theme replacing the quantity input template and doing something “non-standard” for your quantity inputs? Maybe something changed in the theme in all your updates? Did you not test all those updates on a staging/development server first before doing them on a live site?

      I can NOT reproduce any issues with step values here on my development system, with latest versions of everything, running the WooCommerce Storefront theme. Step values are working exactly as intended with the newest version of WooCommerce.

      Note that if you enter a step value, then the minimum should also be the same as the step value, meaning 4 in your example. Otherwise, if you leave the minimum blank, WooCommerce sets the min at 1, and then the html5 modern browser input checks will test if the quantity is the sum of that initial minimum plus a multiple of the step value. However, then my plugin will give you an error since it’s interpreting step values as the quantity must be a multiple of the step, with no starting offset value. So, if you set your step values to 4, but did NOT enter a minimum of 4, then the HTML5 input in your browser will only let you enter values such as 1, 5, 9, 13, etc., while my plugin checks for multiples of 4 when you add to cart, so my plugin is looking for 4, 8, 12, etc.

      I set my plugin to work that way since that was the most common request, when people are selling things that come in a case of 6 or 12, etc., and they ONLY want multiples of that value.

      Not sure if that’s your problem, but that’s the only way I could get it to where I could add something to the cart (no minimum, but a step value of 4).

    • #17278
      Laurent
      Participant

      Hi,

      thank you for your quick and comprehensive response, unfortunately, we updated the live website, because after the migration to the new server we did not set-up a test environment (updates were made for security reasons). Would you check the problem if we let you access the control panel? Or is this beyond the limits of your support? (If so, I fully understand).

      Thanks for your time again and help,

      Laurent Resman

    • #17280
      Laurent
      Participant

      P.S. I have set Minimum values like MIN:4, STEP:4 (error, closest value is 1 and 5), yet I get same error as you described.

    • #17282
      Stephen Sherrard
      Keymaster

      If the minimum value is not getting set correctly, then my guess is your theme has changed something that is affecting those values. But, in your first post you said the minimum still works fine? But, if you set both minimum and step then somehow your minimum is getting reset to 1 (or no value, which defaults to 1)??

      You can email me privately through the contact form, or stephen at (my domain name), and set me up with temporary access so I can take a look at your settings and anything in the theme or another plugin that might be interfering with my plugin’s settings.

    • #17289
      Stephen Sherrard
      Keymaster

      Closing this, and for others that may find this, it was a conflict with another plugin that was also trying to set a minimum quantity. Two different plugins attempting to adjust the same value is never a good idea, unless they were designed to work together. The conflict was somehow resetting the minimum quantity to 1, which then made the step values not work correctly.

Viewing 5 reply threads
  • The topic ‘Error with products that use "Step"’ is closed to new replies.