Skip to main content

Overview

The Product Catalog extension enhances the standard product display with specialized information for supplement products. It provides a structured way to display ingredients, benefits, dosage, warnings, and storage information.

Features

  • Supplement-specific data fields
  • Structured information display
  • GraphQL schema extensions
  • Brand-styled components

Use Cases

  • Health supplements
  • Vitamins and minerals
  • Sports nutrition
  • Dietary supplements

Supplement Information Component

The main component displays comprehensive product information in a structured format at extensions/productCatalog/src/pages/frontStore/productView/SupplementInfo.tsx:
SupplementInfo.tsx

Data Structure

The supplement information is stored in the product’s extension data:

GraphQL Schema Extension

The extension adds a ProductExtension type to the GraphQL schema at extensions/productCatalog/src/graphql/types/ProductExtension/ProductExtension.graphql:
ProductExtension.graphql
The resolver is implemented in ProductExtension.resolvers.js:
ProductExtension.resolvers.js

Information Sections

The component displays up to 7 sections of supplement information:
Lists the active and inactive ingredients in the supplement. This helps customers:
  • Identify allergens
  • Verify ingredient quality
  • Check for specific compounds
  • Compare with other products
Displays health benefits as a bulleted list. Common benefits include:
  • “Mejora la energía y resistencia”
  • “Apoya la salud muscular”
  • “Fortalece el sistema inmunológico”
  • “Promueve la recuperación post-entrenamiento”
Describes the product format:
  • “60 cápsulas vegetales”
  • “500g de polvo”
  • “30 sobres individuales”
  • “120 tabletas”
Important safety information:
  • “No exceder la dosis recomendada”
  • “Consultar con un médico si está embarazada”
  • “Mantener fuera del alcance de los niños”
  • “No sustituye una dieta equilibrada”
Storage instructions to maintain product quality:
  • “Conservar en lugar fresco y seco”
  • “Mantener alejado de la luz solar directa”
  • “Cerrar bien después de cada uso”
Additional product description with HTML support for rich formatting.

Component Features

Conditional Rendering

The component intelligently handles missing data:
  • Returns null if no supplement data or description exists
  • Shows only sections with available data
  • Gracefully degrades when optional fields are missing

GraphQL Data Fetching

Uses the query export to fetch product data:

Layout Configuration

Registered in the product page with:
This places the component in the middle-right area of product pages, with priority 10.

Styling

The component uses Ana’s Suplements brand colors:

Extension Structure

Configuration

Enabled in config/default.json:

Best Practices

Complete Information: Always provide complete supplement information to help customers make informed decisions and comply with regulations.
Regulatory Compliance: Ensure all claims and warnings comply with local health supplement regulations.
Localization: All labels are in Spanish. Update the component for other languages if needed.

Next Steps

Product Reviews

Add customer reviews to products

GraphQL API

Learn about extending GraphQL schemas