Post by compas-media » Mon Sep 22, 2014 4:01 pm

I get the following error with direct checkout:

Parse error: syntax error, unexpected T_PUBLIC in catalog/controller/checkout/guest.php on line 310

Line 310 goes as follows: (From the opening to the end tag)

Code: Select all

	public function zone() {
		$output = '<option value="">' . $this->language->get('text_select') . '</option>';

		$this->load->model('localisation/zone');

		$results = $this->model_localisation_zone->getZonesByCountryId($this->request->get['country_id']);

		foreach ($results as $result) {
			$output .= '<option value="' . $result['zone_id'] . '"';

			if (isset($this->request->get['zone_id']) && ($this->request->get['zone_id'] == $result['zone_id'])) {
				$output .= ' selected="selected"';
			}

			$output .= '>' . $result['name'] . '</option>';
		}

		if (!$results) {
			$output .= '<option value="0">' . $this->language->get('text_none') . '</option>';
		}

		$this->response->setOutput($output);
	}
}
I absolutely have no idea what's wrong, I hope you guys can help me!

Newbie

Posts

Joined
Fri Sep 05, 2014 6:35 pm

Post by Antoni4 » Tue Sep 23, 2014 7:28 am

Does this function appear inside the rest of your class definition? Sounds like maybe your class closes prematurely. Are you sure that this is where the problem really is?

Have a look if you left an unclosed tag somewhere, or an unclosed string.

I suspect there is a parse error earlier on in a file before line 310 or something like that.

User avatar
New member

Posts

Joined
Sat Sep 29, 2012 7:03 am
Who is online

Users browsing this forum: No registered users and 8 guests