PAYONE-GmbH / magento-1

PAYONE Payment Extension for Magento 1
22 stars 41 forks source link

getConfigData uses quote #76

Closed pawel-0 closed 7 years ago

pawel-0 commented 7 years ago

the magento core getConfigData() doesn't require the quote, because the configs are loaded from the core_config_data. But in this module are some cases where to configs are loaded from the quote e.g. "sort_order". In that case the quote is loaded for every payment method and can cause some performance issues e.g. the "custom_quote_process" event is fired every time.

My suggestion is to add the quote as third parameter to Model/Payment/Method/Abstract.php:401 and pass it to getConfigForQuote() in :405

This would create the possibility to pass the quote through the process.

I would like to discuss this topic. If this get accepted I can create a pull request, because I already fixed it in my fork.

fjbender commented 7 years ago

To me this sounds like a good idea.

@FatchipRobert can you confirm that this has no unintended side effects? Cf. https://github.com/PAYONE-GmbH/magento-1/compare/development...pawelwaniek:config-quote