getConfigFlag('active')) { return false; } $allow = ($request->getmultiflat()); $result = Mage::getModel('shipping/rate_result'); $packageValue = $request->getBaseCurrency()->convert($request->getPackageValue(), $request->getPackageCurrency()); for($i = 0; $i <= 10; $i++) { if ($this->getConfigData('type'.$i) == 'O') { // per order $shippingPrice = $this->getConfigData('price'.$i); } elseif ($this->getConfigData('type'.$i) == 'I') { // per item $shippingPrice = ($request->getPackageQty() * $this->getConfigData('price'.$i)) - ($this->getFreeBoxes() * $this->getConfigData('price'.$i)); } else { $shippingPrice = $this->getConfigData('price'.$i); } $shippingName = $this->getConfigData('name'.$i); if($shippingName != "" && ($packageValue >= $this->getConfigData('min_shipping'.$i) && $packageValue <= $this->getConfigData('max_shipping'.$i)) or $shippingName != "" && $this->getConfigData('max_shipping'.$i) == "") { $method = Mage::getModel('shipping/rate_result_method'); $method->setCarrier('msmultiflat'); $method->setCarrierTitle($this->getConfigData('title')); $method->setMethod($this->getConfigData('name'.$i)); $method->setMethodTitle($this->getConfigData('name'.$i)); $method->setMethodDetails($this->getConfigData('details'.$i)); $method->setMethodDescription($this->getConfigData('details'.$i)); $method->setPrice($shippingPrice); $method->setCost($shippingPrice); $result->append($method); } else if ($shippingName == "") { } } return $result; } public function getAllowedMethods() { return array('msmultiflat'=>$this->getConfigData('name')); } } ?>