
ms3RecentlyViewed
"Recently viewed products" block for MiniShop3 — browser or DB storage, similar products, manager
- MODX 3
- PHP 8.1
- miniShop3


The Dashboard tab in the Recently Viewed menu.
Labels on screen:
ms3recentlyviewed_itemsCOUNT(DISTINCT product_id)user_id, guests by session_id when that column existsA period row sits under the grid. These are separate counters, not a card tooltip.
DATE(viewed_at) = CURDATE()INTERVAL 7 DAY)INTERVAL 30 DAY)Ten products with the most rows in ms3recentlyviewed_items. The query keeps only IDs that exist in ms3_products.
KPI, top and history read ms3recentlyviewed_items. Archive appends a summary to ms3recentlyviewed_monthly and does not drop detail rows. TTL (ttl_days) removes old items, not the archive.