Visual Discovery Configuration Options
Configure the Visual Discovery widget by setting options on window.__fast_options before the widget loads.
Configuration Structure
Options are set globally on the window object and merged into the widget configuration:
window.__fast_options = {
// Button customization
discovery_button_text: "Find Similar",
similar_styles_button_text: "Shop Similar",
similar_styles_button_color: "#000000",
visual_discovery_button_color: "#000000",
// Swatch configuration
display_swatches_feature: true,
hide_oos_swatches: true,
color_attribute_names: ["Color", "colour"],
swatch_width: 32,
swatch_visibility_threshold: 0,
// Mobile features
display_add_to_cart_mobile: false,
// Filter customization
visualAttributesFilter: ["Color group", "Brand"],
visualVariantsFiltersExcluded: ["Color"]
};
Available Options
Button Customization
| Option | Type | Default | Description |
|---|---|---|---|
discovery_button_text | string | - | Text displayed on the Visual Discovery button |
similar_styles_button_text | string | "Shop Similar" | Text displayed on the Similar Styles button |
similar_styles_button_color | string | "black" | Color of the Similar Styles button (hex, rgb, or CSS color name) |
visual_discovery_button_color | string | "black" | Color of the Visual Discovery button (hex, rgb, or CSS color name) |
Swatch Options
| Option | Type | Default | Description |
|---|---|---|---|
display_swatches_feature | boolean | false | Enable/disable color swatches on product cards |
hide_oos_swatches | boolean | false | Hide out-of-stock color variants from swatches |
color_attribute_names | string[] | ["Color"] | Custom color attribute names to recognize (e.g., ["Color", "colour", "Couleur"]) |
swatch_width | number | - | Width of swatch elements in pixels |
swatch_visibility_threshold | number | 0 | Minimum number of colors required to show swatches (0 = always show if feature enabled) |
Mobile Features
| Option | Type | Default | Description |
|---|---|---|---|
display_add_to_cart_mobile | boolean | false | Show Add to Cart button on mobile devices |
Filter Options
| Option | Type | Default | Description |
|---|---|---|---|
visualAttributesFilter | string[] | [] | Product attribute names to use as filters (e.g., ["Color group", "Brand", "Material"]) - these are product-level attributes, not variant attributes |
visualVariantsFiltersExcluded | string[] | [] | Variant filter names to exclude from display (e.g., ["Color", "Size"]) - useful when replacing with attribute filters |