shopware / shopware

Shopware 6 is an open commerce platform based on Symfony Framework and Vue and supported by a worldwide community and more than 1.500 community extensions
https://shopware.com
MIT License
2.82k stars 1.02k forks source link

Streamline data provided by flow builder events #4770

Open niklaswolf opened 1 month ago

niklaswolf commented 1 month ago

PHP Version: 8.2 | Shopware Version: 6.6.6.1 | Affected area / extension: Platform(Default)


Expected behaviour:

The data provided in the events for the flow builder should be the same, so that there are no unexpected cases when using the data in for example e-mail templates.

Actual behaviour:

For example the order data for different order related events is not the same, which is quite unexpected. See an example here:

OrderPlacedEvent has the following order data: https://github.com/shopware/shopware/blob/169e034e3e83d3c2ebe85bb3bbaaa11d2b591f0f/src/Core/Checkout/Cart/SalesChannel/CartOrderRoute.php#L88

OrderStateChangedEvent has this order data: https://github.com/shopware/shopware/blob/169e034e3e83d3c2ebe85bb3bbaaa11d2b591f0f/src/Core/Checkout/Order/Listener/OrderStateChangeEventListener.php#L225

As you can see, there are quite some differences. This leads for example to the unexpected error that lineItem images are present in a e-mail template when using the OrderPlacedEvent, but not when using a OrderStateChangedEvent.

How to reproduce:

shopware-issue-bot[bot] commented 1 month ago

We found the following existing issues which may help or are related to your topic:

shopwareBot commented 1 month ago

[public] Shopware automated response: This issue is linked to the internal issue: NEXT-38363

[created from NEXT-38363, comment 496263]

shopwareBot commented 1 week ago

[public]

Status Change: In Progress

Work on this issue has started. It is now being implemented.

[created from NEXT-38363, comment 510138]

shopwareBot commented 1 week ago

[public]

Status Change: Open

This issue is ready for implementation.

[created from NEXT-38363, comment 510149]