Guest User

Untitled

a guest
Jun 23rd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.20 KB | None | 0 0
  1. --- a/build/app/code/community/Phoenix/CashOnDelivery/Model/Quote/Total.php
  2. +++ b/build/app/code/community/Phoenix/CashOnDelivery/Model/Quote/Total.php
  3. @@ -26,16 +26,15 @@ class Phoenix_CashOnDelivery_Model_Quote_Total extends Mage_Sales_Model_Quote_Ad
  4.          $address->setCodFee(0);
  5.          $address->setCodTaxAmount(0);
  6.          $address->setBaseCodTaxAmount(0);
  7. -        
  8. -        $paymentMethod = Mage::app()->getFrontController()->getRequest()->getParam('payment');
  9. -        $paymentMethod = Mage::app()->getStore()->isAdmin() && isset($paymentMethod['method']) ? $paymentMethod['method'] : null;
  10. -        if ($paymentMethod != 'cashondelivery' && (!count($address->getQuote()->getPaymentsCollection()) || !$address->getQuote()->getPayment()->hasMethodInstance())){            
  11. +
  12. +        $collection = $address->getQuote()->getPaymentsCollection();
  13. +        if ($collection->count() <= 0) {
  14.              return $this;
  15.          }
  16. -        
  17. +
  18.          $paymentMethod = $address->getQuote()->getPayment()->getMethodInstance();
  19.  
  20. -        if ($paymentMethod->getCode() != 'cashondelivery') {            
  21. +        if ($paymentMethod->getCode() != 'cashondelivery') {
  22.              return $this;
  23.          }
Add Comment
Please, Sign In to add comment