first commit

This commit is contained in:
2025-03-12 17:06:23 +01:00
commit 2241f7131f
13185 changed files with 1692479 additions and 0 deletions

View File

@@ -0,0 +1,200 @@
{set layout="one_column"}
<div id="shopping-cart" class="order-control">
<div class="title">
<h1>{__ text="Koszyk"}</h1>
</div>
<a href="{$return_url}" id="basket-back-button" class="btn btn-default hidden-xs">
<span class="arrow_right">{__ text="Kontynuuj zakupy"}</span>
</a>
{if $if_warning || $if_notice}
<div class="alert alert-danger" role="alert">{$show_warning}</div>
{/if}
{if $products}
{slot name="basket-before-items" hidden="true"}{/slot}
<div class="items">
{$product_list}
</div>
{slot name="basket-after-items" hidden="true"}{/slot}
<div id="basket-box" class="row" data-equalizer>
<div id="shopping-cart-delivery" class="col-sm-4">{$delivery}</div>
<div id="shopping-cart-payment" class="col-sm-4">{$payment}</div>
<div id="shopping-cart-summary" class="col-sm-4">{$total}</div>
</div>
<div id="gift-group-container">
{st_get_component module="stGiftGroup" component="show" limit="4" overlay=true}
</div>
<div class="row" data-equalizer >
<div class="col-sm-8">
<div class="panel panel-default" >
<div class="panel-body">
<textarea id="order_description_text" placeholder='{__ text="Uwagi do zamówienia"}' class="form-control" rows="1" >{$description}</textarea>
</div>
</div>
</div>
</div>
{$trusted_shops}
{$socket_above_user_form}
{$user_form}
{else}
<div class="empty-basket text-center">
<img class="hidden-xs" src="{image_path image='basket/empty_basket.png'}" alt="" />
<h3>{__ text="Twój koszyk jest pusty"}</h3>
<a href="{$return_url}" class="btn btn-primary" >
{__ text="Kontynuuj zakupy"}
</a>
</div>
{/if}
</div>
<div class="modal fade modal-vertical-centered" id="basket-update-modal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<h3 class="text-center">{__ text="Koszyk"}</h3>
<p class="text-center">{__ text="Twój koszyk jest aktualizowany. Proszę czekać."}</p>
<div class="preloader"></div>
</div>
</div>
</div>
</div>
<div id="delivery-modal" class="modal fade" tabindex="-1" role="dialog" data-action="{urlfor internal='@stDeliveryFrontend?action=choosePickupPoint'}">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content relative">
<div class="preloader absolute"></div>
<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"></h4>
</div>
<div class="modal-body">
<div class="modal-body-content"></div>
</div>
</div>
</div>
</div>
<div id="delivery-message-modal" class="modal fade" tabindex="-1" role="dialog" data-show-error="{$sf_request->getError('delivery_error')}">
<div class="modal-dialog dialog-sm" 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"></h4>
</div>
<div class="modal-body text-center"></div>
<div class="modal-footer">
<div class="text-center">
<button type="button" class="btn btn-default" data-dismiss="modal">{__ text="Zamknij"}</button>
</div>
</div>
</div>
</div>
</div>
{if $sf_request->hasParameter('session_expired')}
<div class="modal fade modal-vertical-centered" id="basket-session-modal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false" data-show="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<h3 class="text-center">{__ text="Twoja sesja wygasła"}</h3>
<p class="text-center">{__ text="Przykro nam, ale Twoja sesja wygasła.<br>Powtórz operacje, aby dokończyć proces zamówienia."}</p>
<button class="btn btn-default" data-dismiss="modal">{__ text="OK"}</button>
</div>
</div>
</div>
</div>
{/if}
{literal}
<script type="text/javascript">
//<![CDATA[
jQuery(function($) {
var forms = $('#shopping-cart-delivery, #shopping-cart-payment');
$('#basket-session-modal').modal();
function updateDelivery(event, includeDeliveryCountry) {
const form = $(this);
const fieldset = forms.find('fieldset');
fieldset.attr('disabled', true);
$(document).trigger('delivery.update.started');
let billing = $('#user_data_billing_country, #billing-country').val();
let clientType = $('input[name="user_data_billing[customer_type]"]:checked').val();
let payload = form.serialize()+'&billing_country='+billing+'&client_type='+clientType;
if (includeDeliveryCountry) {
let delivery = $('#user_data_delivery_country, #delivery-country').val();
payload += '&delivery[country]=' + delivery;
}
$.get(form.attr('action'), payload, function() {
fieldset.removeAttr('disabled');
$(document).trigger('delivery.update.finished');
});
return false;
}
forms.on('change', 'select,input[type="radio"],input[type="checkbox"]', function() {
const el = $(this);
if (el.is('#delivery-country') && !el.data('ignore-billing-update') && !$('#different_delivery').prop('checked')) {
$('#user_data_billing_country, #billing-country').val(el.val());
}
el.data('ignore-billing-update', false);
if (el.is('.payment-radio')) {
$('#payment_channel').val(el.data('channel') ? JSON.stringify(el.data('channel')) : '');
}
$(this.form).submit();
});
forms.on('submit', 'form', updateDelivery);
$("#order_description_text").click(function() {
$(this).css('height', '147px');
});
$(document).ready(function() {
$('#order_form_billing').on('change', 'input[name="user_data_billing[customer_type]"], #user_data_billing_country, #billing-country', function() {
updateDelivery.call(forms.filter('#shopping-cart-delivery').find('form'));
});
$('#toTop, #phone-call').remove();
}).on("delivery.update.started", function() {
$('#basket-update-modal').modal('show');
}).on("delivery.update.finished", function() {
setTimeout(function() {
$('#basket-update-modal').modal('hide');
}, 500);
}).on('delivery.update', function(e, includeDeliveryCountry) {
updateDelivery.call(forms.filter('#shopping-cart-delivery').find('form'), includeDeliveryCountry);
});
$('#shopping-cart [data-toggle=tooltip]').tooltip().on('show.bs.tooltip', function(e) {
var target = $(e.target);
if (target.hasClass('product-option-label')) {
var maxWidth = target.css('max-width');
target.css({ 'max-width': 'none' });
var width = target.width();
target.css({ 'max-width': maxWidth });
return width > target.width();
}
return true;
});
});
//]]>
</script>
{/literal}

View File

@@ -0,0 +1,4 @@
{$attributes}
<div id="st_button-basket-{$product_id}" class="buttons">
<span>{__ text="Dodaj do koszyka"}</span>
</div>

View File

@@ -0,0 +1,3 @@
<div id="st_button-basket-{$product_id}" >
{$basket_add_enable}
</div>

View File

@@ -0,0 +1,15 @@
<div id="st_component-st_basket-add_enable">
<form action="{$form_action}" method="post" id="st_basket-add-to-basket-form">
{$attributes}
<div id="st_basket-add-button" class="buttons">
<div id="st_basket-add-button-content" class="roundies">
{$submit_button}
{if $quantity_field}
<div id="st_basket-add-quantity_container">{$quantity_field}
</div>
{/if}
<img src="{image_path image='/buttons/basket.png'}" alt=""/>
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,3 @@
<span id="st_icon-basket-{$product_id}" class="st_icon-basket-disabled">
{$basket_add_simple_disabled}
</span>

View File

@@ -0,0 +1,3 @@
<span id="st_icon-basket-{$product_id}" class="st_icon-basket-enabled">
{$basket_add_simple_enabled}
</span>

View File

@@ -0,0 +1,94 @@
{assign var=update value=false}
<div id="shopping-cart-product-preview" class="modal fade" role="dialog" aria-labelledby="{__ text='Produkt został dodany do koszyka'}" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">{__ text="Produkt został dodany do koszyka"}</h4>
</div>
<div class="modal-body">
<div class="shopping-cart">
{foreach item=product from=$products}
{if $product.quantity > 0}
{assign var=update value=true}
{/if}
<div class="item clearfix">
<div class="col-xs-2">
<a href="{$product.url}" class="image pull-left">
<img class="img-rounded" src="{$product.image}" alt="{$product.name}" />
</a>
</div>
<div class="col-xs-10">
<div class="name">
<a href="{$product.url}">{$product.name}</a>
</div>
{if $product.instance->hasPriceModifiers()}
{foreach item=modifier from=$product.instance->getPriceModifiers()}
{if $modifier.custom.field}
<span class="label label-default product-option-label" title="{$modifier.custom.field|escape:'html'}: {$modifier.label|escape:'html'}" data-toggle="tooltip">{$modifier.custom.field}: {$modifier.label}</span>
{else}
<span class="label label-default product-option-label" title="{$modifier.custom.field|escape:'html'}: {$modifier.label|escape:'html'}" data-toggle="tooltip">{$modifier.label}</span>
{/if}
{/foreach}
{/if}
<div class="price">
{if $product.error}
<span class="has-error glyphicon glyphicon-exclamation-sign" data-toggle="tooltip" data-placement="top" title="{$product.error}"></span>
{/if}
{$product.quantity} x {$product.price|st_currency_format}
{if $show_netto == 1}
({$product.instance->getPriceNetto(true)|st_currency_format} {__ text="netto"})
{/if}
</div>
</div>
</div>
{/foreach}
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">{__ text="Kontynuuj zakupy"}</button>
<a class="btn btn-primary" href="{$basket_url}">{__ text="Zamów"}</a>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
{slot name="basket-ajax-added-product-preview" hidden="true"}{/slot}
{literal}
<script type="text/javascript">
//<![CDATA[
jQuery(function() {
var shoppingCartProductPreview = $('#shopping-cart-product-preview');
shoppingCartProductPreview .modal().on('hidden.bs.modal', function() {
$(this).remove();
});
shoppingCartProductPreview.find('[data-toggle=tooltip]').tooltip().on('show.bs.tooltip', function(e) {
var target = $(e.target);
if (target.hasClass('product-option-label')) {
var maxWidth = target.css('max-width');
target.css({ 'max-width': 'none' });
var width = target.width();
target.css({ 'max-width': maxWidth });
return width > target.width();
}
return true;
});
});
//]]>
</script>
{/literal}
{if $update}
{literal}
<script type="text/javascript">
//<![CDATA[
jQuery(function() {
$('#nav-shopping-cart').html('{/literal}{$basket_show_component}{literal}');
});
//]]>
</script>
{/literal}
{/if}

View File

@@ -0,0 +1,6 @@
<div class="st_button-basket-enabled" id="st_component-st_basket-add_info_enable">
{$start_form}
{$basket_info_enabled2}
{__ text="Ilość"}: {$basket_info_enabled} {__ text="szt"}.
</form>
</div>

View File

@@ -0,0 +1,19 @@
<div id="st_component-st_basket-basket_preview">
<div id="st_component-basket-content" class="st_content">
<ul>
<li id="st_icon_basket" {$get_tooltip}>
{$icon_basket}
</li>
<li id="st_sum">
{$num}
</li>
<li {$get_tooltip}>
{$amount_product}
</li>
<li>
{$currency}
</li>
</ul>
{$basket_add}
</div>
</div>

View File

@@ -0,0 +1,121 @@
<form action="{url_for internal=@stBasket}" method="post">
<table class="table">
<thead>
<tr>
{if $show_photo_in_basket}
<th class="product-image">&nbsp;</th>
{/if}
{if $show_code_in_basket}
<th class="product-code ">{__ text="kod"}</th>
{/if}
<th class="product-name">{__ text="nazwa"}</th>
{if $show_discount_in_basket}
<th class="product-discount">{__ text="rabat"}</th>
{/if}
{if $show_netto_in_basket}
<th class="product-net text-right">{__ text="netto"}</th>
{/if}
{if $show_tax_in_basket}
<th class="product-tax text-right">{__ text="vat"}</th>
{/if}
<th class="product-gross text-right">{__ text="brutto"}</th>
<th class="product-quantity text-center">{__ text="ilość"}</th>
{if $show_uom_in_basket}
<th class="product-uom text-right">{__ text="j.m."}</th>
{/if}
<th class="product-total text-right">{__ text="suma"}</th>
<th class="product-action-new">
<a href="{$clear_url}" class="pull-right hidden-xs" aria-label="{__ text='Wyczyść zawartość koszyka'}">
<span class="glyphicon glyphicon-trash"></span>
</a>
</th>
</tr>
</thead>
<tbody>
{foreach key=row item=product from=$results}
{if $product.if_form_error}
<tr>
<td colspan="11" style="padding: 0; margin: 0"><div class="bg-danger">{$product.error_show}</div></td>
</tr>
{/if}
{slot name="basket-before-item-row" hidden="true" product=$product.instance}{/slot}
<tr>
{if $show.photo}
<td class="product-image" data-th="{__ text='zdjęcie'}">
{if $product.url}
<a href="{$product.url}">
<img class="img-responsive" src="{$product.photo}" alt="{$product.name}" />
</a>
{else}
<img class="img-responsive" src="{$product.photo}" alt="{$product.name}" />
{/if}
<a class="visible-xs primary btn-delete" href="{$product.delete_url}" aria-label="{__ text='Usuń produkt z koszyka'}">{__ text="usuń"}</a>
</td>
{/if}
{if $show.code}
<td class="mobile product-code" data-th="{__ text='kod'}"> {$product.code}</td>
{/if}
<td class="product-name" data-th="{__ text='nazwa'}">
{if $product.url}
<a href="{$product.url}">
{$product.name}
</a>
{else}
{$product.name}
{/if}
{if $product.instance->hasPriceModifiers()}
<div class="options">
{foreach item=modifier from=$product.instance->getPriceModifiers()}
{if $modifier.custom.field}
<span class="label label-default product-option-label" title="{$modifier.custom.field|escape:'html'}: {$modifier.label|escape:'html'}" data-toggle="tooltip" data-placement="top">{$modifier.custom.field}: {$modifier.label}</span>
{else}
<span class="label label-default product-option-label" title="{$modifier.custom.field|escape:'html'}: {$modifier.label|escape:'html'}" data-toggle="tooltip" data-placement="top">{$modifier.label}</span>
{/if}
{/foreach}
</div>
{/if}
</td>
{if $show.discount}
<td class="product-discount text-nowrap mobile" data-th="{__ text='rabat'}"> {$product.discount}%</td>
{/if}
{if $show.netto}
<td class="product-net text-nowrap price mobile" data-th="{__ text='netto'}"> {$product.price_netto}</td>
{/if}
{if $show.tax}
<td class="mobile product-tax text-nowrap mobile" data-th="{__ text='vat'}"> {$product.tax}</td>
{/if}
<td class="product-gross text-nowrap price mobile" data-th="{__ text='brutto'}"> {$product.price_brutto}</td>
<td class="product-quantity text-center" data-th="{__ text='ilość'}">
{$product.num}
{if $show.uom}
<div class="product-uom visible-xs" data-th="{__ text='j.m.'}"> {$product.uom}</div>
{/if}
<button type="submit" class="btn btn-default btn-xs" aria-label="{__ text='Aktualizuj ilość'}">
<span class="glyphicon glyphicon-refresh"></span>
</button>
</td>
{if $show.uom}
<td class="product-uom hidden-xs" data-th="{__ text='j.m.'}"> {$product.uom}</td>
{/if}
<td class="product-total text-nowrap hidden-xs" data-th="{__ text='suma'}"> {$product.total_amount}</td>
<td class="product-action-new hidden-xs">
<a class="primary btn-delete" href="{$product.delete_url}" aria-label="{__ text='Usuń produkt z koszyka'}">
<span><img src="{image_path image='delete.png'}" height="14" width="14" alt="delete" /></span>
</a>
</td>
</tr>
{slot name="basket-after-item-row" hidden="true" parameters="product, show"}{/slot}
{/foreach}
{if $vat_eu}
<tr class="bottom-tab">
<td class="clearfix" colspan="11">
<div id="st_basket_vat_eu" class="pull-right">
{$vat_eu}
</div>
</td>
</tr>
{/if}
</tbody>
</table>
</form>

View File

@@ -0,0 +1,75 @@
<div class="shopping-cart clearfix">
{if $items}
<div class="clearfix">
{assign var='i' value=0}
{foreach item=item from=$items}
{assign var='i' value=$i+1}
{if $i < 5}
<div class="item clearfix">
<div class="col-xs-2 item-image-col">
<a href="{$item.url}" class="image">
<img class="img-rounded" src="{$item.image}" alt="{$item.name}" />
</a>
</div>
<div class="col-xs-10 item-content-col">
<div class="name">
<a href="{$item.url}">{$item.name}</a>
</div>
{if $item.price_modifiers}
<div class="options">
{foreach item=modifier from=$item.price_modifiers}
{if $modifier.custom.field}
<span class="label label-default product-option-label" title="{$modifier.custom.field|escape:'html'}: {$modifier.label|escape:'html'}" data-toggle="tooltip" data-placement="bottom">{$modifier.custom.field}: {$modifier.label}</span>
{else}
<span class="label label-default product-option-label" title="{$modifier.custom.field|escape:'html'}: {$modifier.label|escape:'html'}" data-toggle="tooltip" data-placement="bottom">{$modifier.label}</span>
{/if}
{/foreach}
</div>
{/if}
<div class="price">{$item.quantity} x {$item.price}</div>
<a class="close-icon" href="{$item.delete_url}" aria-label="{__ text='usuń'}"></a>
</div>
</div>
{slot name="basket-widget-after-item-row" hidden="true" parameters="item"}{/slot}
{elseif $i == 5}
<a href="{$url}" class="btn btn-default">{__ text="Zobacz wszystkie" langCatalogue="stOrder"}</a>
{/if}
{/foreach}
</div>
<div class="clearfix basket-show-summary">
<div class="basket-show-total">
{__ text="Razem do zapłaty"}: <b>{$basket_summary}</b>
</div>
<a class="btn btn-primary" href="{$url}">{__ text="Zamów"}</a>
</div>
{else}
<div class="text-right">{__ text="Twój koszyk jest pusty"}</div>
{/if}
</div>
{literal}
<script type="text/javascript">
//<![CDATA[
jQuery(function($) {
var quantity = {/literal}{$total_quantity}{literal};
$("#nav-button-shopping-cart .quantity").html(quantity ? quantity : "");
$('#nav-shopping-cart [data-toggle=tooltip]').tooltip().on('show.bs.tooltip', function(e) {
var target = $(e.target);
if (target.hasClass('product-option-label')) {
var maxWidth = target.css('max-width');
target.css({ 'max-width': 'none' });
var width = target.width();
target.css({ 'max-width': maxWidth });
return width > target.width();
}
return true;
});
if (quantity > 0) {
$("#nav-button-shopping-cart.empty").removeClass('empty');
};
});
//]]>
</script>
{/literal}

View File

@@ -0,0 +1,8 @@
<div id="st_component-st_basket-sumary_info">
{if $value}
{$value}
{else}
{__ text="Razem do zapłaty"}: <strong>{$total_amount}</strong>
{/if}
</div>