<script>
//<![CDATA[
	var listdeal{{ module }} = [];
//]]>
</script>
<div class="module {{ direction_class }} {{ class_suffix }}">
	
	<div class="head-title">

		<div class="modtitle">
			{% if disp_title_module %}
			<span class="head_name">{{ head_name }}</span>

			<div class="cslider-item-timer">
				<div class="product_time_maxprice"></div>
			</div>
			{% set maxPriceToDate ='' %}
			{% for product in list %}
				{% set maxPriceToDate =  product.specialPriceToDate  %}
				{% if maxPriceToDate < product.specialPriceToDate  %}
					{% set maxPriceToDate =  product.specialPriceToDate  %}
				{% endif %}
			{% endfor %}
			
			<script type="text/javascript">
				//<![CDATA[
				listdeal{{ module }}.push('product_time_maxprice|{{ maxPriceToDate }}')
				//]]> 
			</script>
			{% endif %}
			{% if pre_text != '' %}
				
					{{ pre_text }}
				
			{% endif %}
		</div>
		
	</div>
	<div class="modcontent">
		{% if list is defined and list %}
			{% set tag_id = 'so_deals_' ~ random() ~ "now"|date("mdYHis") %}
			{% set class_respl = 'preset00-'~nb_column0~' preset01-'~nb_column1~' preset02-'~nb_column2~' preset03-'~nb_column3~' preset04-'~nb_column4 %}
			{% set i = 0 %}
			{% set count_item = list|length %}
			{% if include_js == 'owlCarousel' %}
				{% include (config_theme~'/template/extension/module/so_deals/'~store_layout~'_carousel.twig') %}
			{% elseif include_js == 'slick' %}
				{{ include (config_theme~'/template/extension/module/so_deals/'~store_layout~'_slick.twig') }}
			{% else %}
				{{ '' }}
			{% endif %}
		{% else %}
			<div class="alert alert-info"><i class="fa fa-info-circle"></i> 
				{{ objlang.get('text_noitem') }}
				<button type="button" class="close" data-dismiss="alert">×</button>
			</div>
		{% endif %}
	</div>
	{% if post_text != '' %}
		<div class="form-group">
			{{ post_text }}
		</div>
	{% endif %}
</div>
