fix: pc/mobile 产品详情页属性
This commit is contained in:
@@ -373,6 +373,8 @@ class Product extends Common
|
||||
// 获取属性名称
|
||||
$attrs = ProductAttrModel::bypks(array_unique(Arr::pluck($sku_attrs, 'attr_id')))->column(['attr_name'], 'id');
|
||||
foreach ($sku_attrs as $v) {
|
||||
if (empty($v['attr_value'])) continue;
|
||||
|
||||
$v['attr_name'] = $attrs[$v['attr_id']]?? '';
|
||||
// 按属性分组
|
||||
$product_sku_attrs[$v['attr_id']]['attr_id'] = $v['attr_id'];
|
||||
|
||||
Reference in New Issue
Block a user