From 7bc711379e42fed894cd15429417efbb4b1f95ab Mon Sep 17 00:00:00 2001 From: Helmut Strasser Date: Wed, 15 Oct 2025 14:47:10 +0200 Subject: [PATCH] [TASK] Use late static bindings to access AJAX_CART_TYPE_NUM from extended ProductController AJAX_CART_TYPE_NUM sets the typeNum to 2278001. For cases where two different carts are needed, another typeNum has to be registered. To accomplish that, one can extend the ProductController just to define another AJAX_CART_TYPE_NUM and use the original methods. But that only works, if the comparison in line 107 (v10) does not read self::AJAX_CART_TYPE_NUM but static::AJAX_CART_TYPE_NUM Resolves: #705 --- Classes/Controller/Cart/ProductController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Controller/Cart/ProductController.php b/Classes/Controller/Cart/ProductController.php index b8828ddc..e980fd1c 100644 --- a/Classes/Controller/Cart/ProductController.php +++ b/Classes/Controller/Cart/ProductController.php @@ -104,7 +104,7 @@ public function addAction(): ResponseInterface ); $pageType = $GLOBALS['TYPO3_REQUEST']->getAttribute('routing')->getPageType(); - if ($pageType === self::AJAX_CART_TYPE_NUM) { + if ($pageType === static::AJAX_CART_TYPE_NUM) { $productsChanged = $this->getChangedProducts($cartProducts); $response = [