@@ -125,7 +125,7 @@ protected function addCategoriesToDemandObjectFromSettings(ProductDemand $demand
125125 protected function isActionAllowed (string $ action ): bool
126126 {
127127 $ frameworkConfiguration = $ this ->configurationManager ->getConfiguration ($ this ->configurationManager ::CONFIGURATION_TYPE_FRAMEWORK );
128- $ allowedActions = $ frameworkConfiguration ['controllerConfiguration ' ][\ Extcode \ CartProducts \ Controller \ ProductController::class]['actions ' ] ?? [];
128+ $ allowedActions = $ frameworkConfiguration ['controllerConfiguration ' ][ProductController::class]['actions ' ] ?? [];
129129
130130 return in_array ($ action , $ allowedActions , true );
131131 }
@@ -184,8 +184,8 @@ public function listAction(int $currentPage = 1): ResponseInterface
184184
185185 public function showAction (?Product $ product = null ): ResponseInterface
186186 {
187- if ((int )$ GLOBALS [ ' TSFE ' ]-> page ['doktype ' ] === 183 ) {
188- $ productUid = (int )$ GLOBALS [ ' TSFE ' ]-> page ['cart_products_product ' ];
187+ if ((int )$ this -> request -> getAttribute ( ' frontend.page.information ' )-> getPageRecord () ['doktype ' ] === 183 ) {
188+ $ productUid = (int )$ this -> request -> getAttribute ( ' frontend.page.information ' )-> getPageRecord () ['cart_products_product ' ];
189189 $ product = $ this ->productRepository ->findByUid ($ productUid );
190190 }
191191
@@ -254,17 +254,15 @@ protected function getProduct(): ?Product
254254 */
255255 public function getProductUid (): mixed
256256 {
257- if ((int )$ GLOBALS [ ' TSFE ' ]-> page ['doktype ' ] === 183 ) {
258- return (int )$ GLOBALS [ ' TSFE ' ]-> page ['cart_products_product ' ];
257+ if ((int )$ this -> request -> getAttribute ( ' frontend.page.information ' )-> getPageRecord () ['doktype ' ] === 183 ) {
258+ return (int )$ this -> request -> getAttribute ( ' frontend.page.information ' )-> getPageRecord () ['cart_products_product ' ];
259259 }
260260
261261 if ($ this ->request ->getPluginName () !== 'ProductPartial ' ) {
262262 return 0 ;
263263 }
264264
265- $ configurationManager = GeneralUtility::makeInstance (
266- ConfigurationManager::class
267- );
265+ $ configurationManager = $ this ->configurationManager ;
268266 $ configuration = $ configurationManager ->getConfiguration (ConfigurationManager::CONFIGURATION_TYPE_FRAMEWORK );
269267
270268 $ typoscriptService = GeneralUtility::makeInstance (
0 commit comments