Why is the message 'Javascript is required for checkout' shown during the payment process?

Issue

Within the checkout the message ‘Javascript is required to checkout’ is shown instead of the order confirmation button or on the next page after the confirmation of the order. This happens when our JavaScript is not properly loaded. Typically this is caused by not adding a block frontend_index_header_javascript_jquery in the theme. When our JavaScript is loded we remove the message.

Resolution

To solve the issue you need to make sure that the JavaScript we need to process the payment is loaded. We append our JavaScript to the frontend_index_header_javascript_jquery Smarty block.

We cannot add the JavaScript when the block is missing. The solution is to add the block frontend_index_header_javascript_jquery to the HTML. Typically just before the closing </body> tag. Our JavaScript uses jQuery as such the block has to be inserted after the block which includes jQuery. In the default theme the block is named frontend_index_header_javascript_jquery_lib.

In the default theme the block frontend_index_header_javascript_jquery is added in the template file themes/Frontend/Bare/frontend/index/index.tpl. The following example show how the block part has to look like:

{block name="frontend_index_header_javascript_jquery"}{/block}

Note that this block is no longer required in the 5.3 version of Shopware. However, this version requires to recompile the theme. This can be done by clearing the cache in your Shopware backend (under Configuration > Cache/performance > cache > Select all, including 'Compile themes' > Clear > Start process.

Please also note that if you update from Shopware 5.2 to 5.3 and face this Javascript error, you should try to deinstall and reinstall our payment extension (you should save in that case the module configuration before deinstalling). You should clear the cache in Shopware after reinstallation the extension.