Okay
  Public Ticket #4505291
Enable add to cart for items out of stock for B2B users
Open

Comments

  •  1
    DIREZIONE started the conversation

    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,543
    WebWizards replied

    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