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

Snippet ms3FavoritesCounter

Outputs the number of items in favorites. Used in header, menu, or Favorites icon.

Parameters

ParameterDescriptionDefault
idID of page where the list is shown (optional)
listList (default); empty or all — total across all listsdefault
resource_typeResource type: products, resourcesproducts
tplChunktplMs3fCounter

Chunk placeholders

PlaceholderDescription
[[+ms3f_count]]Item count
[[+ms3f_page_id]]Page ID (if passed)

Examples

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

Total across all lists:

modx
[[!ms3FavoritesCounter? &list=`all`]]
fenom
{'!ms3FavoritesCounter' | snippet : ['list' => 'all']}

Alternative — client-side counter:

html
<span data-favorites-count style="display: none;">0</span>

JS will set the value on load (1–99 or 99+); the element is hidden when zero.