中文Store仍显示Color/Red,后台明明配置了“颜色/红色”。要分别检查属性前端标签和option label,它们存放在不同表。

按顺序解决

  1. 确认请求实际Store ID,查询eav_attribute_label中attribute_id+store_id的frontend_label;没有记录时会回退默认属性label。
  2. 再查eav_attribute_option_value。store_id=0是默认option label,目标Store应有对应记录;保存空字符串可能被当成没有覆盖。
  3. 自定义Configurable JSON或Swatch Resolver必须在目标Store环境下获取label。若Block cache key不含store_id,先访问英文站会把英文JSON缓存给中文站。
  4. 补齐标签并修正cache key后清block_html与FPC;GraphQL/PWA还要携带Store Header并清客户端缓存。

检查命令

SELECT attribute_id,store_id,value FROM eav_attribute_label WHERE attribute_id=:attribute_id;
SELECT option_id,store_id,value FROM eav_attribute_option_value WHERE option_id IN (:option_ids) ORDER BY option_id,store_id;
bin/magento cache:clean block_html full_page graphql

验证结果

交叉访问两个Store的同一商品,每个属性名和选项值使用本Store翻译;连续切换访问顺序也不能串语言。

注意:URL中的Store Code和Cookie可能覆盖预期Store,排查时同时看响应中的Store上下文。