Okay
  Public Ticket #4561806
Dynamic Rule Functionality on Product Pages for Category Minimums
Closed

Comments

  •  1
    Noah Johnson started the conversation

    I'd like to have a rule that requires a minimum order of 10 units in a category, while allowing those 10 units to be comprised of different products from within that category.

    This dynamic rule works in the cart, but on the product pages, the rule applies even with the "applies to each individual product" unchecked. It requires the customer to add 10 units to their cart of any product within that category. The rule forces the qty to 10 and even trying to manually add fewer results in an alert blocking the addition to the cart.

    After the customer has added the 10 units to the cart, they can then, in the cart, reduce quantities of each product in that category such that the sum of all quantities for products in that category is a minimum of 10. But the way this rule functions on the product page is confusing to customers (makes them think they have to order 10 of each, not 10 total).

    Ideally, the dynamic rule for category minimums would only apply in the cart, and the customer would be free to add less than the 10 minimum for each product in that category.

    Am I missing something in the settings?

    If not, can you modify or add the functionality I've described?

  •  2,724
    WebWizards replied

    Hi Noah,

    Thank you for purchasing our plugin,

    The expected behavior here is for the rule to apply only in the cart, not on product pages. I tried to reproduce the issue locally but I wasn't able to see it in my tests: https://www.loom.com/share/cbe24f3dda024fd2bf909c650235d76e

    A couple of things to check please:

    1. Make sure a minimum quantity is not set directly on the product itself: https://prnt.sc/PpT4z6OALN03
    2. Check if there are any other minimum rules configured that might be overlapping with this one.
    3. Check if any other plugins on the site might be enforcing minimum quantities (some inventory or quantity-control plugins do this).

    It's hard to say more without seeing it directly. If you'd like, we can look into it directly if you can share a backend login to the site, or a staging clone site.

    Kind regards,
    Stefan

  •  1
    Noah Johnson replied

    Hi Stefan,

    Thanks for looking into this.

    I've reinstated the rule so you can take a look at it. 

    https://www.noahjohnsonart.com/wholesale/

    user/pass to the wholesale side for testing (I'll delete the test account once you're done viewing):

    testwholesale

    Then add a product in the "archival prints" category and see the issue.

    All products in this category have variations to choose from. Maybe that's tripping it up.

    No other minimum rules should apply to this category, and I have no other plugins to my knowledge that would  have any impact on minimums.

    Attached files:  Screenshot 2026-04-29 at 1.04.10 PM.png

  •  2,724
    WebWizards replied

    Hi Noah,

    Thanks for setting that up,

    I tested and I can see issue on your site, however I'm not sure yet what's causing it. I also tested locally with a variable product setup similar to yours and couldn't reproduce the problem there.

    It could be coming from B2BKing itself related to a specific combination of settings, or it could be a conflict with something else on the site. Hard to say more without investigating directly.

    Could you please provide us with an admin login to the site, or a staging clone, so we can troubleshoot this properly?

    Kind regards,
    Stefan

  •   Noah Johnson replied privately
  •   Noah Johnson replied privately
  •   Noah Johnson replied privately
  •  2,724
    WebWizards replied

    Hi Noah,

    Apologies, unfortunately we didn't get to the QuickForget link in time before it expired.

    Feel free to post the login details here directly in a private reply. Only you and our team will be able to access it.

    Alternatively, I'd recommend creating an admin account for us using our email [email protected]. That way you can simply delete it once we've closed the ticket.

    Kind regards,
    Stefan

  •   Noah Johnson replied privately
  •  2,724
    WebWizards replied

    Hi Noah,

    Thanks for your patience on this. I believe I've identified the issue - it looks to be related to a JS conflict with the variation swatches.

    I've pushed an update to B2BKing Pro on your site that should resolve it. I ran a few tests and I'm no longer seeing the issue.

    Could you take a look and let me know if everything's working as expected now, or if you're still seeing any issues?

    Kind regards,
    Stefan

  •  1
    Noah Johnson replied

    Hi Stefan,

    Thanks for your work on this.

    The functionality for dynamic rule for minimum quantities now works, but page load times when logged into the wholesale-side of the website are much slower than when browsing the website as a non-wholesale/guest user.

    Are you able to identify and fix the slow load times for logged-in wholesale users?

    Didn't notice a speed difference before -- much appreciated if you're able to find a solution.

  •  2,724
    WebWizards replied

    Hi Noah,

    Thanks for your patience on this. I dug into the load times issues:

    The bulk of the loading time comes from how dynamic rules are processed. For variable products, each variation has to be processed individually, so pages with many variable products end up being the heaviest. On your site, I think the Archival Prints category has the most, which makes it the slowest page.

    I've made a few optimizations on your site, including adding a code snippet and additional internal caching via a B2BKing Pro update. In my tests, this brought the load time on that page from around 4 seconds down to about 2.2 seconds for B2B users. For B2C the time is around 1.8s, so there's still a small difference but it should be minimal. Other pages should be faster.

    Some speed impact is unavoidable given how the rules need to evaluate each variation, but hopefully this makes a noticeable difference.

     

    One quick note: while testing and updating B2BKing, I briefly ran into a critical error on the site, caused by the cache I was working on. It should be resolved so there's nothing to worry about, but you may have received a notification email from the site about it. Everything should be back to normal now.

    Let me know how things look on your end. If you still find any particular pages too slow, please share the page URL and the user you're testing with and I'll look into it further.

    Kind regards,
    Stefan

  •  1
    Noah Johnson replied

    Thanks Stefan! 

    I really appreciate the improvements and explanations -- makes sense.

    Have a great day!

  •  2,724
    WebWizards replied

    Hi Noah,

    My pleasure, have a great day as well!

    If anything comes up or you have any other questions or issues, just let us know.

    Kind regards,
    Stefan