Okay
  Public Ticket #4513148
I’ve run into an issue with the Sale badge and price display when discounts are applied via Dynamic Rules.
Open

Comments

  •  2
    Vladislav started the conversation

    When I set product discounts through B2BKing Dynamic Rules, the Sale badge and discounted price are shown correctly on simple products.
    However, for variable products (products with attributes like different sizes/volumes), the shop/archive card does not show the discount — it either shows the regular price or just the “SALE” badge inconsistently. Only products without any attributes display the discount as expected.

    Steps to reproduce
    1. Create a variable product with multiple attributes (e.g., sizes).

    2. Create a Dynamic Rule (e.g., Discount % or Set Price) targeting that product or its category for a B2B group.

    3. View the product in the shop / archive grid.

    4. Compare with a simple product affected by the same rule.

    Expected behavior
    • The discounted price and Sale badge should be visible on the archive card for variable products (same as for simple products), using the rule-adjusted price for the default/lowest-price variation.

    Actual behavior
    • On variable products:

      • The Sale badge sometimes appears but the discounted price doesn’t.

      • In other cases, neither the badge nor the discounted price appears in the archive; the discount is visible only on the single product page after selecting a variation.

    • On simple products: both the badge and discounted price display correctly.

    Notes / Environment
    • Theme: Woodmart

    • Cache: WP Rocket (logged-in user cache disabled)

    • WooCommerce + B2BKing Pro (latest versions)

    • Issue occurs for products with multiple attributes (e.g., different sizes/quantities).

    Questions
    1. Is there a known limitation for showing Dynamic Rule discounts on variable products in the archive loop?

    2. Is there a recommended hook/filter to force the archive card to use the rule-adjusted variation price (e.g., default variation) so the Sale badge and price render correctly?

    3. If there’s a snippet or setting to enable “calculate sale for variable products in loop”, could you share it?

    I can provide product IDs or a staging login if needed.

    Attached files:  Ekrano kopija 2025-11-05 133716.png