• Resolved leafaye

    (@leafaye)


    Hi,

    When working with woocommerce variations, the drop downs are showing all values although variation have not been created for all values. Variations have been created with specific combinations.

    For example, at the link above – you will see on the economy stock option – quantities up to 25k show available (with no price because there is no variation created on the back end). That quantity was only created for the premium stock option.

    It is a big issue that all values are showing on the drop downs, which seems to happen after creating variations past 30. Any variations before 30 work fine and the drop down work properly with the proper options depending on the previous selection.

    This has been a very difficult hurdle and is holding up the launch of my business, so if you can treat this issue with urgency, it will extremely appreciated, otherwise, i will have to completely withdraw from using it.

    Thank you so much,

    Lea

    (If you can contact me via phone that would be even better 267-945-1965)

    My email is lea@myresultsmarketing.com

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • You have encountered a well known issue and its called the “variations threshold”.

    If your number of variations is below the threshold (30), all the variation data is loaded at page load time and only available variations are selectable. If your number of variations is above the threshold, all combinations are selectable, then ajax is used to poll the server to find out if that variation exists – with an annoying message if not.

    A fix is to change the threshold and there’s a function here to do so.
    https://gist.github.com/claudiosanches/6f91ad228c2176b986b2

    The new threshold should be larger than your number of variations.

    The code goes in functions.php for your child theme or you can use the “My Custom Functions” plugin.

    The downside is that all variations data is loaded at page load time, so page size will be bigger and load time will increase. The threshold was introduced to ensure page performance. You have not said how many variations you have, so say 50 isn’t likely to be much of a problem but 5000 might be. Consider what proportion of your target market might be on a slow connection. You’ll need to form a judgement.

    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    @leafaye,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    @lorro has covered your question beautifully here. Remember that with great power comes great responsibility. I’d encourage you to use that code snippet wisely.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Huge woocommere issue’ is closed to new replies.