This commit is contained in:
2025-06-20 16:05:04 +08:00
parent 6cf0831c3e
commit a136473171
3 changed files with 12 additions and 1 deletions
@@ -106,6 +106,11 @@ class VehicleNewController extends BaseController
$contentRes['content'] = isset($content['translation']) ? $content['translation']['content']:'';
$result['content'][] = $contentRes;
}
if(empty($item['sku'])){
$result['sku'] = [];
return $result;
}
foreach ($item['sku'] as &$sku) {
foreach ($sku['skuAttributes'] as &$skuAttribute){
$attribute = VehicleNewAttributesTranslationModel::where(['attributes_id' => $skuAttribute['attribute']['id'],'locale'=>locale()])->first();