feat: refine price formatting and enable dynamic color updates in cart
All checks were successful
Build and Push Docker Image / build (push) Successful in 25s
All checks were successful
Build and Push Docker Image / build (push) Successful in 25s
- Updated price slider and backend formatting to round values instead of showing decimals - Enhanced product detail page with active color selection display and automatic cart updates - Adjusted swatch behavior to dynamically update the selected color in the cart via AJAX - Improved consistency in slider steps and price formatting throughout templates and views
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const priceFormatter = new Intl.NumberFormat('ru-RU', {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
minimumFractionDigits: 0,
|
||||
maximumFractionDigits: 0,
|
||||
});
|
||||
|
||||
const formatQueryValue = function (value) {
|
||||
return value.toFixed(2).replace(/\.?0+$/, '');
|
||||
return Math.round(value).toString();
|
||||
};
|
||||
|
||||
document.querySelectorAll('[data-price-slider]').forEach(function (slider) {
|
||||
|
||||
Reference in New Issue
Block a user