Shopify 配置
本指南将逐步指导您启用 BS 所需的权限, 以读取实时库存并创建安全的 Shopify 结账流程.
已连接的商店
Shopify 永久域名: radiant-beauty-boutique-t2qz2-qvfreywy.myshopify.com
OAuth连接已启用. Storefront API令牌已可用于商品目录和结账. 如需获取准确的库存件数, 只需再启用库存权限范围.
Storefront API 权限范围
以下是 'Lovable Storefront' 应用所需的权限. 标记为待处理的权限是唯一需要手动启用的权限.
Leer productos públicos
unauthenticated_read_product_listingsPermite mostrar catálogo, precios e imágenes.
Crear checkouts
unauthenticated_write_checkoutsNecesario para el botón 'Comprar' y el carrito.
Leer inventario en tiempo real
unauthenticated_read_product_inventoryMuestra 'disponible', 'agotado' y unidades exactas. Es el que falta activar.
Leer planes de venta
unauthenticated_read_selling_plan_groupsOpcional: solo si usas suscripciones o planes de pago.
分步指南: 启用实时库存
1. 打开 Storefront 应用
在 Shopify 后台中, 前往设置 → 应用和销售渠道. 找到集成了 Storefront API 的应用 (通常为 'Lovable Storefront' 或您的私有应用) 并打开.
2. 编辑权限范围
在应用内, 打开配置 → 店面 API 访问权限范围. 您将看到权限列表.
3. 勾选库存权限
查找并启用
unauthenticated_read_product_inventory. 保存更改.4. 返回网站
网站每30秒检查一次库存. 权限范围启用后, 商品卡片将按设计显示'有货'、'售罄'或准确的库存件数.
如果我需要重新生成令牌怎么办?
如果您创建了新应用或重新生成了 Storefront API 访问令牌, 请在此聊天中告诉我, 我会在代码中更新它. 请勿将其粘贴到公开评论中: 请使用安全表单, 或让我打开机密信息输入框.
当前使用的令牌会安全保存在商店配置中, 绝不会公开显示.
安全结账
所有付款、配送和税务数据均在 Shopify 原生结账流程中处理. BS 不存储银行卡信息或账单地址. 购物车与 Shopify 同步, 官方结账页面将在新标签页中打开.
