getStore()->getId())); } public function getPacsoftConfigDataGeneral($value = '',$storeid = 0){ return trim(Mage::getStoreConfig(sprintf('pacsoft/general/%s', $value),$storeid)); } public function getPacsoftConfigDataLogin($value = '',$storeid = 0){ return trim(Mage::getStoreConfig(sprintf('pacsoft/login/%s', $value),$storeid)); } public function getPacsoftConfigDataSettings($value = '',$storeid = 0){ return trim(Mage::getStoreConfig(sprintf('pacsoft/settings/%s', $value),$storeid)); } public function getPacsoftConfigDataDroppoints($value = '',$storeid = 0){ return trim(Mage::getStoreConfig(sprintf('pacsoft/droppoints/%s', $value),$storeid)); } public function getPacsoftConfigDataTracking($value = '',$storeid = 0){ return trim(Mage::getStoreConfig(sprintf('pacsoft/tracking/%s', $value),$storeid)); } public function getPacsoftConfigDataWaybill($value = '',$storeid = 0){ return trim(Mage::getStoreConfig(sprintf('pacsoft/waybill/%s', $value),$storeid)); } public function getPacsoftConfigDataDpd($value = '',$storeid = 0){ return trim(Mage::getStoreConfig(sprintf('pacsoft/dpd/%s', $value),$storeid)); } public function getUrlParams($storeid) { $urlParams = array(); $urlParams['user'] = $this->getPacsoftConfigDataLogin('brugerid',$storeid); $urlParams['pass'] = $this->getPacsoftConfigDataLogin('adgangskode',$storeid); $urlParams['session'] = $this->getPacsoftConfigDataLogin('language',$storeid); $urlParams['type'] = $this->getPacsoftConfigDataLogin('contenttype',$storeid); return $urlParams; } public function getLicenseKey() { return $this->getPacsoftConfigDataGeneral("licenskey"); } public function addCreateLabelButton() { $url = Mage::helper("adminhtml")->getUrl("adminhtml/adminhtml_pacsoft_pacsoft/createlabel/", array('id'=>Mage::registry('current_order')->getId())); $onClick = "setLocation('$url')"; return array( 'label' => "Print PostDK Label", 'onclick' => $onClick, ); } public function addCreateReturnLabelButton() { $url = Mage::helper("adminhtml")->getUrl("adminhtml/adminhtml_pacsoft_pacsoft/createreturnlabel/", array('id'=>Mage::registry('current_order')->getId())); $onClick = "setLocation('$url')"; return array( 'label' => "Print PostDK ReturLabel", 'onclick' => $onClick, ); } public function addSuccess($string) { return Mage::getSingleton('adminhtml/session')->addSuccess($string); } public function addWarning($string) { return Mage::getSingleton('adminhtml/session')->addWarning($string); } public function addError($string) { return Mage::getSingleton('adminhtml/session')->addError($string); } }