path = _PS_MODULE_DIR_.'xmlfeeds/ga_categories/'.$fileName; } public function getList() { $file = $this->readFile(); if (empty($file)) { return false; } return $file; } private function readFile() { $categories = array(); if (is_file($this->path) && is_readable($this->path)) { $handle = fopen($this->path, 'r'); } if (empty($handle)) { return false; } while (($data = fgetcsv($handle, 1000, '-')) !== false) { if (empty($data[1])) { continue; } $id = trim($data[0]); if (!empty($id) && Tools::substr($id, 0, 1) == '#') { continue; } unset($data[0]); $categories[$id] = trim(implode('-', $data)); } return $categories; } }