Files
bilety.brzezovka.pl/templates/admin-panel/order-data-table.php
2025-04-30 23:59:49 +02:00

49 lines
1.2 KiB
PHP

<?php
$orderData = $this->order_tickets;
?>
<table>
<tr>
<th>
<h3>BILETY</h3>
</th>
<th>
<h3>TERMIN</h3>
</th>
<th>
<h3>CENA</h3>
</th>
<th>
<h3>WARTOŚĆ</h3>
</th>
<th>
<h3>ZMIENIĆ ILOŚĆ</h3>
</th>
<th>
<h3>USUŃ</h3>
</th>
</tr>
<?php foreach ($orderData as $key => $value) : ?>
<tr>
<td><?= $value['name']; ?> ( x <?= $value["quantity"]; ?>)</td>
<td><?= $value['date_visit'] ? date('d/m/Y', strtotime($value['date_visit'])) : ''; ?></td>
<td><?= $value['price']; ?> zł</td>
<td><?= $value['price'] * $value["quantity"]; ?> zł</td>
<td>
<? if ( $value['product_id'] != 0 and $value['product_id'] != 999999 ) : ?>
<button class="btn_t1 add" ticket_id="<?= $key; ?>">
<i class="fa-solid fa-plus"></i>
</button>
<button class="btn_t1 subtract" ticket_id="<?= $key; ?>">
<i class="fa-solid fa-minus"></i>
</button>
<? endif;?>
</td>
<td>
<button class="btn_t1 delete" ticket_id="<?= $key; ?>">
<i class="fa-solid fa-trash-can"></i>
</button>
</td>
</tr>
<?php endforeach; ?>
</table>