Public Ticket #4505291

Enable add to cart for items out of stock for B2B users

Closed
Comments
4 Tickets 1
DIREZIONE 22 started the conversation 12 months ago on October 13, 2025 at 6:15pm

We need to make it possible for B2B users to order products even if the stock quantity is 0. For non-registered users, the “Add to Cart” button must remain disabled. Additionally, when the stock quantity is 0, B2B users must order at least three units of that product or variation.
Is there a way to achieve this with B2BKing? Can you help us?

2,762
KingsPlugins replied 12 months ago on October 16, 2025 at 1:08am

Hi there,

Thanks for reaching out.

For allowing B2B users to order out-of-stock products, you can enable this in B2BKing → Settings → Other -> Stock -> "Always in stock for B2B", which will allow B2B users to order anything regardless of stock levels.

For the minimum quantity of 3 when items are out of stock, I don't have a built-in setting for this specific scenario, but I tried writing a code snippet for it:

https://pastecode.io/s/c5ob143o

 

This snippet works based on stock status and should set a minimum quantity of 3 for B2B users when products are out of stock or on backorder. You can add this to your theme's functions.php file or use any code snippets plugin.

This snippet is a bit experimental, so please test it and let me know if you run into any issues!

 

Kind regards,
Stefan

Sign In