Public Ticket #4537701

Possible bug: “Buy X Get 1 Free” rule ignores minimum cart quantity condition (tiered freebies)

Closed
Comments
1 Ticket
Giovanni Ragazzi Ragazzi started the conversation 8 months ago on January 27, 2026 at 11:57am

Hello B2BKing Support,

I’m using B2BKing v5.4.70 and I need to configure a tiered “free items” logic for a B2B user group.

Goal (tiered logic)

We need this exact outcome based on total quantity in cart (same eligible products):

  • 7 items in cart → 1 item free (we call it “pay 6 get 1 free”)

  • 13 items in cart → 2 items free (we call it “pay 11 get 2 free”)

  • 18 items in cart → 3 items free (we call it “pay 15 get 3 free”)

(Our wording is just internal; the final result is “1 free every 7”, “2 free every 13”, “3 free every 18”.)

Current setup

All rules apply to the same scope:

  • User group: “B2B – Contratto”

  • Applies to: all products excluding our “Profession” selection (same products for all tiers)

Rule A: “Buy X Get 1 Free” with X = 6.5
This rule works as expected for the first two tiers (7 → 1 free, 13 → 2 free).

Rule B: “Buy X Get 1 Free” with X = 6
To make it apply only for the third tier, I added an additional condition (minimum quantity), e.g.

  • condition: Product quantity > 17 (or cart quantity >= 18)
    so that the “X = 6” rule should start only from 18 items, giving 3 free items.

Issue / suspected bug

Rule B seems to ignore the minimum quantity condition:
it gets applied even when cart quantity is below the threshold (e.g., in the 7 and 13 item cases), and it overrides / conflicts with Rule A.

Expected behavior
  • For 7 and 13 items: only Rule A should apply

  • For 18+ items: Rule B should apply (or at least Rule B should not trigger before the threshold)

Actual behavior

Rule B triggers even below the threshold, as if the minimum quantity condition is not being evaluated.

I can provide screenshots of the rule configurations (attached).

Could you please confirm:

  1. If this is a known issue/bug with “Buy X Get 1 Free” + minimum quantity conditions, and/or

  2. The correct way to implement this tiered structure (including how rule priority should be set to avoid the higher-tier rule triggering early)?

Thank you.

2,762
KingsPlugins replied 8 months ago on January 27, 2026 at 3:49pm

Hi Giovanni,

Thank you for purchasing our plugin,

 

To help me guide you to the best solution for this setup, could you please clarify a few details?

1. You mentioned this applies based on the "total quantity in cart". Is that the actual total of all products in the cart, or is it the total quantity of the specific eligible products (all products excluding the "Profession" selection)?

2. If this is based on the total quantity of multiple different products, how should the system determine which items are free?
For example, if a customer has 4 of Item X and 4 of Item Y in the cart (Total 8), which of the items should be free? Do the items have the same price? This is important because it's not clear how large the discount needs to be if the items have different prices.

3. Regarding how this scales at higher quantities:
- At 25 items in the cart, should the user get 4 free (18 items -> 3 free, plus another 7 items -> 1 free, totaling 4)?
- At 31 items in the cart, should they get 5 free, and so on?

 

Once you clarify these points, I can provide more specific guidance on how to configure this.

Kind regards,
Stefan

1 Ticket
Giovanni Ragazzi Ragazzi replied 8 months ago on January 27, 2026 at 4:37pm

Hi Stefan,

thanks for your questions — here is the clarification in the simplest possible way.

1) What “quantity” means for us

The rule must be calculated on the quantity of each single product (same SKU), not on the total quantity of all products in the cart.

Example: if a customer buys 8 units of Product A and 8 units of Product B, the logic must be applied separately:

  • Product A = 8 units (eligible for its own freebies)
  • Product B = 8 units (eligible for its own freebies)

It must NOT treat this as “16 items in cart”.

2) Which items are free

The free items must always be the same product (same SKU) that reaches the threshold.

3) How it scales at higher quantities

We have three “tiers”, based on total units of the same SKU in one order:

  • 7 total units → 1 free (our internal name: “6+1”)
  • 13 total units → 2 free (our internal name: “11+2”)
  • 18 total units → 3 free (our internal name: “15+3”)

Above 18 units, it continues proportionally:

  • 24 total units → 4 free
  • 30 total units → 5 free …etc.

(So yes: at 25 units we expect 4 free, at 31 units we expect 5 free, and so on — always per SKU.)

4) About the “minimum quantity” condition shown in the screenshots

In the screenshots you may see “minimum/cart quantity” style condition fields filled with default values. For the first two rules, we noticed the setup still works even if those minimum fields are left as default / not actively used.

Our real need is simply:

  • per-product quantity (same SKU), not cart total
  • the three thresholds above (7 / 13 / 18 total units)

Kind regards, Giovanni

1 Ticket
Giovanni Ragazzi Ragazzi replied 8 months ago on January 29, 2026 at 3:12pm

Hi Stephan,

the real issue is that the minimum quantity condition is not being enforced.

Even though the rule has a minimum threshold of 17 (see the condition in the rule settings), the system still applies the Buy X Get 1 Free discount starting from 6 units of the same product (same SKU), as soon as that single product quantity reaches 6 — regardless of the “min 17” condition.

So in practice the rule is validated with 6 identical items (same SKU), instead of only triggering when the product quantity for that same SKU meets the minimum 17 threshold.

Can you please check why the rule conditions (minimum quantity) are ignored during validation/application of the discount?







1 Ticket
Giovanni Ragazzi Ragazzi replied 8 months ago on January 30, 2026 at 4:24pm

Sorry to insist Stefan,
I have a presentation of the project on monday and it would help a lot if I succeed in making everything work.
Is the fix available?
Looking forward to your reply.
Best regards

Sign In