I’m building a frontend application that uses Shopware 6 as a headless shop system. As part of this implementation, I’m using Webhook events to detect changes in the catalog.
So far, everything works quite well, but I have encountered some issues when changing the relationship between products and categories.
In the Shopware Dashboard, the user can create and update this relationship in different areas of the UI. Apparently different events are being fired depending on where the association is made.
When assigning one or more products to the category from the Category Edit UI, only the category.written
webhook is fired, but this doesn’t provide any information about the actual products that were assigned. I would expect one or more product.written
Webhooks to be fired here as well, but it’s not happening.
Even more critical, when de-assigning product(s) from a category, no Webhooks are being fired at all.
How can I detect if a product was de-assigned from a category if this operation doesn’t trigger any events? And how do I know which products were assigned to a category if the category.written
Webhook doesn’t contain this information?
Antonio Cosentino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.