Skip to content
ms3RecentlyViewed
ms3RecentlyViewed
"Recently viewed products" block for MiniShop3 — browser or DB storage, similar products, manager
  • MODX 3
  • PHP 8.1
  • miniShop3
  1. Extras
  2. ms3RecentlyViewed
  3. Snippets
  4. ms3rvLexiconScript

Snippet ms3rvLexiconScript ​

Adds a script with lexicon and config: window.ms3rvLexicon and window.ms3rvConfig.

Include before the viewed.js script so the JS uses the correct strings and limit.

Parameters ​

Optional cultureKey: lexicon language. Empty = context cultureKey, then site cultureKey, then en.

ms3rvConfig keys: maxItems, storageType, cultureKey, isAuthenticated, userId.

Usage ​

fenom
{'ms3rvLexiconScript' | snippet}
modx
[[!ms3rvLexiconScript]]

If not included, viewed.js falls back to default (Russian) phrases. For a multilingual site, outputting the lexicon is required.

Lexicon keys (namespace ms3recentlyviewed): ms3recentlyviewed_empty, ms3recentlyviewed_item_title, and others.