[FIX] 修復商品多語系儲存與讀取錯誤、新增自動語系名稱顯示、補強商品規格欄位及密碼顯示切換功能
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 47s
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 47s
This commit is contained in:
@@ -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'])) {
|
||||
|
||||
Reference in New Issue
Block a user