Added
A merchant adds a small customer-specific badge to product detail pages. The badge is derived from product data, varies by store view, and must not require a separate database query for every product during category rendering. The team wants to expose the value through the product service contract so both REST consumers and storefront code can use it. Which design best meets these requirements while keeping the customization upgrade-safe?
A product extension attribute extends the service-contract data shape without changing core tables or replacing a core implementation. Populate it at a repository boundary or through a suitable extension mechanism, and arrange loading to avoid per-product queries. A physical EAV-table change is unnecessary for a derived value and direct SQL couples presentation to storage. A theme-only JavaScript value is unavailable to REST consumers. A repository preference is a broad replacement with avoidable upgrade and compatibility risk.