use-catalog-and-product-read-flows

Read region-aware storefront data for products, catalogs, categories, collections, and regions.

2|Updated Dec 2, 2024
One-click install
npx skills add https://github.com/TechsioCZ/new-engine --skill use-catalog-and-product-read-flows
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-catalog-and-product-read-flows
Source: https://github.com/TechsioCZ/new-engine/tree/main/libs/storefront-data/skills/use-catalog-and-product-read-flows
Command: npx skills add https://github.com/TechsioCZ/new-engine --skill use-catalog-and-product-read-flows

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables developers to read and query storefront data through region-aware hooks, ensuring consistent inputs for products, catalogs, categories, collections, and regions.

Core Features & Use Cases

  • Region-aware read hooks for products, catalog, collections, categories, and regions.
  • Centralized query-option helpers and suspense support to wait for required params.
  • Quick integration in Next.js apps using the storefront-data library adapters.

Quick Start

Call the storefront read hooks to fetch region-aware data for products and catalogs.

Frequently Asked Questions about use-catalog-and-product-read-flows

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read region-aware storefront data for products and catalogs in Next.js?

Storefront data hooks provide region-aware reads for products and catalogs by validating required params before fetching. They integrate into Next.js apps using shared medusa-service adapters to render region-based catalog views.

Can I use suspense to wait for required region parameters before fetching products?

Yes, suspense-friendly patterns are supported to wait for required region parameters before fetching products. The hooks ensure necessary inputs exist so storefront reads for catalogs and categories execute consistently.

What is the best way to render region-based catalog views and category listings?

Region-aware read hooks connected to shared medusa-service adapters provide the best way to render region-based catalog views. They ensure consistent inputs for querying products, categories, and collections.

Do I need Next.js to implement region-aware reads for storefront data?

Next.js is the primary framework targeted for quick integration using storefront-data library adapters. The region-aware hooks enable rendering storefront data like product grids and category listings within this ecosystem.

Why does my storefront query fail when fetching products across different regions?

Storefront queries fail when required region parameters are missing. The hooks use centralized query-option helpers to ensure required params exist before fetches, preventing inconsistent inputs for products and catalogs.