Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- a/build/app/code/community/Phoenix/CashOnDelivery/Model/Quote/Total.php
- +++ b/build/app/code/community/Phoenix/CashOnDelivery/Model/Quote/Total.php
- @@ -26,16 +26,15 @@ class Phoenix_CashOnDelivery_Model_Quote_Total extends Mage_Sales_Model_Quote_Ad
- $address->setCodFee(0);
- $address->setCodTaxAmount(0);
- $address->setBaseCodTaxAmount(0);
- -
- - $paymentMethod = Mage::app()->getFrontController()->getRequest()->getParam('payment');
- - $paymentMethod = Mage::app()->getStore()->isAdmin() && isset($paymentMethod['method']) ? $paymentMethod['method'] : null;
- - if ($paymentMethod != 'cashondelivery' && (!count($address->getQuote()->getPaymentsCollection()) || !$address->getQuote()->getPayment()->hasMethodInstance())){
- +
- + $collection = $address->getQuote()->getPaymentsCollection();
- + if ($collection->count() <= 0) {
- return $this;
- }
- -
- +
- $paymentMethod = $address->getQuote()->getPayment()->getMethodInstance();
- - if ($paymentMethod->getCode() != 'cashondelivery') {
- + if ($paymentMethod->getCode() != 'cashondelivery') {
- return $this;
- }
Add Comment
Please, Sign In to add comment