public function saveShippingMethod($shippingMethod) { $errors = Mage::getModel('adjdeliverydate/step')->process(); if ($errors) { return $errors; } $quoteAddress = $this->getQuote()->getShippingAddress(); Mage::getModel('adjdeliverydate/quote')->saveDelivery($quoteAddress); return parent::saveShippingMethod($shippingMethod); }
public function saveShippingMethod($shippingMethod) { $result = parent::saveShippingMethod($shippingMethod); if (Mage::helper('smdropship')->dropShipIsActive()) { $rate = $this->getQuote()->getShippingAddress()->getShippingRateByCode($shippingMethod); if ($rate->getCarrier() == 'dropshipping') { $methodDetail = $rate->getMethodDetail(); $this->getQuote()->getShippingAddress()->setShippingMethodDetail($methodDetail); } } return $result; }
public function saveShippingMethod($shippingMethod) { if (empty($shippingMethod)) { return array('error' => -1, 'message' => Mage::helper('sheepla')->__('Invalid shipping method.')); } $so = null; $sTemp = explode('_', $shippingMethod); //is it sheepla's method if ($sTemp[0] == 'sheepla') { //if so get check if $method is available with current shipping method $cString = "sheepla/{$sTemp[1]}_{$sTemp[2]}"; $conf = Mage::getStoreConfig($cString); $_request = Mage::app()->getRequest(); //read delivery option $ire = strip_tags($_request->getParam('sheepla-widget-plinpost-email')); $irm = strip_tags($_request->getParam('sheepla-widget-plinpost-paczkomat')); $irp = strip_tags($_request->getParam('sheepla-widget-plinpost-phone-number')); $ira = strip_tags($_request->getParam('sheepla-widget-plinpost-form-agree-checkbox')); $slMetro = strip_tags($_request->getParam('sheepla-widget-rushoplogistics-metro-station')); $imPoint = strip_tags($_request->getParam('sheepla-widget-ruimlogistics-paczkomat')); $ppPoint = strip_tags($_request->getParam('sheepla-widget-rupickpoint-paczkomat')); //$qwPoint = strip_tags($_request->getParam('sheepla-widget-rupickpoint-metro-station-id')); //save sheepla order data $so = Mage::getModel('sheepla/order')->load($this->getQuote()->getId(), 'quote_id'); $so->setQuoteId($this->getQuote()->getId()); $so->setRequiresSync(1); $so->setIsValid(null); $so->setLastError(null); //save delivery options $so->setDoRuShoplogisticsMetro($slMetro); $so->setDoRuImPoint($imPoint); $so->setDoRuPickPointPoint($ppPoint); $so->setDoPlInpostMachineId($irm); $so->setDoPlInpostMobile($irp); $so->setDoPlInpostEmail($ire); $so->setDoPlInpostEmail($ire); $so->setDoPlInpostEmail($ire); $so->setDoPlInpostEmail($ire); $so->save(); //if this is an inpost shipping add a note if (!empty($irm)) { $note = Mage::helper('sheepla')->__('Delivery to Inpost pick-up machine:') . $irm; $this->getQuote()->setCustomerNote($note); } //eveything seems to ok, update sheepla order data if ($so != null) { $so->setIsValid(1); $so->save(); } } return parent::saveShippingMethod($shippingMethod); }
public function saveShippingMethod($shippingMethod) { if (empty($shippingMethod)) { return array('error' => -1, 'message' => $this->_helper->__('Invalid shipping method.')); } if (isset($_POST['fm_fields'])) { foreach ($_POST['fm_fields'] as $key => $value) { if (substr($key, 0, 3) == 'fm_') { Mage::getModel('fieldsmanager/fieldsmanager')->SaveFieldsdata(substr($key, 3), $value); } } } return parent::saveShippingMethod($shippingMethod); }