Blog Sections Open

Rendering AJAX Product Details from Resource Data in Evolution CMS

How to render an AJAX product detail block by reading a resource and its TV values directly through the Evolution API.

A common Evolution CMS pattern is to open a product preview or quick-view block through AJAX without rebuilding the whole page. The practical approach is to load the requested resource, normalize the fields you need, and then feed that data into a chunk.

The original implementation did exactly that: it loaded a product by ID, mapped TV values such as price, picture, delivery, and stock into flat fields, parsed a chunk, and then stripped unresolved placeholders before echoing the result.

This approach is useful because it keeps the presentation layer in a chunk while using the API as the data source. It also makes it easy to reuse the same popup or inline detail layout for multiple product cards.

The key to keeping it reliable is normalizing the data shape before the chunk render. If your TVs return arrays or differently structured values, flatten them first so the template only sees final values.

Newer post

Updating TV Values Directly Through the Database in Evolution CMS

When a direct database update of a TV value is acceptable, and what you need to remember about cache and consistency afterward.

Older post

Making FormIt and Shopkeeper Work Together on Checkout Pages

How to keep FormIt and Shopkeeper aligned on a checkout page so validation, hooks, and order submission do not fight each other.