Magento2 : What is the default table used by Bestsellers in the admin?
-
21-02-2021 - |
質問
In the database, I know that there are 3 aggregated bestseller tables
sales_bestsellers_aggregated_daily,
sales_bestsellers_aggregated_monthly,
sales_bestsellers_aggregated_yearly
but which one of them is the default?
See attached screencast image:https://monosnap.com/file/5N7Q0kR95cDKvjpAeD29MDEAdfxmn6
解決
Dashboard bestseller usese Report/Bestseller resource model that can be found in:
vendor\magento\module-sales\Model\ResourceModel\Report\Bestsellers.php
And as you can see in constructor that it uses AGGREGATION_DAILY
by default
$this->_init('sales_bestsellers_aggregated_' . self::AGGREGATION_DAILY, 'id');
From the look of this, I can say it uses sales_bestsellers_aggregated_daily
table for this report
他のヒント
The bestsellers table on the dashboard is an "all time" display of data.
所属していません magento.stackexchange