cart icon indicating copy to clipboard operation
cart copied to clipboard

Allow late static binding in ProductController to overwrite AJAX_CART_TYPE_NUM

Open helmutstrasser opened this issue 3 months ago • 0 comments

Bug Report

Current Behavior 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.

Expected behavior/output The ProductController respects the custom AJAX_CART_TYPE_NUM when ProductController has been extended to change self::AJAX_CART_TYPE_NUM.

Environment

  • TYPO3 version: 12
  • cart version: 10
  • Is your TYPO3 installation set up with Composer (Composer Mode): yes
  • OS: OSX

Possible Solution I will submit a pull request

helmutstrasser avatar Oct 15 '25 12:10 helmutstrasser