Use the {{ OptionCount }} dynamic variable to display a text string with the total count of values for a specific product option. Letting customers know there are additional choices available (such as other colors or sizes) helps improve the storefront shopping experience.
How to Use the Option Count Variable
1. Open the table editor in the Clean Table app dashboard.
2. In the Table Heading section, click Add Dynamic Data Fields.
3. Locate {{ OptionCount }} and enter the required Option Name, such as Color, Size, or Material. Then, click Select to add the dynamic field to the Table Heading.
4. Add any additional text you want to display alongside the option count. For example, you can use “sizes available” to display a heading such as “3 sizes available.”
5. Click Save and preview the table on your storefront.
Tips
On your storefront, the app will automatically replace the variable with the numerical count of the option values (for example, if a shirt has Red, Blue, and Green, it will render as "3").