Files
redline.com.pl/modules/inpostship/views/templates/front/mypackage.tpl
2024-11-11 18:46:54 +01:00

82 lines
3.5 KiB
Smarty

{extends file='customer/page.tpl'}
{block name='page_title'}
{l s='Moje przesyłki Inpost' mod='inpostship'}
{/block}
{block name='page_content'}
<div class="mypackage">
<p class="alert alert-info" style="font-size: 14px;">
Mój ulubiony paczkomat: <b>{$favouritePoint nofilter}</b><br /><br />
<a href="#" class="btn btn-secondary btn-xs" onclick="openModalMap({$id_customer});">{if empty($favouritePoint) || $favouritePoint == 'brak'}Dodaj ulubiony paczkomat{else}Zmień ulubiony paczkomat{/if}</a><br />
</p>
<br />
{if $packageList}
<table class="table">
<thead>
<tr>
<th>Lp.</th>
<th>Numer zamówienia</th>
<th>Numer paczki</th>
{* <th></th>*}
<th>Status</th>
<th>Historia</th>
<th>Data utworzenia</th>
</tr>
</thead>
<tbody>
{foreach $packageList as $item}
{if !empty($item.reference_number)}
<tr>
<td>{$item@iteration}.</td>
<td>{$item.order_reference}</td>
<td>{$item.reference_number}</td>
{* <td><a href="https://inpost.pl/sledzenie-przesylek?number={$item.reference_number}" target="_blank"><small>śledź przesyłkę</small></a></td>*}
<td><button type="button" class="showStatus btn btn-success btn-sm" data-packcode="{$item.packcode}" data-reference="{$item.reference_number}">sprawdź</button></td>
<td><button type="button" class="showHistory btn btn-warning btn-sm" data-packcode="{$item.packcode}" data-reference="{$item.reference_number}">sprawdź</button></td>
<td>{$item.date_add}</td>
</tr>
{/if}
{/foreach}
</tbody>
</table>
{else}
<p class="alert alert-warning">
Nie masz jeszcze wygenerowanych przesyłek z Inpost
</p>
{/if}
</div>
<script type="text/javascript" src="https://geowidget.easypack24.net/js/sdk-for-javascript.js"></script>
<link rel="stylesheet" href="https://geowidget.easypack24.net/css/easypack.css" />
<script type="text/javascript">
var ajaxTrackingLink = '{$ajaxTrackingLink}';
var ajaxTrackingHistoryLink = '{$ajaxTrackingHistoryLink}';
var pTypes = '{$pTypes}';
var mapBox = '{$map_box}';
var imap = '{$imap}';
var imgm = '{$imgm}';
var imw = '{$imw}';
var mapShow = '{$map_show}';
var baseDirShop = '{$baseDirShop}';
</script>
<div id="inpostship">
<div class="modal fade" id="modalTracking" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">Śledzenie przesyłek InPost</h4>
</div>
<div class="modal-body">
<div class="trackInfo"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{l s='Close' mod='inpostship'}</button>
</div>
</div>
</div>
</div>
</div>
{/block}