<?php if (0 < $pager->getNbResults()): ?>
	<ul class="plus">
	<?php $products_displayed = 0 ?>
	<?php foreach($pager->getResults() as/*(KataoProduct)*/ $katao_product): ?>
		<?php $is_cartable = $katao_product->isCartable() && $sf_user->isAuthenticated() && $sf_user->hasCredential('member') ?>
		<?php $order_details = $is_cartable?$katao_product->getOrderDetails($sf_user->getActivePeriod()->getId(), $sf_user->getActiveNode()->getId()):'' ?>
		<?php

    $display = false;
if (!$url) {
    if (preg_match('/(?P<colis>\\d+) \\((?P<incomplet>\\d+) \/ (?P<minimum>\\d+)\\)/', $order_details, $matches)) {
        if (!empty($matches['incomplet']) && (int)$matches['incomplet'] != (int)$matches['minimum']) {
            $display = true;
        }
    }
} else {
    $display = true;
}
if ($display) {
    $products_displayed++;
}

?>
		<?php if ($display): ?>
		<li>
			<div class="image01">
				<div class="top"></div>
				<div class="center">
					<div><?php echo thumbnail_tag($katao_product->getRealPicture(), 77, 88, array('alt' => $katao_product->getName())) ?></div>
				</div>
				<div class="bottom"></div>
			</div>
			<div class="plus-add">
				<h3><?php echo $katao_product->getName() ?></h3>
				<p>Prix : <?php echo Utils::formatCurrencyEuro($katao_product->getTotalPriceWithTaxes()) ?> dont <?php echo $katao_product->getMaxSolAmountStr() ?></p>
			<?php if ($is_cartable): ?>
				<p>Commande : <?php echo $order_details ?></p>
			<?php endif ?>
				<a class="btn-plus" href="<?php echo $katao_product->getUrlDetails($katao_product_category, $katao_product_family) ?>">En savoir plus</a>
			<?php if ($is_cartable): ?>
				<div style="clear: both; padding-top: 15px">
					<div style="float: left; padding-right: 10px">
						<a href="javascript://" onclick="document.getElementById('quantity_<?php echo $katao_product->getId() ?>').value = Math.max(1, parseInt(document.getElementById('quantity_<?php echo $katao_product->getId() ?>').value) - 1)" title="Diminuer la quantité"><?php echo image_tag('minus.png', array('alt' => 'Diminuer la quantité', 'align' => 'top')) ?></a>
						<input type="text" name="quantity[<?php echo $katao_product->getId() ?>]" id="quantity_<?php echo $katao_product->getId() ?>" value="1" style="width: 20px; text-align: center;" />
						<a href="javascript://" onclick="document.getElementById('quantity_<?php echo $katao_product->getId() ?>').value = parseInt(document.getElementById('quantity_<?php echo $katao_product->getId() ?>').value) + 1" title="Augmenter la quantité"><?php echo image_tag('plus.png', array('alt' => 'Augmenter la quantité', 'align' => 'top')) ?></a>
					</div>
					<div style="float: left">
						<a class="btn-commander" href="javascript://" onclick="window.location = '<?php echo url_for('@katao_cart_add_js') ?>?product=<?php echo $katao_product->getUrlIdentifier() ?>&quantity='+document.getElementById('quantity_<?php echo $katao_product->getId() ?>').value;">Commander</a>
					</div>
				</div>
			<?php endif ?>
			</div>
		</li>
		<?php endif ?>
	<?php endforeach ?>
	</ul>
	<?php echo pager($pager, $url) ?>
	<?php if (!$url && 0 == $products_displayed): ?>
	<p><i>Tous les produits ont un colisage complet.</i></p>
	<?php endif ?>
<?php else: ?>
	<p><i>Aucun produit.</i></p>
<?php endif ?>