Blog Sections Open

Building a “Recently Viewed Products” Snippet in Evolution CMS

A recently viewed products block is one of those small features that can be built with very little infrastructure if the project keeps the state model simple.

A compact version of this pattern tracked viewed product IDs in the session and rendered them back through placeholders.

Main idea

  • store viewed resource IDs in $_SESSION
  • limit the list to a small maximum size
  • reverse the list so the newest items appear first
  • render the result through a simple item template

Why this pattern works

For a lightweight store, session-backed recent-view tracking is often enough. It avoids extra tables and still gives the storefront a familiar commerce feature.

The main caution is scope: the snippet should only track the templates that represent actual products, not every page the visitor opens.

Newer post

Formatting Price Output with parseTplChunk in Evolution CMS

How to format numeric price values before they reach a chunk by using parseTplChunk and a small normalization step in Evolution CMS.

Older post

Paginating EvoGallery Output and Opening Images with Fancybox

How to combine EvoGallery pagination with a lightbox flow such as Fancybox when one gallery page should show only a limited number of thumbnails at a time.