/**
  * Overwrite parent method to adding properly carrier name
  * when it starts with assigned $carrierCode ("easyshippingrules")
  *
  * @param string $carrierCode
  *
  * @return string
  */
 public function getCarrierName($carrierCode)
 {
     $carrierName = Mage::helper('easyshippingrules')->getCarrierName($carrierCode);
     if ($carrierName) {
         return $carrierName;
     }
     return parent::getCarrierName($carrierCode);
 }
示例#2
0
 /**
  * Returns modified url in some cases.
  *
  * @param string $url
  * @return string
  */
 public function getUrl($url = '', $params = array())
 {
     // Not actually the best way of doing it, but I prefer not to create another template
     // just to change these 2 urls.
     if ('checkout/cart/estimateUpdatePost' == $url) {
         return parent::getUrl('request4quote_front/quote/estimateUpdatePost');
     }
     if ('checkout/cart/estimatePost' == $url) {
         return parent::getUrl('request4quote_front/quote/estimatePost');
     }
     return parent::getUrl($url, $params);
 }
示例#3
0
 public function getEstimateRates()
 {
     if (!Mage::helper('udsplit')->isActive()) {
         return parent::getEstimateRates();
     }
     if (empty($this->_rates)) {
         $groups = $this->getAddress()->getGroupedAllShippingRates();
         foreach ($groups as $cCode => $rates) {
             foreach ($rates as $i => $rate) {
                 if ($rate->getUdropshipVendor() || $rate->getCarrier() == 'udsplit' && $rate->getMethod() == 'total') {
                     unset($groups[$cCode][$i]);
                 }
                 if (empty($groups[$cCode])) {
                     unset($groups[$cCode]);
                 }
             }
         }
         $this->_rates = $groups;
     }
     return $this->_rates;
 }
示例#4
0
 public function getEstimateRates()
 {
     $rates = parent::getEstimateRates();
     unset($rates['nypwidget']);
     return $rates;
 }
 /**
  * Get address model
  *
  * @return Mage_Sales_Model_Quote_Address
  */
 public function getAddress()
 {
     return Mage::helper('aitconfcheckout/onepage')->getAddress(parent::getAddress());
 }