PAYONE-GmbH/magento-1

Credit Rating: 'incrementCreditratingSampleCounter' produces unnecessary DB queries!

pgrudina opened this issue · 2 comments

When Credit rating disabled there is a method 'setCreditratingSampleCounter' that still doing 'saveConfig' and produces unnecessary DB queries on every order place after.

It could simply be improved if you check if Credit Rating is enabled:

public function setCreditratingSampleCounter($count, $storeId)
{
$creditRating = $this->getConfigProtect($storeId)->getCreditrating();
if ($creditRating->isEnabled()) {
Mage::getConfig()->saveConfig(self::CONFIG_KEY_CREDITRATING_SAMPLE_COUNTER, $count, 'stores', $storeId);
}
}

thx, we'll look into this!

Hello,
We solved that issue with #474 I merged it today.