Setup a running Adyen implementation with Paypal and credit card in Shopware dev mode
Verify that the Credit Card Field are loaded on checkout/confirm
Switch from dev to prod in .env and clear all caches
Reload Page and see a js console error because
document.querySelector('#adyen-checkout-options').dataset is called and executed in the head before the <div id="adyen-checkout-options"> exists.
Expected behavior
Inline JS should be called after the DOM is completely rendered by the Browser or the Githubissues.
Githubissues is a development platform for aggregating issues.
Describe the bug If you change from dev to Production mode in .env, the inline JS moved to the head of the DOM. This symfony default behaviour: https://symfony.com/blog/moving-script-inside-head-and-the-defer-attribute#the-caveat-inline-javascript-cannot-be-deferred
Therefore no customer can checkout correctly.
Versions Shopware version: 6.5.8.13 Plugin version: 3.15.0
To Reproduce Steps to reproduce the behavior:
document.querySelector('#adyen-checkout-options').dataset
is called and executed in the head before the<div id="adyen-checkout-options">
exists.Expected behavior Inline JS should be called after the DOM is completely rendered by the Browser or the Githubissues.