This commit is contained in:
2024-11-16 10:57:09 +01:00
parent 144df6abf5
commit f419f693e4
15 changed files with 78 additions and 50 deletions

View File

@@ -36,23 +36,19 @@ if ( is_array( $this -> transports_methods ) )
<? if ( $transport_method['id'] == 1 or $transport_method['id'] == 2 ):?>
<div class="inpost-info inpost-info-<?= $transport_method['id'];?>">
<? if ( $transport_method['id'] == $this -> transport_id ):?><?= \S::get_session( 'basket-inpost-info' );?>
<? if ( \S::get_session( 'basket-inpost-info' ) ):?>
<a href="#" onclick="inpost_map( <?= $transport_method['id'];?> ); return false;"><?= \S::lang( 'zmien' );?></a>
<? else:?>
<a href="#" onclick="inpost_map( <?= $transport_method['id'];?> ); return false;"><?= \S::lang( 'wybierz' );?></a>
<? endif;?>
<a href="#" onclick="inpost_map( <?= $transport_method['id'];?> ); return false;"><?= \S::lang( 'wybierz' );?></a>
<? endif;?>
</div>
<? endif;?>
<? if ( $transport_method['id'] == 9 ):?>
<div class="orlen-info orlen-info-<?= $transport_method['id'];?>">
<input type="hidden" name="orlen_point_id" id="orlen_point_id" value="<?= \S::get_session( 'basket_orlen_point_id' );?>">
<span id="orlen_point_info" <? if ( \S::get_session( 'basket-transport-method-id' ) != 9 ):?>style="display: none;" <? endif;?>><?= \S::get_session( 'basket_orlen_point_info' );?></span>
<? if ( \S::get_session( 'basket_orlen_point_info' ) ):?>
<a href="#" class="orlen-widget" data-target="#orlen_point_id" data-label="#orlen_point_info" data-type="all" data-layout="tabs" onclick="return false;"><?= \S::lang( 'zmien' );?></a>
<? else:?>
<a href="#" class="orlen-widget" data-target="#orlen_point_id" data-label="#orlen_point_info" data-type="all" data-layout="tabs" onclick="return false;"><?= \S::lang( 'wybierz' );?></a>
<? endif;?>
<?
if ( \S::get_session( 'basket-transport-method-id' ) != 9 )
$class = 'hidden';
?>
<span id="orlen_point_info" class="<?= $class;?>"><?= \S::get_session( 'basket_orlen_point_info' );?></span>
<a href="#" class="orlen-widget <?= $class;?>" data-target="#orlen_point_id" data-label="#orlen_point_info" data-type="all" data-layout="tabs" onclick="return false;"><?= \S::lang( 'wybierz' );?></a>
</div>
<? endif;?>
<? endforeach; endif;?>

View File

@@ -1,3 +1,4 @@
<? global $settings; ?>
<div id="basket-container">
<div id="content">
<?= $this->basket_details; ?>
@@ -40,7 +41,7 @@
j.async = true;
j.src = e + 'widget.js?token=' + n + '&v=1.0.0&t=' + Math.floor(new Date().getTime() / 1000);
f.insertBefore(j, f.firstChild);
})(window, document, 'orlenpaczka', 'https://mapa.orlenpaczka.pl/', '0e365de8e228096aaf033ca8e43db5603132d8d5659788dbcb4bd936c852753e51b5382036641163788c1644ea631564f90a445402cd756ed40b491d');
})(window, document, 'orlenpaczka', 'https://mapa.orlenpaczka.pl/', '<?= $settings['orlen_paczka_map_token'];?>');
</script>
<link class="footer" rel="stylesheet" type="text/css" href="/libraries/grid/plugins/icheck/skins/square/_all.css">
<link class="footer" rel="stylesheet" type="text/css" href="https://geowidget.easypack24.net/css/easypack.css">
@@ -164,17 +165,17 @@
success: function(response) {}
});
$( '#orlen_point_id' ).val( '' );
$( '#orlen_point_info' ).html( '' );
$( '.orlen-widget' ).hide();
$( '#orlen_point_info' ).addClass( 'hidden' );
$( '.orlen-widget' ).addClass( 'hidden' );
inpost_map( transport_method_id )
}
if ( event_click && transport_method_id == '9' )
{
$( '.inpost-info' ).html( '' );
$( '#orlen_point_info' ).show();
$( '#orlen_point_info' ).removeClass( 'hidden' );
$( '.orlen-widget' ).removeClass( 'hidden' );
document.querySelectorAll('.orlen-widget').forEach(function(element) {
element.style.display = 'inline-block'; // Ustawia widoczność elementu
element.click(); // Wywołuje kliknięcie na elemencie
});
}
@@ -198,7 +199,7 @@
{
$( '#orlen_point_id' ).val( '' );
$( '#orlen_point_info' ).html( '' );
$( '.orlen-widget' ).hide();
$( '.orlen-widget' ).addClass( 'hidden' );
}
}
});
@@ -242,10 +243,10 @@
$.alert({
title: '<?= ucfirst(\S::lang('uwaga')); ?>',
content: 'Proszę wybrać punkt odbioru.',
content: 'Proszę wybrać punkt odbioru',
type: 'blue',
closeIcon: true,
closeIconClass: 'fas fa-times',
closeIconClass: 'fa fa-times',
typeAnimated: true,
animation: 'opacity',
useBootstrap: false,