Options
Fast Simon PLP support customization options via JS variable object __fast_options
.
Available Options
Option | Description | Type |
---|---|---|
"with_product_attributes" | Include product attributes | boolean |
"full_product_url_path_redirect" | Full path redirect (collections/collectionName/products/productName) just for Shopify | boolean |
"color_attribute_names" | All the possible color property names | string[] |
"relatedCollectionsConfiguration" | A dictionary of 'collection id' -> [array of related collections ids] | Record<string, string[]> |
"url_parameters_to_keep" | Keep all the URL param names in the given array | string[] |
"disable_selected_filters_promote" | Disable selected filters promote | boolean |
"disable_shadow_root" | Disable Shadow DOM | boolean |
"serp_media_queries" | Change screen breakpoints | {device: string, query: string}[] |
"default_value_for_hide_filters_button" | Filters default display | boolean |
"disable_auto_close_filters_when_click_outside" | Disable auto close for clicking outside the Filters | boolean |
"parse_sub_category_tag_filter" | parseing sub category tag filter just in Shopify | (name: string) => string; |
"custom_top_scroll_selector" | Custom top scroll selector | String |
"modern_mobile_filters_animation" | Set animation for modern monile filters | AnimationOptions |
"apply_narrow_manually" | Apply narrow manually | boolean |
"size_attribute_names" | Set size attribute names | String[] |
"spa_disable_auto_close_mobile_menu" | Disable auto close mobile menu | boolean |
"spa_dynamic_sections" | Dynamic sections to be changed during SPA | Record<string, 'before' |
"before_spa_navigation_callback" | Before function for SPA | (event?: Event) => void |
"after_spa_navigation_callback" | After function for SPA | (event?: Event) => void |
"custom_missing_product_img" | Custom missing product images | String |
"get_selected_variant" | Get product data by variant | (productId: string) => {variant_id:string,image_url:string,sku:string, product_title:string,product_url:string,title:string, main_att:string,price:string,compare_price:string} / undefined |
"add_current_product_as_first_variant" | Adding product with first variant_id | boolean |
"swatch_width" | Set width of swatches | Number |
"pagination_querystring_parameter" | Set pagination parameter | String |
"disable_auto_collapsed_filters" | Disable collapsed filters (just for filter layout=collapsed) | boolean |
"category_filter_as_regular_facet" | Set category filter as regular facet | boolean |
"variant_size_custom_sort_order" | Set variant size custom sort order (all sizes must be lower case) | String[] |
"list_view_default_value" | Set list grid view as default | boolean |
How to add custom options:
Add the __fast_options variable to your HTML head within a script tag, for example:
<script>
var __fast_options = __fast_options || {};
__fast_options.with_product_attributes = true;
__fast_options.relatedCollectionsConfiguration = {
'collectionId1': ['relatedCollectionId1', 'relatedCollectionId2', 'relatedCollectionId3'],
'collectionId2': ['relatedCollectionId4', 'relatedCollectionId5', 'relatedCollectionId6'],
'collectionId3': ['relatedCollectionId1', 'relatedCollectionId2', 'relatedCollectionId4']
};
__fast_options.serp_media_queries=[
{device: 'mobile', query: '(max-width: 480px)'},
{device: 'tablet', query: '(min-width: 481px) and (max-width: 820px)'},
{device: 'desktop', query: '(min-width: 821px)'}
];
__fast_options.variant_size_custom_sort_order = ['one size', 'xs', 'small', 'medium', 'large', 'xl', '4x',
'5x', '6x', '0', '1', '1x', '1x (16-18)', '2', '2x', '2x (18-20)', '3', '3x', '3x (22)', '5', '5.5', '6',
'6.5', '7', '7.5', '8', '8.5', '9', '10', '11', '13', '13/14', '15', '15/16','34b','34c','34d','34dd (e)',
'34dd(e)','34ddd (f)','36c','36d','36dd (e)','36ddd (f)','38c','38d','38dd','38dd (e)','38ddd','38ddd (f)',
'40c','40d','40dd','40dd (e)','40ddd','40ddd (f)','40g','42d','42dd (e)','42ddd','42ddd (f)','42g','44c',
'44d','44dd (e)','44ddd','44ddd (f)','44f','44g','46d','46dd (e)','46ddd','46ddd (f)','46f','46g'];
</script>