浏览文章
文章信息
Magento2 热销商品销售数量读取|产品热销数量|商品热销数量
14486
$collection = $collection->joinTable( array('best' => 'sales_bestsellers_aggregated_monthly'), 'product_id=entity_id', ['qty_ordered', 'product_id'], null, 'left') ->groupByAttribute('entity_id') ->addMinimalPrice(); $collection->getSelect()->order('qty_ordered '.$sort);