Skip to content

Product Tags & Tag Pages

Flow ID: CF-18 | Module(s): eshop | Complexity: Medium

Business Overview

Product tags organize products into curated collections independent of the category tree. Two-level hierarchy: tag categories (e.g., "Material") → tag values (e.g., "Cotton", "Polyester"). Customers browse tag pages to find products matching specific attributes.

Key business behaviors:

  • Hierarchical: tag categories → tags → products (many-to-many)
  • Language-scoped slugs, names, content
  • Cached via PSCache for performance
  • Used in category sidebar filtering (CF-01) and coupon targeting (CF-13)
  • Route toggle: enable_tag_page_routes registry key

API Reference

REST Endpoints

MethodPathAuthDescription
GET/rest/product/tagGuestList tags
GET/rest/product/tag-categoryGuestList tag categories

Legacy Storefront

URLControllerMethod
/tag/{category-slug}Adv_product_tags.phptag_cat($slug)
/tag/{category}/{tag}sametag($catSlug, $tagSlug)

Code Flow

Category listing (tag_cat): Category lookup → load sub-tags → SEO/breadcrumbs → render grid

Tag products (tag): Category + tag lookup → product query via shop_product_product_tags join → enrichment → render


Domain Layer

ComponentPath
Tag Servicesrc/Domains/Product/Tag/Tag/Service.php
Category Servicesrc/Domains/Product/Tag/Category/Service.php
REST Controllerssrc/Rest/Product/Controllers/Tag.php, TagCategory.php

Client Extension Points

  • View templates: {client_views}/tag/
  • Controller override: Custom filtering in Adv_product_tags.php
  • Route toggle: enable_tag_page_routes registry

Data Model

TablePurpose
shop_product_tag_categories / _muiTag category hierarchy
shop_product_tags / _muiIndividual tags
shop_product_product_tagsProduct-tag junction