If you need to filter product variants by age ranges in your outcome quizzes, you can install App 585, Filter Products Variants By Range on Outcome Quizzes. This app allows you to filter product variants based on a user’s input and display the relevant variants accordingly. The filtering is configured using metadata on the Thank You (thx) page and the form elements.
Steps to Use:
- Set Up Metadata on the Thank You Page:
- On the Thank You (thx) page, add metadata in the format filter:FIELD_NAME:RANGE and define the to define the VALUES of the variants name as filtering criteria.
- FIELD_NAME: The field you’re filtering (e.g., age).
- RANGE: A range of values for filtering (e.g., 18-25).
- VALUES: The product variants that should be displayed when the filtering criteria are met (e.g., teen,young).
Example:
- filter:age:18-25=teen,young will display the variants teen and young when the user selects an age between 18 and 25.
- On the Thank You (thx) page, add metadata in the format filter:FIELD_NAME:RANGE and define the to define the VALUES of the variants name as filtering criteria.
- Add Metadata on Form Elements:
- On the forms, where users input their age for instance, add the filterFieldName Metadata to the relevant form element. This metadata will collect the user’s input to be used for filtering.
Example:
- If you are filtering by age, add the filterFieldName metadata to the age input field in the form.
- Configuring Filters:
- Based on user input (e.g., their age), the app will filter product variants using the metadata defined on the Thank You page. The app compares the selected values against the filter criteria and applies the appropriate product filters.
Example:
- If the user enters an age of 22, and your metadata defines filter:age:18;25=teen,young, only the teen and young product variants will be displayed
Examples:
- Filter by Age:
- On the Thank You page, add the following metadata:
filter:age:0-17=kids
filter:age:18-25=teen,young
filter:age:26-35=adult
filter:age:36-50=middle_aged - This filter will display kids products for users between 0 and 17, teen and young products for users between the ages of 18 and 25, adult products for ages 26-35, and middle_aged products for ages 36-50.
- On the Thank You page, add the following metadata:
- Form Element:
- On the form page where the user inputs their age, add the following metadata to the age input field:
filterFieldName=age - This will collect the user’s age to be used for filtering on the Thank You page.
- On the form page where the user inputs their age, add the following metadata to the age input field:
Once the app is installed and configured, it will automatically filter and display the correct product variants based on the user’s age input, creating a personalized product experience.
If you need further assistance, feel free to contact us at support@digioh.com!