getConnection('core_read'); $tablename = $resource->getTableName('shipping_gls'); $query = "SELECT pk FROM $tablename WHERE method_code LIKE '%gls_pakkeshop%'"; $results = $read->fetchAll($query); $ids = array(); foreach($results as $result) { $ids[] = $result['pk']; } return $ids; } public function getFlexIds() { $resource = Mage::getSingleton('core/resource'); $read = $resource->getConnection('core_read'); $tablename = $resource->getTableName('shipping_gls'); $query = "SELECT pk FROM $tablename WHERE method_code LIKE '%gls_privat%'"; $results = $read->fetchAll($query); $ids = array(); foreach($results as $result) { $ids[] = $result['pk']; } return $ids; } public function getBusinessIds() { $resource = Mage::getSingleton('core/resource'); $read = $resource->getConnection('core_read'); $tablename = $resource->getTableName('shipping_gls'); $query = "SELECT pk FROM $tablename WHERE method_code LIKE '%gls_erhverv%'"; $results = $read->fetchAll($query); $ids = array(); foreach($results as $result) { $ids[] = $result['pk']; } return $ids; } public function getDroppoint($droppoint) { $droppoint = explode("-",$droppoint); $handikapvenlig = false; if(isset($droppoint[1])) { $droppoint = $droppoint[0]; $handikapvenlig = true; } else { $droppoint = $droppoint[0]; } return $droppoint; } }