From 22daa6e97c5b95e98c7b3a4c1cdca5d09db92c2b Mon Sep 17 00:00:00 2001 From: PhoenixDev - JJ Date: Wed, 11 Apr 2018 17:29:20 +0200 Subject: [PATCH] Implement display_zero_fee correctly; fixed #21 --- .../Phoenix/CashOnDelivery/Block/Totals/Abstract.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/community/Phoenix/CashOnDelivery/Block/Totals/Abstract.php b/app/code/community/Phoenix/CashOnDelivery/Block/Totals/Abstract.php index 9887ae9..7003150 100644 --- a/app/code/community/Phoenix/CashOnDelivery/Block/Totals/Abstract.php +++ b/app/code/community/Phoenix/CashOnDelivery/Block/Totals/Abstract.php @@ -44,7 +44,9 @@ public function initTotals() { $this->_prepareTotals(); - if ($this->_totalObject && $this->_totalObject->getCodFee()) { + if (Mage::getStoreConfigFlag('payment/phoenix_cashondelivery/display_zero_fee') + || ($this->_totalObject && $this->_totalObject->getCodFee() > 0) + ) { $label = $this->__('Cash on Delivery fee'); $value = $this->_totalObject->getCodFee(); $baseValue = $this->_totalObject->getBaseCodFee(); @@ -123,4 +125,4 @@ protected function _addTotalToParent($total, $after = null) return $this; } -} \ No newline at end of file +}