adyen-magento2 icon indicating copy to clipboard operation
adyen-magento2 copied to clipboard

Payment method resources included in frontend even if methods are configured or activated

Open speedupmate opened this issue 3 years ago • 1 comments

Describe the bug

Payment method resources included in frontend even if not configured or methods are activated. This is a issue cause mixins are applied even if adyen is not used, extra stuff is loaded but never used on frontend

To Reproduce

Steps to reproduce the behavior:

  1. install adyen extension but don't configure it yet
  2. go to checkout and explore included resources
  3. lot of resources are included

image

Expected behavior

As a Magento2 site owner after installing the extension and not configuring anything or fully configuring from admin we expect that none of Adyen scripts, styles , methods or mixins are included in frontend and it does not affect existing functionality

Magento version all

Plugin version all

Desktop (please complete the following information): all

Smartphone (please complete the following information): all

Additional context

This can be avoided by providing a layoutProcessor that removes the methods from frontend when those are not configured yet. Consider replacing mixins with extending objects on runtime and wrapping the methods inside.

speedupmate avatar Feb 03 '22 10:02 speedupmate

Hi @speedupmate,

Thank you for opening this issue. This is a fair suggestion and would help in speeding up our plugin, something we want to look at in the future. However, this does not have priority right now. I'll change this to enhancement and add it to our backlog. It will be picked there once there is room for it.

Cheers, Titus

tnaber avatar Feb 09 '22 14:02 tnaber