getStore()->getId()), array('encoding' => 'UTF-8','soap_version' => SOAP_1_1)); $shop = $client->GetOneParcelShop(array( 'ParcelShopNumber' => $id ))->GetOneParcelShopResult; if($shop != NULL){ return $shop; } else{ return false; } } public function getPakkeshopHtml($order) { $shippingMethod = explode('_',$order->getData('shipping_method')); $shippingMethod = $shippingMethod[0].'_'.$shippingMethod[1]; if(!$order || !$order->getId() || $shippingMethod != Mage::getStoreConfig('gls/general/pakkeshop_shipping_method',$order->getStoreId())){ return false; } if($order->getGlsPakkeshop()){ $pakkeshop = $this->getPakkeshop($order->getGlsPakkeshop()); $shopHtml = '

'; $shopHtml .= ''.trim($pakkeshop->CompanyName).'
'; $shopHtml .= trim($pakkeshop->Streetname).'
'; $shopHtml .= trim($pakkeshop->Streetname2).'
'; $shopHtml .= trim($pakkeshop->ZipCode).' '.trim($pakkeshop->CityName).'
'; $shopHtml .= 'Afhentes af: '.$order->getGlsAfhenter(); return $shopHtml; } else{ return false; } } public function getPakkeshopHtmlToQuote($quote) { $shippingMethod = explode('_',$quote->getShippingAddress()->getData('shipping_method')); $shippingMethod = $shippingMethod[0].'_'.$shippingMethod[1]; if($shippingMethod != Mage::getStoreConfig('gls/general/pakkeshop_shipping_method',$quote->getStoreId())){ return false; } if($quote->getGlsPakkeshop()){ $pakkeshop = $this->getPakkeshop($quote->getGlsPakkeshop()); $shopHtml = '

'; $shopHtml .= ''.trim($pakkeshop->CompanyName).'
'; $shopHtml .= trim($pakkeshop->Streetname).'
'; $shopHtml .= trim($pakkeshop->Streetname2).'
'; $shopHtml .= trim($pakkeshop->ZipCode).' '.trim($pakkeshop->CityName).'
'; $shopHtml .= 'Afhentes af: '.$quote->getGlsAfhenter(); return $shopHtml; } else{ return false; } } public function isOsc(){ $storeId = Mage::app()->getStore()->getId(); if(Mage::getStoreConfig('gls/general/gls_osc',$storeId) == 1){ return true; } else{ return false; } } }