public function getProductPositionsByCategory($category)
    {
        $storeId = \Magento\Store\Model\Store::DEFAULT_STORE_ID;
        if (is_object($category)) {
            if ($category->getUseStorePositions()) {
                $storeId = $category->getStoreId();
            }
            $category = $category->getId();
        }

        return $this->getProductPositions($category, $storeId);
    }