first commit
This commit is contained in:
19
templates/tickets/basket-summary.php
Normal file
19
templates/tickets/basket-summary.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="basket_summary__wrapper">
|
||||
<h2>Suma:</h2>
|
||||
<?php
|
||||
$finalPrice = 0;
|
||||
foreach ( $this -> cart as $data => $value )
|
||||
{
|
||||
foreach ( $value as $key => $val )
|
||||
{
|
||||
$price = $val['ticket_price'];
|
||||
$quantity = $val['quantity'];
|
||||
|
||||
$finalPrice += $price * $quantity;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<p><?= $finalPrice; ?> zł</p>
|
||||
|
||||
<button class="buy-btn" type="submit">Płacę</button>
|
||||
</div>
|
||||
Reference in New Issue
Block a user