<?php

class ControllerModuleOnwebchat extends Controller {
	protected function index() {

		$this->data['onwebchat_chat_id'] = $this->config->get('onwebchat_chat_id');

		if( isset($this->data['onwebchat_chat_id']) && $this->data['onwebchat_chat_id'] != '' ){
			
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/onwebchat.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/module/onwebchat.tpl';
			} else {
				$this->template = 'default/template/module/onwebchat.tpl';
			}

			$this->render();
		}
	}
}
