<commit_before>{% set discountDisplayed = false %}
{% for product in products %}
	{% if product.discount is not null %}
		{% if discountDisplayed == false %}
			<h2 class="text-centered">Promotions</h2>
			<div class="clearfix">
			{% set discountDisplayed = true %}
		{% endif %}
	<div class="product-item
				box
				box-light
				text-centered
				{% if loop.index is divisibleby(3) %}product-item-last{% endif %}
				tous
				{{product.category.slug}}
				{% if product.category.level > 0 %}{{product.category.parent.slug}}{% endif %}">

	{% if product.menuItems|length > 0 and product.discount|length == 0 %}
		<div class="ribbon ribbon-formule"></div>
	{% endif %}

	{% if product.discount|length > 0 %}
		<div class="ribbon ribbon-{{product.discount.discountName}}"></div>
	{% endif %}

		<div class="product-infos">

			<div class="product-details">
					<div class="product-name">
						<h4>{{product.name}}</h4>
					</div>
			</div>

			<div class="product-thumbnail">
				<a href="{{ path('view_product_details', {'shop_slug': product.shop.slug, 'category_slug': product.category.slug, 'product_slug': product.slug}) }}" class="img160x160">
					{% if product.hasImage %}
						<img src="{{product.getWebPath | apply_filter('my_thumb') }}"
						alt="{{product.name}}" title="{{product.name}}" >
					{% endif %}
				</a>
			</div>


		</div>

		<div class="product-toolbar row-fluid">

			<div class="product-price span6">
				{{product.price|number_format(2, ',', ' ')}} €
			</div>

			<div class="span6">
				<a onclick="_gaq.push(['_trackEvent', 'PRODUIT', 'view-product-details', {{ path('view_product_details', {'shop_slug': product.shop.slug, 'category_slug': product.category.slug, 'product_slug': product.slug}) }}]);" href="{{ path('view_product_details', {'shop_slug': product.shop.slug, 'category_slug': product.category.slug, 'product_slug': product.slug}) }}" class="btn-mini">Voir en détail</a>
			</div>

			<div class="span12">
				<form id="checkout" action="{{ path('cart_add_product', {'product_id': product.id}) }}" method="post" {{form_enctype(form[product.id])}}>
					{% if product.priceType == 'chunk_price' %}
						{{ form_widget(form[product.id].quantity, { 'attr': {'class': 'inline-quantity-person'} }) }}
					{% else %}
						<div id="quantity-minus" class="btn btn-mini left minus"><i class="icon-minus"></i></div>
						{{ form_widget(form[product.id].quantity, { 'attr': {'class': 'inline-quantity'} }) }}
						<div id="quantity-plus" class="btn btn-mini right plus"><i class="icon-plus"></i></div>
					{% endif %}
					<button class="btn btn-mini">Ajouter</button>
					{{ form_widget(form[product.id]._token) }}
				</form>
			</div>
		</div>

	</div>
	{% endif %}
{% endfor %}

{% if discountDisplayed == true %}
</div>

<hr style="background: #222222; height: 4px; margin-bottom: 52px;">
<div class="clearfix">
{% endif %}

{% for product in products %}
{% if product.discount is null %}

	<div class="product-item
				box
				box-light
				text-centered
				{% if loop.index is divisibleby(3) %}product-item-last{% endif %}
				tous
				{{product.category.slug}}
				{% if product.category.level > 0 %}{{product.category.parent.slug}}{% endif %}">

	{% if product.menuItems|length > 0 and product.discount|length == 0 %}
		<div class="ribbon ribbon-formule"></div>
	{% endif %}

	{% if product.discount|length > 0 %}
		<div class="ribbon ribbon-{{product.discount.discountName}}"></div>
	{% endif %}

		<div class="product-infos">

			<div class="product-details">
					<div class="product-name">
						<h4>{{product.name}}</h4>
					</div>
			</div>

			<div class="product-thumbnail">
				<a  href="{{ path('view_product_details', {'shop_slug': product.shop.slug, 'category_slug': product.category.slug, 'product_slug': product.slug}) }}" class="img160x160">
					{% if product.hasImage %}
						<img src="{{product.getWebPath | apply_filter('my_thumb') }}"
						alt="{{product.name}}" title="{{product.name}}" >
					{% endif %}
				</a>
			</div>


		</div>

		<div class="product-toolbar row-fluid">

			<div class="product-price span6">
				{{product.price|number_format(2, ',', ' ')}} €
			</div>

			<div class="span6">
				<a  href="{{ path('view_product_details', {'shop_slug': product.shop.slug, 'category_slug': product.category.slug, 'product_slug': product.slug}) }}" class="btn-mini">Voir en détail</a>
			</div>

			<div class="span12">
				<form id="checkout" action="{{ path('cart_add_product', {'product_id': product.id}) }}" method="post" {{form_enctype(form[product.id])}}>
					{% if product.priceType == 'chunk_price' %}
						{{ form_widget(form[product.id].quantity, { 'attr': {'class': 'inline-quantity-person'} }) }}
					{% else %}
						<div id="quantity-minus" class="btn btn-mini left minus"><i class="icon-minus"></i></div>
						{{ form_widget(form[product.id].quantity, { 'attr': {'class': 'inline-quantity'} }) }}
						<div id="quantity-plus" class="btn btn-mini right plus"><i class="icon-plus"></i></div>
					{% endif %}
					<button class="btn btn-mini" onclick="_kmq.push(['record', 'Added to cart', {'Shop name':'{{shop.name}}', 'Product name': '{{product.name}}', 'Product details':'false' }]);">Ajouter</button>
					{{ form_widget(form[product.id]._token) }}
				</form>
			</div>
		</div>

	</div>

{% if loop.index is divisibleby(3) %}
	</div><div class="clearfix">
{% endif %}

{% endif %}
{% endfor %}

</div>

<!-- Modal --><commit_msg>Reglage d'un petit bug daffichage<commit_after>{% set discountDisplayed = false %}
{% for product in products %}
	{% if product.discount is not null %}
		{% if discountDisplayed == false %}
			<h2 class="text-centered">Promotions</h2>
			<div class="clearfix">
			{% set discountDisplayed = true %}
		{% endif %}
	<div class="product-item
				box
				box-light
				text-centered
				{% if loop.index is divisibleby(3) %}product-item-last{% endif %}
				tous
				{{product.category.slug}}
				{% if product.category.level > 0 %}{{product.category.parent.slug}}{% endif %}">

	{% if product.menuItems|length > 0 and product.discount|length == 0 %}
		<div class="ribbon ribbon-formule"></div>
	{% endif %}

	{% if product.discount|length > 0 %}
		<div class="ribbon ribbon-{{product.discount.discountName}}"></div>
	{% endif %}

		<div class="product-infos">

			<div class="product-details">
					<div class="product-name">
						<h4>{{product.name}}</h4>
					</div>
			</div>

			<div class="product-thumbnail">
				<a href="{{ path('view_product_details', {'shop_slug': product.shop.slug, 'category_slug': product.category.slug, 'product_slug': product.slug}) }}" class="img160x160">
					{% if product.hasImage %}
						<img src="{{product.getWebPath | apply_filter('my_thumb') }}"
						alt="{{product.name}}" title="{{product.name}}" >
					{% endif %}
				</a>
			</div>


		</div>

		<div class="product-toolbar row-fluid">

			<div class="product-price span6">
				{{product.price|number_format(2, ',', ' ')}} €
			</div>

			<div class="span6">
				<a onclick="_gaq.push(['_trackEvent', 'PRODUIT', 'view-product-details', {{ path('view_product_details', {'shop_slug': product.shop.slug, 'category_slug': product.category.slug, 'product_slug': product.slug}) }}]);" href="{{ path('view_product_details', {'shop_slug': product.shop.slug, 'category_slug': product.category.slug, 'product_slug': product.slug}) }}" class="btn-mini">Voir en détail</a>
			</div>

			<div class="span12">
				<form id="checkout" action="{{ path('cart_add_product', {'product_id': product.id}) }}" method="post" {{form_enctype(form[product.id])}}>
					{% if product.priceType == 'chunk_price' %}
						{{ form_widget(form[product.id].quantity, { 'attr': {'class': 'inline-quantity-person'} }) }}
					{% else %}
						<div id="quantity-minus" class="btn btn-mini left minus"><i class="icon-minus"></i></div>
						{{ form_widget(form[product.id].quantity, { 'attr': {'class': 'inline-quantity'} }) }}
						<div id="quantity-plus" class="btn btn-mini right plus"><i class="icon-plus"></i></div>
					{% endif %}
					<button class="btn btn-mini">Ajouter</button>
					{{ form_widget(form[product.id]._token) }}
				</form>
			</div>
		</div>

	</div>
	{% endif %}
{% endfor %}

{% if discountDisplayed == true %}
</div>

<hr style="background: #222222; height: 4px; margin-bottom: 52px;">
<div class="clearfix">
{% endif %}

{% set i = 0 %}
{% for product in products %}
{% if product.discount is null %}
{% set i = i + 1 %}

	<div class="product-item
				box
				box-light
				text-centered
				{% if i is divisibleby(3) %}product-item-last{% endif %}
				tous
				{{product.category.slug}}
				{% if product.category.level > 0 %}{{product.category.parent.slug}}{% endif %}">

	{% if product.menuItems|length > 0 and product.discount|length == 0 %}
		<div class="ribbon ribbon-formule"></div>
	{% endif %}

	{% if product.discount|length > 0 %}
		<div class="ribbon ribbon-{{product.discount.discountName}}"></div>
	{% endif %}

		<div class="product-infos">

			<div class="product-details">
					<div class="product-name">
						<h4>{{product.name}}</h4>
					</div>
			</div>

			<div class="product-thumbnail">
				<a  href="{{ path('view_product_details', {'shop_slug': product.shop.slug, 'category_slug': product.category.slug, 'product_slug': product.slug}) }}" class="img160x160">
					{% if product.hasImage %}
						<img src="{{product.getWebPath | apply_filter('my_thumb') }}"
						alt="{{product.name}}" title="{{product.name}}" >
					{% endif %}
				</a>
			</div>


		</div>

		<div class="product-toolbar row-fluid">

			<div class="product-price span6">
				{{product.price|number_format(2, ',', ' ')}} €
			</div>

			<div class="span6">
				<a  href="{{ path('view_product_details', {'shop_slug': product.shop.slug, 'category_slug': product.category.slug, 'product_slug': product.slug}) }}" class="btn-mini">Voir en détail</a>
			</div>

			<div class="span12">
				<form id="checkout" action="{{ path('cart_add_product', {'product_id': product.id}) }}" method="post" {{form_enctype(form[product.id])}}>
					{% if product.priceType == 'chunk_price' %}
						{{ form_widget(form[product.id].quantity, { 'attr': {'class': 'inline-quantity-person'} }) }}
					{% else %}
						<div id="quantity-minus" class="btn btn-mini left minus"><i class="icon-minus"></i></div>
						{{ form_widget(form[product.id].quantity, { 'attr': {'class': 'inline-quantity'} }) }}
						<div id="quantity-plus" class="btn btn-mini right plus"><i class="icon-plus"></i></div>
					{% endif %}
					<button class="btn btn-mini" onclick="_kmq.push(['record', 'Added to cart', {'Shop name':'{{shop.name}}', 'Product name': '{{product.name}}', 'Product details':'false' }]);">Ajouter</button>
					{{ form_widget(form[product.id]._token) }}
				</form>
			</div>
		</div>

	</div>

{% if i is divisibleby(3) %}
	</div><div class="clearfix">
{% endif %}

{% endif %}
{% endfor %}

</div>

<!-- Modal -->
{'fraction_non_alphanumeric': 0.2169932246841238, 'fraction_numerical': 0.008972715619849844, 'mean_word_length': 3.9402985074626864, 'pattern_counts': {'":': 0, '<': 187, '<?xml version=': 0, '>': 199, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6079201', 'n_tokens_mistral': 4553, 'n_tokens_neox': 3686, 'n_words': 717}