Home Forums Plugins WooCommerce Product Builder Conditional Validation: Require “Heatsink” step based on selected “CPU” attribute

Conditional Validation: Require “Heatsink” step based on selected “CPU” attribute

  • Author
    Posts
  • #253787

    Carlos B
    Participant

    Hello support team,

    I am using the WC Product Builder to create a PC Configurator. I need to implement a conditional requirement between Step 1 (CPU) and Step X (Heatsink/Fan Cooler).

    The Scenario:

    Some of my CPUs (e.g., Ryzen 5 5600G) include a stock heatsink.

    Other CPUs (e.g., Ryzen 5 5600X or “K” series) do not include a heatsink.

    The Requirement: I want to inform the user and/or force the selection of a Heatsink based on the CPU choice:

    Detection: If a CPU is selected that has an attribute like “Includes Heatsink: No”.

    Notification: Display a message in the “Heatsink” step (or a popup) saying: “The selected processor does not include a cooler. You must select one to continue.”

    Validation: Prevent the user from finishing the build if they selected a “No-Heatsink” CPU but left the Heatsink step empty.

    My Question: Is there a built-in way to handle this logic using the Depend feature or a specific Conditional Rule? If not, is there a hook or a suggested way to trigger a warning message based on the attributes of a product selected in a previous step?

You must be logged in to see replies to this topic. Click here to login or register