configuration = $configuration; } public function isDealer() { if ($this->configuration->isB2BShop()) { return $this->isType('b2b'); } return false; } protected function loadOriginalPriceType(): PriceTypeInterface { if ($this->hasPriceLevelOrPriceList()) { return new PriceWithoutDiscountPriceType(); } // B2C if (findModule(\Modules::PRICE_HISTORY)) { return new PriceIfOnlyDiscountPriceType(new PriceForDiscountPriceType()); } return parent::loadOriginalPriceType(); } protected function hasPriceLevelOrPriceList(): bool { $priceLevelContext = Contexts::get(PriceLevelContext::class); if ($priceLevelContext->getActiveId()) { return true; } $priceListContext = Contexts::get(PricelistContext::class); if ($priceList = $priceListContext->getActive()) { if (str_contains($priceList->getName(), 'VIP')) { return true; } } return false; } }