Authored by hf

fixes bug to product list show tags

... ... @@ -223,6 +223,21 @@ class Helpers
$result['tags']['midYear'] = isset($productData['mid-year']) && $productData['mid-year'] === 'Y'; // 年中
$result['tags']['yearEnd'] = isset($productData['year-end']) && $productData['year-end'] === 'Y'; // 年末
$result['tags']['is_advance'] = isset($productData['is_advance']) && $productData['is_advance'] === 'Y'; // 再到着
// 打折与即将售完组合显示打折
if ($result['is_soon_sold_out'] && $result['tags']['is_discount']) {
$result['tags']['is_new'] = false;
}
// 打折与其它组合则隐藏打折
elseif ($result['tags']['is_discount'] &&
($result['tags']['is_new'] || $result['tags']['is_limited'] || $result['tags']['is_yohood'] || $result['tags']['is_advance']) ) {
$result['tags']['is_discount'] = false;
}
// YOHOOD和新品组合显示YOHOOD
elseif ($result['tags']['is_yohood'] && $result['tags']['is_new']) {
$result['tags']['is_new'] = false;
}
}
return $result;
... ...