Reputation: 101
services.cart is available in the Cart hook but Request is not available in the Cart hook, so I cannot Form post anything to it.
I created a custom hook, but how can I make services.cart available in my custom hook twig script?
Upvotes: 2
Views: 91
Reputation: 13161
You can't. The available data and services for each hook, including custom endpoints, are listed here. Apps cannot change that scope that is provided by the respective hook. If you need a specific service or additional data in a hook, you'll have to implement it in platform
and make a pull request.
Upvotes: 2