VOOZH about

URL: https://deepwiki.com/MahoCommerce/maho/6.3-product-display

⇱ Product Display | MahoCommerce/maho | DeepWiki


Loading...
Last indexed: 15 May 2026 (ea8ab8)
Menu

Product Display

Purpose and Scope

This document covers the product display system in Maho's frontend, including product list templates (grid and list views), individual product view pages, configurable product selections, and interactive components like toolbars and pagination. It focuses on the rendering logic, JavaScript interactivity for product options, and the data flow from the Mage_Catalog blocks to the frontend templates.

Maho modernizes the frontend experience by introducing asynchronous "Add to Cart" functionality via mahoFetch and a native off-canvas minicart integration.

Product Listing Display

Product listings are rendered through the Mage_Catalog_Block_Product_List block, which supports two display modes: grid and list. The display mode is controlled by the toolbar and can be toggled by users based on configuration.

Display Modes and Configuration

The default display behavior is governed by system configuration in the catalog/frontend path.

Config FieldPathPurpose
List Modecatalog/frontend/list_modeDetermines if grid, list, or both are available.
Grid Products Per Pagecatalog/frontend/grid_per_pageDefault pagination limit for grid view.
List Products Per Pagecatalog/frontend/list_per_pageDefault pagination limit for list view.
Enable Add to Cartcatalog/frontend/enable_addtocart_in_product_listingsToggles the buy button in listings app/design/frontend/base/default/template/catalog/product/list.phtml71

Product List Template Structure

The product list template handles both grid and list modes within a single file using conditional logic. It integrates Maho's customFormSubmit utility for handling "Add to Cart", "Wishlist", and "Compare" actions via POST requests to prevent CSRF issues and simplify form handling.

Natural Language to Code Entity Space: Product Listing


Sources: app/design/frontend/base/default/template/catalog/product/list.phtml12-110

Key elements rendered for each product:

Toolbar and Pagination

The toolbar (Mage_Catalog_Block_Product_List_Toolbar) manages the presentation state of the product collection, including sorting, view modes, and limiters.

Toolbar Component Logic

The toolbar provides an off-canvas trigger for layered navigation (filters) on mobile devices using data-offcanvas-target=".block-layered-nav" app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml16


Sources: app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml12-88

Pagination Implementation

The pager template (page/html/pager.phtml) handles the actual "Page X of Y" logic and jump links. It supports:

Sources: app/design/frontend/base/default/template/page/html/pager.phtml1-112

Product Options and Configurable Selection

Individual product pages often require user input (custom options) or selection (configurable attributes). These are managed via a robust JavaScript architecture.

Configurable Product Logic

Configurable products use the Product.Config class to manage relationships between attributes like Color and Size. This class is initialized with product configuration data, including prices and tax settings public/js/varien/product.js13-21

Custom Options

Custom options (text, select, date, file) are handled by Product.Options public/js/varien/product_options.js13 This class iterates through all custom option elements on the page and updates prices based on user selections public/js/varien/product_options.js24-91

Natural Language to Code Entity Space: Configurable Selection


Sources:

Widgets and Specialized Views

Maho includes several widgets for displaying products in specific contexts, such as "New Products" or "Recently Viewed".

Sources: app/design/frontend/base/default/template/catalog/product/widget/new/content/new_grid.phtml1-85

Image Processing Pipeline

Maho utilizes the catalog/image helper for dynamic resizing and caching of product images.

FeatureImplementationSource
Resizinginit($product, 'small_image')->resize(300)app/design/frontend/base/default/template/catalog/product/list.phtml41
Retina Supportsrcset with 2x multiplierapp/design/frontend/base/default/template/catalog/product/list.phtml42
Composite PricingMage_Catalog_Helper_Product_Type_CompositePrepares prices for JS consumption app/code/core/Mage/Catalog/Helper/Product/Type/Composite.php13-33

Sources: app/design/frontend/base/default/template/catalog/product/list.phtml41-43 app/code/core/Mage/Catalog/Helper/Product/Type/Composite.php13-127