[FIX] 修復商品多語系儲存與讀取錯誤、新增自動語系名稱顯示、補強商品規格欄位及密碼顯示切換功能
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 47s

This commit is contained in:
2026-03-30 17:11:15 +08:00
parent 9bbfaa39e6
commit d14eda7d69
9 changed files with 167 additions and 40 deletions

View File

@@ -4,7 +4,7 @@
@php
$names = [];
foreach(['zh_TW', 'en', 'ja'] as $locale) {
$names[$locale] = $product->translations->where('locale', $locale)->first()?->text ?? '';
$names[$locale] = $product->translations->where('locale', $locale)->first()?->value ?? '';
}
// If zh_TW translation is empty, fallback to product->name
if (empty($names['zh_TW'])) {