Codixio
Codixio

Reputation: 101

Shopware6 App Make services.cart available in Custom Hook

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

Answers (1)

dneustadt
dneustadt

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

Related Questions