html5首页我想直接遍历所有产品出来,调用了:coll()方法:
$filter['select'] = [
'sku', 'spu', 'name', 'image',
'price', 'special_price',
'special_from', 'special_to',
'brand_id','is_in_stock',
'url_key', 'score','created_at','status',
];
$filter['where'] = [['status'=> 1]];
$filter['orderBy'] = ['created_at'=>SORT_DESC];
$filter['fetchAll'] = true;
$products = Yii::$service->product->coll($filter);
$products = Yii::$service->category->product->convertToCategoryInfo($products['coll']);
//var_dump($products);
return $products;
但是后台设置html5的“规格产品只显示一个sku?yes”,没有生效,请问这个地方怎么做才更合理。