shoptet.helpers.enableUpdatePreview('product_quantity')
in the browser console.<label>
element.min
, max,
and step
attributes, and the data-max
and data-min
attributes have been removed.step
attribute now reflects the decimal precision set for the product:
step="0.001"
step="1"
.increase
and .decrease
buttons have been changed from <span>
elements to <button>
elements.<span>
element with a plus or minus sign, used in the Samba template.<span class="quantity">
<span class="increase-tooltip js-increase-tooltip" data-trigger="manual" data-container="body" data-original-title="Není možné zakoupit více než 9999 ks." aria-hidden="true" role="tooltip">
</span>
<span class="decrease-tooltip js-decrease-tooltip" data-trigger="manual" data-container="body" data-original-title="Minimální množství, které lze zakoupit, je 3 ks." aria-hidden="true" role="tooltip">
</span>
<label>
<input type="number" name="amount" value="3" class="amount" autocomplete="off" data-decimals="0" step="1" min="3" max="9999" aria-label="Množství">
</label>
<button class="increase" type="button" aria-label="Zvýšit množství o 1">
<span class="increase__sign">+</span>
</button>
<button class="decrease" type="button" aria-label="Snížit množství o 1">
<span class="decrease__sign">−</span>
</button>
</span>
<div>
with id="screen-reader-announcer"
has been added at the end of each page:<div id="screen-reader-announcer" aria-live="polite" class="sr-only"></div>
<div>
is hidden using the sr-only
CSS class.<button>
for increase/decrease buttons in Waltz and Disco templates..increase__sign
and .decrease__sign
elements are now correctly displayed with plus and minus symbols.min
, max
, and step
attributes of the input, along with the data-decimals attribute.min
attribute is now set to the product or variant’s minimum quantity.max
attribute is now set to the product or variant’s maximum quantity.step
attribute is set to 1 or the smallest allowed value based on decimal places (e.g., 0.001 for 3 decimal places).shoptet.helpers.updateQuantity
function and related functions.<div>
with id="screen-reader-announcer"
as the ARIA live region for screen readers.announceToScreenReader(message, liveType = 'polite')
@param {string} message - The message that will be announced by the screen reader.
@param {'polite' | 'assertive'} [liveType="polite"] - Defines the urgency of the announcement:
polite (default): Announces the message at the next available opportunity.
assertive: Announces the message immediately, interrupting any ongoing speech.
step
attribute for the quantity input was adjusted:
any
, it now reflects the decimal precision set for the product (e.g., 0.001 for 3 decimal places, 1 for no decimals).autocomplete="off"
attribute was added to the quantity input.As we informed you in the previous news, we will mark deprecated functions using shoptet.dev.deprecated
and log them into the console. Please remove deprecated functions from your codebase as soon as possible.
We moved cookie bar right after the footer element, this significantly improves the performance.