Real-Life Examples
This section is written as implementation guidance for developers working on real storefront projects with YuiCraftPlugin. Each page focuses on decisions you actually make in delivery work: where to place logic, how to structure templates, and how to keep performance and maintainability under control.
Use these pages as practical references while building features, reviewing code, or preparing production optimizations.
How to Use This Section
- Start with the page that matches the feature you are implementing.
- Apply the structural rules first (layout/page/component/block ownership).
- Use the included snippets as patterns, not copy-paste defaults.
- Validate behavior on cart, checkout, and customer account flows after each change.
Example Library
Product Details
Product page architecture, add-to-cart form contract, and price helper usage.
Product Listing
Listing query patterns with filtering, eager loading, pagination, and cache boundaries.
Newsletter Form
Subscription form contract, validation requirements, and production-safe integration steps.
Query Optimization
How to prevent N+1 queries, limit query scope, and keep Twig rendering fast.
Caching Strategies
Template/fragment/data caching patterns, invalidation strategy, and CSRF-safe caching.
Advanced Optimization
Critical CSS, asset strategy, and practical production-level frontend performance workflow.