From cebb51f4c2ecf191bf95c8527b0f52c1ea5962d9 Mon Sep 17 00:00:00 2001 From: Roman Pyrih Date: Fri, 13 Jun 2025 09:23:49 +0200 Subject: [PATCH] Save --- .../hook/hookDisplayCustomAttributesListTable.tpl | 15 +++++++++++---- .../hook/hookDisplayProductTabContent.tpl | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/pdproductattributeslist/views/templates/hook/hookDisplayCustomAttributesListTable.tpl b/modules/pdproductattributeslist/views/templates/hook/hookDisplayCustomAttributesListTable.tpl index ca9f2c0e..2fd2a41a 100644 --- a/modules/pdproductattributeslist/views/templates/hook/hookDisplayCustomAttributesListTable.tpl +++ b/modules/pdproductattributeslist/views/templates/hook/hookDisplayCustomAttributesListTable.tpl @@ -1,5 +1,5 @@ {if $product_combinations} -
+
{if $block_heading}

{l s='Select product combination' mod='pdproductattributeslist'}

@@ -71,12 +71,12 @@ {/if} - + {if $combination.quantity <= 10 }{$combination.quantity}{else}>10{/if} {l s='pcs' mod='pdproductattributeslist'} - + {$combination.attribute_name_html nofilter} @@ -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,
braki trafiÄ… do back order.'; + if(_lang == 'pl') { + msg.innerHTML = 'Przekroczono stan,
braki trafiÄ… do back order.'; + } else { + msg.innerHTML = 'Stock exceeded,
shortages will go to back order.'; + } + td.querySelector('.product-quantity') .insertAdjacentElement('afterend', msg); } diff --git a/modules/pdproductattributeslist/views/templates/hook/hookDisplayProductTabContent.tpl b/modules/pdproductattributeslist/views/templates/hook/hookDisplayProductTabContent.tpl index 223203c9..86577108 100644 --- a/modules/pdproductattributeslist/views/templates/hook/hookDisplayProductTabContent.tpl +++ b/modules/pdproductattributeslist/views/templates/hook/hookDisplayProductTabContent.tpl @@ -1,6 +1,6 @@ {if $product_combinations} -
+
{if $block_heading}

{l s='Select product combination' mod='pdproductattributeslist'}

{/if}