<script>
$(document).ready(function(){
const nameSq = 'Площадь';
$(".t706__cartwin-prodamount").bind( 'DOMSubtreeModified',function() {
setTimeout(function(){
$('.t706__product').each(function(){
let quant = +$(this).find('.t706__product-quantity').text();
let squareEl = $(this).find('.t706__product-title__option div:last');
let square = squareEl.text();
if (square.indexOf(nameSq) >= 0){
let squareArr = square.split(':');
square = parseFloat(squareArr[1])*quant;
square.toFixed(2);
//squareEl.text( squareArr[0]+': '+ square);
squareEl.attr('data-sqr', 'Общая площадь'+': '+ square.toFixed(2));
};
});
}, 300);
});
});
</script>
<style>
.js-product-option.t-product__option:last-child {
display: none;
}
.t706__product-title__option div:last-child {
display: flex;
flex-wrap: wrap;
}
.t706__product-title__option div:last-child:after {
content: " м\00B2";
}
.t706__product-title__option div:last-child:before {
content: attr(data-sqr)" м\00B2";
display: block;
order: 1;
font-weight: 600 !important;
width: 100%;
}
</style>