This commit is contained in:
2026-03-10 21:37:24 +01:00
parent 5bce68c56b
commit 9d70ea0547
37 changed files with 1534 additions and 282 deletions

View File

@@ -6,6 +6,7 @@ if ( is_array( $this -> pages ) ) {
foreach ( $this -> pages as $page ) {
$url = "";
$hasChildren = is_array( $page['pages'] ) && !empty( $page['pages'] );
if ( $page['page_type'] == 3 ) {
$page['language']['link'] ? $url = $page['language']['link'] : $url = '#';
@@ -26,10 +27,10 @@ if ( is_array( $this -> pages ) ) {
if ( $page['id'] == $this -> current_page )
echo ' active';
if ( is_array( $page['pages'] ) and in_array( $this -> current_page, $children ) )
if ( $hasChildren and is_array( $children ) and in_array( $this -> current_page, $children ) )
echo ' open';
if ( is_array( $page['pages'] ) )
if ( $hasChildren )
echo ' parent';
echo '">';
@@ -40,16 +41,17 @@ if ( is_array( $this -> pages ) ) {
if ( $page['language']['noindex'] )
echo 'rel="nofollow"';
echo ' title="' . $page['language']['title'] . '"';
if ( is_array( $page['pages'] ) )
if ( $hasChildren )
echo "class='menu-trigger'";
echo '>';
echo $page['language']['title'];
echo '</a>';
if ( is_array( $page['pages'] ) )
if ( $hasChildren )
echo '<i class="fa fa-chevron-down menu-toggle" menu-id="link-' . $page['id'] . '"></i>';
echo \front\Views\Menu::pages( $page['pages'], $this -> level + 1, $this -> current_page );
if ( $hasChildren )
echo \front\Views\Menu::pages( $page['pages'], $this -> level + 1, $this -> current_page );
echo '</li>';
}
echo '</ul>';
}
?>
?>

View File

@@ -13,7 +13,14 @@
$basket_summary = \Domain\Basket\BasketCalculator::summaryPrice( $basket, $coupon ) + $transport_cost;
?>
<? if ( is_array( $this -> payment_methods ) ): foreach ( $this -> payment_methods as $payment_method ):?>
<? if ( $payment_method['id'] != 6 or $payment_method['id'] == 6 and $basket_summary >= 40 and $basket_summary <= 1000 ):?>
<?
$min = isset($payment_method['min_order_amount']) ? (float)$payment_method['min_order_amount'] : null;
$max = isset($payment_method['max_order_amount']) ? (float)$payment_method['max_order_amount'] : null;
$show = true;
if ($min !== null && $min > 0 && $basket_summary < $min) $show = false;
if ($max !== null && $max > 0 && $basket_summary > $max) $show = false;
?>
<? if ( $show ):?>
<div class="options">
<div class="check">
<input type="radio" class="icheck" name="payment_method" value="<?= $payment_method['id'];?>"

View File

@@ -52,6 +52,32 @@ if ( is_array( $this -> transports_methods ) )
</div>
<? endif;?>
<? endforeach; endif;?>
<?php if ( $this->free_delivery > 0 ): ?>
<?php
$percentage = min(100, ($this->basket_summary / $this->free_delivery) * 100);
$remaining = $this->free_delivery - $this->basket_summary;
?>
<div class="free-delivery-bar <?= $percentage >= 100 ? 'success' : '' ?>">
<div class="free-delivery-bar__icon">&#x1F69A;</div>
<div class="free-delivery-bar__content">
<?php if ($percentage >= 100): ?>
<div class="free-delivery-bar__text">Gratulacje! Masz darmow&#261; dostaw&#281;!</div>
<?php else: ?>
<div class="free-delivery-bar__text">
Zr&#243;b zakupy za <?= \Shared\Helpers\Helpers::decimal( $this->free_delivery, 2 );?> z&#322; i otrzymaj darmow&#261; dostaw&#281;
</div>
<?php endif; ?>
<div class="free-delivery-bar__progress">
<div class="free-delivery-bar__progress-fill" style="width: <?= $percentage ?>%"></div>
</div>
<?php if ($percentage < 100): ?>
<div class="free-delivery-bar__remaining">
Brakuje <strong><?= \Shared\Helpers\Helpers::decimal( $remaining, 2 );?> z&#322;</strong> do darmowej dostawy.
</div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<script class="footer" type="text/javascript">
$( function() {

View File

@@ -179,7 +179,7 @@
'id': <?= (int)$product['product_id'];?>,
'name': '<?= $product['name'];?>',
'quantity': <?= $product['quantity'];?>,
'price': <?= $product['price_brutto_promo'];?>
'price': <?= ((float)$product['price_brutto_promo'] > 0 && (float)$product['price_brutto_promo'] < (float)$product['price_brutto']) ? (float)$product['price_brutto_promo'] : (float)$product['price_brutto'];?>
}<? if ( $product != end( $this -> order['products'] ) ) echo ',';?>
<? endforeach;?>
]