diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxDateController.php b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxDateController.php index 848d14b9..dba9fbe5 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxDateController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxDateController.php @@ -127,9 +127,10 @@ class AjaxDateController extends ActionController $altLabel = $product->getAltLabel(); } } - if ($reseller = $this->resellerDataService->getResellerForCurrentDomain()) { - $paCode = $reseller['paCode']; - } +// Disabled, not working anyways, reseller subdomains are not registered since TYPO3 10.* +// if ($reseller = $this->resellerDataService->getResellerForCurrentDomain()) { +// $paCode = $reseller['paCode']; +// } $datesTable = $this->dateService->getDatesTable([ 'product' => $product, 'hotel' => $hotel, diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxTableController.php b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxTableController.php index 3558839d..68363b55 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxTableController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxTableController.php @@ -281,11 +281,12 @@ class AjaxTableController extends ActionController */ public function pricetableHtmlAction(Product $product, Hotel $hotel, string $bpnBookingUrlTemplateCode = null): void { - if ($reseller = $this->resellerDataService->getResellerForCurrentDomain()) { - $paCode = $reseller['paCode']; - } else { - $paCode = null; - } +// Disabled, not working anyways, reseller subdomains are not registered since TYPO3 10.* +// if ($reseller = $this->resellerDataService->getResellerForCurrentDomain()) { +// $paCode = $reseller['paCode']; +// } else { +// $paCode = null; +// } $nonBookableInfo = $this->getNonBookableInfobox($product); @@ -294,7 +295,7 @@ class AjaxTableController extends ActionController 'hotel' => $hotel, 'filterSettings' => $this->filterService->getNormalizedFilterSettings(), 'template' => $this->settings['bpnBookingUrlTemplateCode'], - 'paCode' => $paCode, + 'paCode' => GeneralUtility::_GET('pa'), 'sortByRoom' => true, ]); $hasIncludedServices = $this->dateService->hasIncludedServices($priceTable); diff --git a/public/typo3conf/ext/ep_products/Classes/Utility/BookingUrlUtility.php b/public/typo3conf/ext/ep_products/Classes/Utility/BookingUrlUtility.php index dbec9881..0fafb714 100644 --- a/public/typo3conf/ext/ep_products/Classes/Utility/BookingUrlUtility.php +++ b/public/typo3conf/ext/ep_products/Classes/Utility/BookingUrlUtility.php @@ -35,7 +35,6 @@ class BookingUrlUtility { const COOKIE_NAME = 'ep_trk'; - const URL_BASE = 'https://www.ep-reisen.de/buchung/maske_buchung.php'; public static function generateUrl(array $options): string { @@ -138,5 +137,6 @@ class BookingUrlUtility $site = $siteFinder->getSiteByIdentifier('ep-reisen'); } - return $site->getBase() . '/buchung/maske_buchung.php?' . http_build_query($query); } + return $site->getBase() . '/buchung/maske_buchung.php?' . http_build_query($query); + } } diff --git a/public/typo3conf/ext/ep_products/Classes/Utility/CookieUtility.php b/public/typo3conf/ext/ep_products/Classes/Utility/CookieUtility.php index bce95fc9..43a12558 100644 --- a/public/typo3conf/ext/ep_products/Classes/Utility/CookieUtility.php +++ b/public/typo3conf/ext/ep_products/Classes/Utility/CookieUtility.php @@ -6,7 +6,6 @@ class CookieUtility { const COOKIENAME_TRK = 'ep_trk'; const COOKIETTL_TRK = 30; - const COOKIENAME_BPN = 'bpn_cookie'; const PATTERN = '/^PA\d{3,4}$/'; /** @@ -30,18 +29,6 @@ class CookieUtility return $cookieValue; } - /** - * @return string|null - */ - public static function getBpnCookie() - { - if (!isset($_COOKIE[static::COOKIENAME_BPN])) { - return null; - } - - return $_COOKIE[static::COOKIENAME_BPN]; - } - /** * @param string $code * @return string diff --git a/public/typo3conf/ext/ep_theme/Classes/DataProcessing/ContextProcessor.php b/public/typo3conf/ext/ep_theme/Classes/DataProcessing/ContextProcessor.php index c21a0aa4..67b45294 100644 --- a/public/typo3conf/ext/ep_theme/Classes/DataProcessing/ContextProcessor.php +++ b/public/typo3conf/ext/ep_theme/Classes/DataProcessing/ContextProcessor.php @@ -29,7 +29,6 @@ namespace EP\EpTheme\DataProcessing; use EP\EpProducts\Service\ResellerDataService; use EP\EpProducts\Traits\DbConnectionTrait; -use EP\EpProducts\Utility\CookieUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Object\ObjectManager; use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; @@ -65,15 +64,11 @@ class ContextProcessor implements DataProcessorInterface } if ($data['tx_eptheme_context_pacode']) { $processedData['context']['paCode'] = $data['tx_eptheme_context_pacode']; - } else { - $resellerData = $this->getResellerData(); - if ($resellerData) { - $processedData['context']['paCode'] = $resellerData['paCode']; - } elseif ($paCode = $this->getPaCodeFromRequest()) { - $processedData['context']['paCode'] = $paCode; - } elseif ($cookieData = CookieUtility::getPaCookie()) { - $processedData['context']['paCode'] = $cookieData; - } +// Disabled, not working anyways, reseller subdomains are not registered since TYPO3 10.* +// } elseif ($resellerData = $this->getResellerData()) { +// $processedData['context']['paCode'] = $resellerData['paCode']; + } elseif ($paCode = $this->getPaCodeFromRequest()) { + $processedData['context']['paCode'] = $paCode; } return $processedData; @@ -107,10 +102,7 @@ class ContextProcessor implements DataProcessorInterface parse_str($query, $items); if (array_key_exists('pa', $items)) { - $paCode = $items['pa']; - CookieUtility::setPaCookie($paCode); - - return $paCode; + return $items['pa']; } return '';