Skip to content
ms3Favorites
ms3Favorites
Wishlists for MiniShop3 and other resources — browser storage, DB sync
  1. Extras
  2. ms3Favorites
  3. Snippets
  4. ms3fLexiconScript

Snippet ms3fLexiconScript

Adds a script with lexicon and frontend config to the page. window.ms3fLexicon and window.ms3fConfig get site language, maxItems, storageType, connectorUrl, etc.

Load before favorites.js so the JS uses the correct strings and limit.

Uses Fenom chunk tplMs3fLexiconScript.

Parameters

ParameterDescriptionDefault
cultureKeyLexicon language (ru, en)from context or cultureKey
resource_typeDefault resource typeproducts

maxItems and storageType come from system settings ms3favorites.max_items, ms3favorites.storage_type.

Usage

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

If not loaded, favorites.js falls back to Russian strings. For a multilingual site the lexicon is required.

Keys in window.ms3fLexicon

KeyDescription
emptyEmpty list
addedAdded to favorites
removedRemoved from favorites
add_tooltipAdd tooltip
remove_tooltipRemove tooltip
list_default, list_gifts, list_plansList names
share_title, share_copy_link, share_successSharing
add_to_cart, add_selectedCart
comment_placeholder, comment_updatedNotes

Keys in window.ms3fConfig

KeyDescription
maxItemsMax items in list
storageTypelocalStorage or cookie
cultureKeyLanguage
maxListsMax number of lists
resourceTypeResource type
connectorUrlConnector URL
commentsEnabledWhether item notes are enabled