hallowed-eye-69242
07/27/2023, 12:41 PMpermissions. So, in my b2b shop customers can add to cart even when they are not logged.
Now I'm adding the quick-order functionality, but when I'm trying to add to cart a have a message This action is forbidden .
While investigating, I found that we use AddCartItemPermissionPlugin for this purposes (\SprykerShop\Yves\QuickOrderPage\Controller\QuickOrderController::executeAddToCartAction).
I have this plugin registered in Zed.PermissionDependencyProvider and Client.PermissionDependencyProvider.
Also, I found another plugin SeeOrderPlaceSubmitPermissionPlugin . I don't understand the difference between these two plugins, but in the \Spryker\Client\CustomerAccessPermission\CustomerAccessPermissionConfig::CONTENT_TYPE_PERMISSION_PLUGIN we use it in line 50: self::_CONTENT_TYPE_ADD_TO_CART_ => SeeAddToCartPermissionPlugin::_KEY_,
If I replace it with AddCartItemPermissionPlugin I can perform add-to-cart operation in quick-order , but can't do it in catalog.
Also I found that if I change the AddCartItemPermissionPlugin::KEY to SeeAddToCartPermissionPlugin - it works fine. But, probably, it's bad solution.
So, what I'm doing wrong? How can I add permission for not-logged customers to add products to the cart on the quick-order page?