saleor-storefront
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSaleor Storefront
Saleor 店面
Universal guide for building storefronts on the Saleor e-commerce platform. Covers
the Saleor GraphQL API data model, permission system, checkout lifecycle, channel
architecture, and product/variant patterns. Framework-agnostic — these rules apply
whether you're using Next.js, Remix, Nuxt, or a custom setup.
为在Saleor电商平台上构建店面提供的通用指南。涵盖Saleor GraphQL API数据模型、权限系统、结账生命周期、渠道架构以及产品/变体模式。与框架无关——无论你使用Next.js、Remix、Nuxt还是自定义配置,这些规则都适用。
When to Apply
适用场景
Reference these guidelines when:
- Querying Saleor's GraphQL API for products, categories, or collections
- Building product detail pages with variant selection
- Implementing checkout and payment flows
- Working with multi-channel and multi-currency setups
- Debugging "product not purchasable" or permission errors
- Investigating Saleor API behavior via source code
在以下场景中参考本指南:
- 查询Saleor的GraphQL API获取产品、分类或集合
- 构建包含变体选择的产品详情页
- 实现结账和支付流程
- 处理多渠道和多货币设置
- 调试“产品不可购买”或权限错误
- 通过源代码排查Saleor API行为
Rule Categories
规则分类
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | API | CRITICAL | |
| 2 | Products | HIGH | |
| 3 | Checkout | HIGH | |
| 4 | Channels | MEDIUM | |
| 优先级 | 分类 | 影响级别 | 前缀 |
|---|---|---|---|
| 1 | API | 关键 | |
| 2 | 产品 | 高 | |
| 3 | 结账 | 高 | |
| 4 | 渠道 | 中 | |
Quick Reference
快速参考
1. API (CRITICAL)
1. API(关键)
- — Nullable fields, pricing structure, automatic storefront filtering
api-data-model - — Token types, permission errors, two-tier query pattern
api-permissions - — Channel-scoped queries, variant attributes, filtering, codegen
api-graphql-patterns - — How to investigate Saleor API behavior via types and source
api-investigation
- — 可空字段、定价结构、店面自动过滤
api-data-model - — 令牌类型、权限错误、双层查询模式
api-permissions - — 渠道范围查询、变体属性、过滤、代码生成
api-graphql-patterns - — 如何通过类型和源代码排查Saleor API行为
api-investigation
2. Products (HIGH)
2. 产品(高)
- — Variant model, selection vs non-selection attributes, pricing, UX patterns
products-variants
- — 变体模型、可选与非可选属性、定价、UX模式
products-variants
3. Checkout (HIGH)
3. 结账(高)
- — Session lifecycle, common errors, debugging payment issues
checkout-lifecycle
- — 会话生命周期、常见错误、调试支付问题
checkout-lifecycle
4. Channels (MEDIUM)
4. 渠道(中)
- — Fulfillment triangle, 7-point purchasability checklist, channel queries
channels-purchasability
- — 履约三角、7点可购买性检查清单、渠道查询
channels-purchasability
How to Use
使用方法
Read individual rule files for detailed explanations and code examples:
rules/api-data-model.md
rules/products-variants.mdEach rule file contains:
- Brief explanation of why it matters
- Code examples (correct and incorrect patterns)
- Anti-patterns to avoid
阅读单个规则文件获取详细说明和代码示例:
rules/api-data-model.md
rules/products-variants.md每个规则文件包含:
- 简要说明其重要性
- 代码示例(正确与错误模式)
- 需要避免的反模式
Full Compiled Document
完整编译文档
For the complete guide with all rules expanded:
AGENTS.md如需包含所有扩展规则的完整指南,请查看:
AGENTS.md