<?php foreach ($sf_user->getAttribute('cart') as $product_id => $quantity): ?>
<div>
<?php for ($i = 1; $i <= $quantity; $i++): ?>
<?php echo image_tag('product'.$product_id, array(
'class' => 'cart-items',
'id' => 'item_'.$product_id.'_'.$i,
'style' => 'position:relative'
)) ?>
<?php endfor; ?>
(<?php echo $quantity ?> <?php echo $products[$product_id] ?>)
</div>
<?php endforeach; ?>
<?php if (!$sf_user->getAttribute('cart')): ?>
nothing yet in your shopping cart.
<?php endif; ?>