Window Nimstrata Properties
window.Nimstrata is the storefront configuration object read by Nimstrata App Block JavaScript.
For normal Online Store 2.0 installs, Shopify Liquid App Blocks create the required values from app settings, Shopify localization data, and app metafields. Add custom window.Nimstrata properties only for a manual Online Store 1.0 install or a bespoke theme integration that cannot be configured in the Retail Cloud Connect Shopify App.
Define any manual values before loading the Nimstrata storefront bundle.
Property Reference
Manual Search Example
<script>
window.Nimstrata = window.Nimstrata || {};
window.Nimstrata.search = window.Nimstrata.search || {};
window.Nimstrata.search.defaultFilters = [
{
field: 'attributes.available_in_market',
value: ['GB'],
type: 'string',
},
];
window.Nimstrata.search.customFilters = [
{
name: 'in_stock',
displayName: 'In stock',
displayComponent: 'switch',
displayLocation: 'toolbar',
filter: {
field: 'availability',
value: ['IN_STOCK'],
type: 'string',
},
},
];
</script>
Manual Translation Example
Use this only for manual installs that cannot use the Retail Cloud Connect Shopify App Translations page.
window.Nimstrata = window.Nimstrata || {};
window.Nimstrata.translations = window.Nimstrata.translations || {};
window.Nimstrata.translations.default = {
'search.placeholder': 'Search',
'toolbar.refine_filters': 'Refine Filters',
brands: 'Brand',
};
window.Nimstrata.translations.filters = {
sizes: {
sizes: 'Size',
Small: 'Small',
Medium: 'Medium',
Large: 'Large',
},
};
Manual Recommendation Example
window.Nimstrata = window.Nimstrata || {};
window.Nimstrata.recs = window.Nimstrata.recs || {};
window.Nimstrata.recs.defaultFilters = [
{
field: 'attributes.available_in_market',
value: ['GB'],
type: 'string',
},
];
When no availability filter is provided, recommendations add { field: 'availability', value: ['IN_STOCK'], type: 'string' } automatically.
Safer Alternatives
Before adding custom JavaScript, check whether the app already covers the need:
- Use Translations for App Block copy and filter labels.
- Use App Block Filters for normal storefront facets.
- Use Layout Settings for filter layout, quick filters, counts, search-within-filters, sort placement, and product-card link behavior.
- Use Custom and Default Filters for hidden filters or visible custom switches.