Picture of Handling Invalid Prices Returned by CERM (0 or 999999)

Handling Invalid Prices Returned by CERM (0 or 999999)

 

Overview

Note: This article only applies to the Connect: CERM plugin

Sometimes CERM returns 0 or an overflow value when it cannot calculate a price. By default, CERM uses 999999 (six nines) as the overflow sentinel. To handle both zero and overflow prices uniformly, we have replaced the old “Restrict zero price” boolean in the Connect: CERM settings with two new dropdown settings—one for true zeroes, one for overflow values.

  • Overflow value (default 999999): Indicates CERM could not compute a valid price.

  • 0: Indicates CERM explicitly returned zero.

When an overflow value is received, the system immediately converts it to 0. You then choose how to proceed with the now-zero price via the new settings.


2️⃣ Key Settings

Setting Dropdown Options Automatic Price Rewrite Shopper-Facing Message
Admin ➜ Configuration ➜ Plugins ➜ Connect: CERM [Configure] ➜ CERM 999999 price handling

1. Allow ordering

2. Allow ordering with warning

3. Block orders

Always rewrite the overflow sentinel to 0 before applying the chosen mode.

• Allow ordering: no message

• Allow ordering with warning: “999999 CERM price received, adjusted to 0

• Block orders: “999999 CERM price received, order blocked

Admin ➜ Configuration ➜ Plugins ➜ Connect: CERM [Configure] ➜ CERM 0 price handling

1. Allow ordering

2. Allow ordering with warning

3. Block orders

The price remains 0.

• Allow ordering: no message

• Allow ordering with warning: “0 CERM price received

• Block orders: “0 CERM price received, order blocked

Notes:

  • Both warning and error messages appear on the product page and in the cart job, and all four strings must be translatable and distinct.

 

 


3️⃣ Typical Use Cases

  1. Soft Monitoring

    • Allow all orders, but surface warnings so support can fix prices later.

  2. Strict Compliance

    • Block any item with a zero or overflow price, ensuring every order has a valid price.

  3. Mixed Policy

    • Block true zeroes (which may indicate a real error) but allow overflow prices (to confirm later).

  4. Rollout & Testing

    • Temporarily allow everything with warnings to measure how often pricing fails before tightening restrictions.


4️⃣ Step-by-Step Implementation Guide

  1. Open the settings panel

    • Go to Admin ➜ Configuration ➜ Plugins ➜ Connect: CERM [Configure].

  2. Configure zero-price behavior

    1. Find CERM 0 price handling.

    2. Choose one of the three modes:

      • Allow ordering

      • Allow ordering with warning

      • Block orders

    3. Click Save.

  3. Configure overflow-price behavior

    1. Find CERM 999999 price handling.

    2. Choose one of the three modes:

      • Allow ordering

      • Allow ordering with warning

      • Block orders

    3. Click Save.

    Important: The system will always convert the overflow value to 0 before applying this setting.

  4. Test each scenario

    Scenario Expected Result
    Allow ordering (both settings = Allow) • No message for 0 or overflow• Must allow checkout (price = 0)
    Allow ordering with warning (either setting) • Show warning text: – For zero: “0 CERM price received” – For overflow: “999999 CERM price received, adjusted to 0”• Must allow checkout
    Block orders (either setting) • Show error text: – For zero: “0 CERM price received, order blocked” – For overflow: “999999 CERM price received, order blocked”• Prevent checkout
    • Confirm that every overflow value converts to 0 before any warning or block.

    • Verify messages appear correctly on both the product page and in the cart.

  5. Amend or Translate Language Strings

    • Go to Admin ➜ Configuration ➜ Languages ➜ View String Resources

    • Search for each of the four exact phrases:

      1. 999999 CERM price received, adjusted to 0

      2. 999999 CERM price received, order blocked

      3. 0 CERM price received

      4. 0 CERM price received, order blocked

    • Amend or add translations for each.

 


By following these steps and using the new dropdowns exactly as described, your storefront can gracefully handle both zero and overflow prices returned by CERM—either allowing the sale, alerting the customer, or preventing an invalid checkout.

Incomplete