From 1f66cac834e77a4bab76f7c0308f5be50eb9813f Mon Sep 17 00:00:00 2001 From: PhoenixDev - JJ Date: Wed, 11 Apr 2018 16:28:35 +0200 Subject: [PATCH] Resolve #13: Disable CoD for virtual quotes --- .../Phoenix/CashOnDelivery/Model/CashOnDelivery.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/code/community/Phoenix/CashOnDelivery/Model/CashOnDelivery.php b/app/code/community/Phoenix/CashOnDelivery/Model/CashOnDelivery.php index fc1eddc..08aec89 100644 --- a/app/code/community/Phoenix/CashOnDelivery/Model/CashOnDelivery.php +++ b/app/code/community/Phoenix/CashOnDelivery/Model/CashOnDelivery.php @@ -165,9 +165,14 @@ public function getAddressCodTaxAmount(Mage_Customer_Model_Address_Abstract $add */ public function isAvailable($quote = null) { + if ($quote->isVirtual()) { + return false; + } + if (!parent::isAvailable($quote)) { return false; } + if (!is_null($quote)) { if ($this->getConfigData('shippingallowspecific', $quote->getStoreId()) == 1) { $country = $quote->getShippingAddress()->getCountry();