In this example, we will use conditional logic to show different products based on a parent category. A dropdown field will determine what products may be purchased based on the current selection.
- First, set up your fields. As we will be using a dropdown to handle the display of various products, start off by creating a single dropdown, a few product fields, and a total field to display the order total. In this example, we have created 3 different options within the dropdown for Jeep, Ford, and Honda, as well as product fields such as Wrangler, Cherokee, and Mustang.
- As we want to Jeep models to show up when Jeep is selected, Ford models when Ford is selected, and Honda models when Honda is selected, we will need to enable conditional logic on each of these products. Open the options on one of your products by flicking on the field, and click on the Advanced tab.
- Within this tab, you should see a checkbox labeled Enable Conditional Logic. If you check this checkbox, the options to conditionally display or hide this field will be shown.
- On each of your products, simply enable conditional logic, and use the dropdowns to only show when your dropdown equals the desired selection. For example, for our Wrangler product, we have set it to only show if the Option field equals Jeep.