private function retrievePathScope($path, $shopNumber)
    {
        $shopConfigs = $this->getShopNumberCollection($shopNumber);

        if (!$shopConfigs->getSize()) {
            throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_UNKNOWN_SHOP_NUMBER, false, true);
        }

        $firstItem = $shopConfigs->getFirstItem();

        /**
         * todo-sg: should be improved to use a single query, e.g. (scope = x AND scope_id = x) OR (scope = ...)
         *
         * @var Value $shopConfig
         */
        foreach ($shopConfigs as $shopConfig) {
            /** @var Collection $collection */
            $collection = $this
                ->getCollectionByPath($path)
                ->addFieldToFilter('scope', $shopConfig->getScope())
                ->addFieldToFilter('scope_id', $shopConfig->getScopeId());

            if ($collection->getItems()) {
                /** @var Value $propertyConfig */
                $propertyConfig = $collection->setOrder('scope_id')->getFirstItem();
                if ($propertyConfig->getData('value')) {
                    return $propertyConfig;
                }
            }
        }

        return $firstItem;
    }