This event belongs to the graphql-storefront module. It will be fired before an item is added to basket and holds the ID of the the user basket, ID of the product and the amount.
.. literalinclude:: ../examples/events/BeforeAddItem.php :language: php
Important
The code above is only an example. In case you need to handle the BeforeAddItem
event,
please adapt to your needs.
.. literalinclude:: ../examples/events/beforeadditemservices.yaml :language: yaml