Repository

Extends \Shopware\Models\Analytics\Repository

package

Default

Methods

Returns the sales of articles grouped by main shop categories. These are the first child categories of the active default shop.

getArticleSalesPerMainShopCategory(\DateTime|null $from = null, \DateTime|null $to = null) : \Shopware\Components\Model\DBAL\Result

Articles may have multiple categories assigned to them. We first map articles down to the respective main shop categories, then select the category with the lowest position ("first"/"most important" main shop category).

Arguments

$from

\DateTime|null

$to

\DateTime|null

Response

\Shopware\Components\Model\DBAL\Result