This commit is contained in:
Roman Pyrih
2025-08-01 14:32:59 +02:00
parent 036afcbc74
commit f5a468393a
9 changed files with 307 additions and 29 deletions

View File

@@ -1,10 +1,4 @@
<? if ($this->cart) : ?>
<div class="shopping-cart shopping-cart--active">
<?php else : ?>
<div class="shopping-cart ">
<?php endif; ?>
<div class="shopping-cart <?= $this->cart ? '' : "hide" ?>">
<div class="basket">
<i class="fa-solid fa-ticket"></i>
</div>
@@ -14,12 +8,15 @@
<ul class="tickets__list">
<?
$summary = 0;
$tickets = 0;
foreach ( $this -> cart as $data => $value )
{
foreach ( $value as $key => $val )
{
$summary_ticket = $val['ticket_price'] * $val['quantity'];
$summary += $summary_ticket;
$tickets = $tickets + $val['quantity'];
$ticket_box = '
<li class="ticket">
@@ -68,4 +65,12 @@
</div>
<a href="/tickets/basket_view/" class="buy-btn">Kup teraz</a>
<button class="off-btn">x</button>
</div>
</div>
<input type="hidden" name="tickets" value="<?= $tickets ?>">
<!-- <div class="mobile-cart-btn">
<span><?php echo $tickets; ?></span>
<div class="mobile-cart-btn--img">
<img src="/layout/images/shopping-basket.svg" alt="">
</div>
</div> -->