Credit Rating: 'incrementCreditratingSampleCounter' produces unnecessary DB queries!
pgrudina opened this issue · 2 comments
pgrudina commented
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);
}
}
hreinberger commented
thx, we'll look into this!