Quantity Rules (Min / Max / Step) on Product Page

Version 4.5.00 of B2BKing introduces a new feature: the ability to configure quantity rules (minimum, maximum and quantity step) directly on the product page (it was previously already possible via dynamic rules):

Configuring Quantity Rules

Example:

Quantity Input on Frontend Product Page

What is Quantity Step? #

"Quantity step" refers to a required multiple, a box / carton quantity. For example if you sell a product which comes in boxes of 6, you can set this "Step" to 6, to prevent customers from purchasing different quantities. The plugin will force the quantity field to go from 6 to 12, 18, 24, etc.

How does it work? #

To configure this, simply edit any product and go to the 'B2BKing' sidebar panel, where you can enter your desired quantity values:

Quantity Rules Example

Note: There are separate rows for each group. The "regular" option applies to all users. If a group has a dedicated value, that value overrides the "regular" option for users in that group.

In the above screenshot, the minimum is 10 items, and the step is 5. This will apply to all users (b2c, logged out, b2b).

Let's look at another example:

Quantity Rules Example 2

In this example, b2c and logged out users will have a minimum of 10 items, and B2B users will have a minimum of 20 items.

When a user opens a product, the quantity is already set to the minimum.

In the case of variable products, the quantities will apply to each variation. If you need to set different values for different variations, that can be done via dynamic rules.

How can I ... ? #

B2BKing has a powerful dynamic rules system through which you can configure much more complex rules and scenarios. Here are just a few examples of what you can do with rules:

  • Set a minimum of 5 for all products, for B2B users
  • Configure minimums and discounts for each individual customer (by username)
  • Set different quantities for different variations of a product (E.g. red has a minimum of 5, blue has a minimum of 10)
  • Set a minimum order value for a category (E.g. customers must order at least $500 from the category "Clothes")
  • Set a multiple by category (e.g. products in the category "T-Shirts" must be purchased in multiples of 8)
  • Set a minimum order value total for B2B users (e.g. B2B users must order at least $1000).

Dynamic rules are very flexible. The purpose of the feature described in this article (quantity rules on product pages) is to help configure these quantities faster and easier, without needing to set up and manage rules.

Configuring min / max / step via CSV imports #

An advantage and opportunity this feature introduces is the ability to now set a unique minimum or step for each product, directly by modifying that product's meta data, or using the WooCommerce importer.

If you go to Products -> Import, you can now find additional import options under "Quantity Rules":

Import Step, Min, Max Quantities via the WooCommerce Importer

You can use this to configure a CSV file of products and quantities and then import it.

Or if you are a developer and you prefer to edit the meta data directly, here are the meta keys you need to set:

  • b2bking_quantity_product_min_b2c (for 'regular' fields)
  • b2bking_quantity_product_max_b2c
  • b2bking_quantity_product_step_b2c
  • b2bking_quantity_product_min_1234 (for the group with ID 1234)
  • b2bking_quantity_product_max_1234
  • b2bking_quantity_product_step_1234

Disabling / enabling this feature completely #

If you need to enable or disable this feature, for example to test performance impact or resolve conflicts, you can do this via B2BKing -> Settings -> Other -> Components -> "Disable min / max / step on product page".

Powered by BetterDocs