| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 
 | <div class="card-body ">
 
                    <form class="uk-form" method="post" action="" id="cart" name="cart">
                        <table class="uk-table">
                            <tr>
                                <th class="uk-text-center">Vignette</th>
                                <th class="uk-text-center">Index Photo</th>
                                <th class="uk-text-center">Référence Photo</th>
                                <th class="uk-text-center">Quantité </th>
                                <th class="uk-text-center">Prix Unitaire </th>
                                <th class="uk-text-center">Prix Total</th>
                            </tr>
<?php
                            if($nb_items>0)
                                {   
                                foreach($products as $product):
 
                                    $prix_total = ($product->salePrice * $_SESSION['panier'][$product->id]);
?>
                                    <tr>
                                        <td><img width="180" src=images/<?=$product->reference;?>></td>
                                        <td><?= $product->id;?></td>
                                        <td><?=$product->reference;?></td>
 
                                        <td><input class="quantity uk-input uk-form-width-small" type="number" min="0" name="panier[quantity][<?= $product->id;?>]" value="<?= $_SESSION['panier'][$product->id];?>" on click="document.forms['cart'].elements['panier[amount][<?= $product->id;?>]'].value = parseFloat(document.forms['cart'].elements['panier[quantity][<?= $product->id;?>]'].value) "></td>
 
 
 
                                        <td><input type="text" style="border: 0" readonly  id="price" class="price uk-input text-center" value="<?= number_format($product->salePrice, 2, ',', ' ') ;?>"></td>
 
 
                                        <td ><input type="text" style="border: 0" readonly   name="panier[amount][<?= $product->id;?>] text-center" value="<?= number_format($prix_total, 2, ',', ' ') ;?>"></td>
 
 
                                        <td><a class="confirmModal" href="index.php?p=carts.delete&id=<?=$product->id ;?>" ><img src="librairies/icones/delete.gif" width="25px"></a></td>
                                    </tr> 
                                <?php endforeach;?>
<?php                                
                                    } //Fin Nb Items
?>                                
                            </table>
                            <p><input type="submit" value ="Recalculer"></p>
                        </form>
<?php
                     }
?>           
 
    </div>    
</div> | 
Partager