Save
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{if $product_combinations}
|
||||
<div id="pdproductattributeslist" class="products">
|
||||
<div id="pdproductattributeslist" class="products 2">
|
||||
|
||||
{if $block_heading}
|
||||
<h3 class="idTabHrefShort page-product-heading">{l s='Select product combination' mod='pdproductattributeslist'}</h3>
|
||||
@@ -71,12 +71,12 @@
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
<td data-column="{l s='Quantity on stock' mod='pdproductattributeslist'}" class="option_price">
|
||||
<td data-column="{l s='Quantity on stock' mod='pdproductattributeslist'}" class="option_price _price">
|
||||
<b>{if $combination.quantity <= 10 }{$combination.quantity}{else}>10{/if}</b> {l s='pcs' mod='pdproductattributeslist'}
|
||||
</td>
|
||||
|
||||
|
||||
<td data-column="{l s='Product variant' mod='pdproductattributeslist'}" class="option_variant">
|
||||
<td data-column="{l s='Product variant' mod='pdproductattributeslist'}" class="option_variant _variant">
|
||||
{$combination.attribute_name_html nofilter}
|
||||
</td>
|
||||
|
||||
@@ -117,13 +117,20 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
const val = parseInt(input.value, 10) || 0;
|
||||
const existing = td.querySelector('.alert-max-exceeded');
|
||||
|
||||
const _lang = document.querySelector('html').getAttribute('lang');
|
||||
|
||||
if (val > max) {
|
||||
if (!existing) {
|
||||
const msg = document.createElement('div');
|
||||
msg.className = 'alert-max-exceeded text-danger';
|
||||
msg.style.marginTop = '4px';
|
||||
msg.style.fontSize = '0.9em';
|
||||
msg.innerHTML = 'Przekroczono stan,<br>braki trafią do back order.';
|
||||
if(_lang == 'pl') {
|
||||
msg.innerHTML = 'Przekroczono stan,<br>braki trafią do back order.';
|
||||
} else {
|
||||
msg.innerHTML = 'Stock exceeded,<br>shortages will go to back order.';
|
||||
}
|
||||
|
||||
td.querySelector('.product-quantity')
|
||||
.insertAdjacentElement('afterend', msg);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
{if $product_combinations}
|
||||
<div id="pdproductattributeslist" class="products">
|
||||
<div id="pdproductattributeslist" class="products 1">
|
||||
{if $block_heading}
|
||||
<h3 class="idTabHrefShort page-product-heading">{l s='Select product combination' mod='pdproductattributeslist'}</h3>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user