<?php
$loader = $this->registry->get('load');
$loader->controller('product/productList');

class ControllerModuleSpecialAction extends ControllerProductProductList {

	public function index($setting=null) {
		$this->language->load('module/special_action');

		$this->data['productListTitle'] = array();

		$this->data['heading_title']  		 	= ($this->config->get('special_action_title')) ?: $this->language->get('heading_title');

	

		$this->data['moduleSpecialAction'] 		= $this->getChild('product/productList/moduleSpecialAction', $setting);
		$this->data['exibeModule']    		 	= parent::getExibeModulo();
		$this->data['positionModulo']   	 	= parent::getPositionModulo();

		$this->data['scroll']   	 		= ($this->config->get('special_action_scroll')) ?: '';
		$this->data['loop']   	 			= ($this->config->get('special_action_loop')) ?: '';
		$this->data['primary_color'] 		= ($this->config->get('special_action_primary_color')) ?: '';
		$this->data['primary_color_title'] 		= ($this->config->get('special_action_title_color')) ?: '';
		$this->data['secondary_color'] 		= ($this->config->get('special_action_secondary_color')) ?: '';
		$this->data['backgroundImage'] 		= ($this->config->get('special_action_selectedStyle')) ?: '';

		$this->data['type']= (isset($setting['type']) && ($setting['type']==Type_DsimDnao::Tp_Sim)) ? $setting['type'] : '' ;

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

        $this->data['productListTitle'] = array(
            'heading_title' => ($this->config->get('special_action_title')) ?: $this->language->get('heading_title'),
            'heading_subtitle' => $this->config->get('special_action_subtitle') ?: '',
            'link' => (isset($this->data['link'])) ? $this->data['link'] : '',
        );

        $this->productlistitle->setProductListTitle($this->data['productListTitle']);

		$this->children = array(
            'common/product_list_title',
        );

		$this->render('module/special_action');
	}

}
