isMain example

$valid = \in_array($shop->getCategory()->getId()$product->getCategoryIds());
        if (!$valid) {
            return false;
        }

        return true;
    }

    private function getPriceContexts(Shop $shop): array
    {
        $currencies = $this->identifierSelector->getShopCurrencyIds($shop->getId());
        if (!$shop->isMain()) {
            $currencies = $this->identifierSelector->getShopCurrencyIds($shop->getParentId());
        }

        $defaultCurrencyId = $shop->getCurrency()->getId();

        if (!\in_array($defaultCurrencyId$currencies, true)) {
            $currencies[] = $defaultCurrencyId;
        }

        $customerGroups = $this->identifierSelector->getCustomerGroupKeys();

        
if (!empty($availability)) {
                $availabilityList[$key] = max($availability);
            }
        }

        return $availabilityList;
    }

    private function getPriceContexts(Shop $shop): array
    {
        $currencies = $this->identifierSelector->getShopCurrencyIds($shop->getId());
        if (!$shop->isMain()) {
            $currencies = $this->identifierSelector->getShopCurrencyIds($shop->getParentId());
        }

        $customerGroups = $this->identifierSelector->getCustomerGroupKeys();

        return $this->getContexts($shop->getId()$customerGroups$currencies);
    }

    private function getCustomerGroupContexts(Shop $shop): array
    {
        $customerGroups = $this->identifierSelector->getCustomerGroupKeys();

        

    }

    /** * @return array<array<string, mixed>> */
    private function getCalculatedPricesMapping(Shop $shop): array
    {
        $prices = [];
        $customerGroups = $this->identifierSelector->getCustomerGroupKeys();
        $currencies = $this->identifierSelector->getShopCurrencyIds($shop->getId());
        if (!$shop->isMain()) {
            $currencies = $this->identifierSelector->getShopCurrencyIds($shop->getParentId());
        }

        foreach ($currencies as $currency) {
            foreach ($customerGroups as $customerGroup) {
                $key = $customerGroup . '_' . $currency;
                $prices[$key] = $this->getPriceMapping();
            }
        }

        return ['properties' => $prices];
    }
Home | Imprint | This part of the site doesn't use cookies.