
- MODX 3
- PHP 8.1
- miniShop3


"Recently viewed products" block for MiniShop3. The list lives in the browser (localStorage or cookie) or in the DB for logged-in users. It fills when a user opens a product page.
Naming: user-facing — ms3RecentlyViewed. In code (folders, snippets, lexicon) — ms3recentlyviewed.
render()), server snippet with fromDB, or ids from placeholder / cookie. See Quick start.localStorage (default) or cookie, no registrationlocalStorage or cookie) is sent to the DB. The tab then stores sessionStorage key ms3rv_synced_userarchive_enabled (on by default): summary in ms3recentlyviewed_monthly without deleting items rowsblock_bots + block_bots_detector (crawler_detect — CrawlerDetect library, or regex as fallback)OnWebPageInit, priority -5). Always sets [[+viewedIds]]. The value comes from cookie ms3_recently_viewed when storage_type is cookie. Otherwise the placeholder is empty. In Fenom: {$_modx->getPlaceholder('viewedIds')}. The plugin does not create a Fenom variable.ms3recentlyviewedSimilar)ms3rvLexiconScriptms3rv). Storefront cards use Bootstrap classes, not --ms3rv-* variables| Requirement | Version |
|---|---|
| MODX Revolution | 3.0.3+ |
| PHP | 8.1+ |
@FILE chunksrequires. The check looks for Import Map keys vue and vuetools/theme. If they are missing, the modules are removed and the alert ms3rv_vuetools_required is shownOn upgrade, saved system setting values are kept. Snippets, plugins and chunks are overwritten.
msProducts and parents
In MODX 3 the msProducts snippet requires the parents parameter even when using resources. The add-on supplies it when calling msProducts for the viewed list.
Load lexicon, CSS and JS. On the product page pass the ID and output the block. Quick start, Frontend setup.
In the manager the menu item is Recently Viewed (parent Extras). The page heading is the same. The child item is Settings.
| Term | Description |
|---|---|
| Viewed | List of product IDs the user has opened (in browser or DB) |
| Sync | Moving the list from the current browser store to the DB after login |
| Similar to viewed | Products from the same categories as viewed (snippet ms3recentlyviewedSimilar) |