Заказ обратного звонка возможен круглосуточно.
Менеджер перезвонит Вам с 8:30 до 19:00 по Московскому времени.
Скачать каталог
Чтобы скачать каталог введите свой email.
Нажимая кнопку «скачать», вы даёте согласие на обработку своих персональных данных в соответствии с Федеральным законом №152-ФЗ «О персональных данных» и принимаете условия
Вбиваем город куда прибудут изделия.
*Калькулятор стоимости автоматически посчитает стоимость доставки одного изделия или партии в выбранный город.
var _emv = _emv || [];
_emv['campaign'] = '1b12d60e85a7a26060b7fe96';
var loadedArticules = [];
$(document).ready(function (){
$(".open360").click(function (){
const url = '/360/360.php?id=' + $(this).data('product_id');
$.fancybox.open({
src : url,
type : 'iframe',
autoScale: false,
iframe : {
css : {
// width : $( window ).width(),
height : $( window ).height() - 100
}
}
});
});
document.querySelectorAll("[data-articul]").forEach (el => loadedArticules.push(el.dataset.articul));
function loadMoreContent(page) {
ignoreLoadMore = true;
return new Promise(resolve => {
const q = location.search ? location.search + '&page=' + page : '?page=' + page;
const a = location.origin + location.pathname + q;
$.ajax({
url: a,
dataType: 'html',
success: function(html) {
const res = $(html).find('.load-more-container')[0];
if (res) {
res.querySelectorAll("[data-articul]").forEach(el => {
const a = el.dataset.articul;
if (loadedArticules.includes(a)) {
el.remove();
} else {
loadedArticules.push(a);
}
});
const containers = document.querySelectorAll('.load-more-container');
const last = containers[containers.length - 1];
last.after(res);
var b = true, c = 1;
while (b && c < 10) {
c++;
const lastEl = last.firstElementChild.lastElementChild;
const lastRect = last.getBoundingClientRect();
const lastElRect = lastEl.getBoundingClientRect();
const space = lastRect.right - lastElRect.right;
const fn = res.firstElementChild.firstElementChild;
if (fn.offsetWidth < space) {
lastEl.after(fn)
} else {
b = false;
}
}
if (!res.dataset?.isLastPage) loadMoreContent(++currentPage);
}
ignoreLoadMore = false;
resolve();
}
});
});
}
var currentPage = 1, ignoreLoadMore = false;
document.querySelector('.js-cdu-load-more-button')?.addEventListener('click', () => { if (!ignoreLoadMore) loadMoreContent(++currentPage); });
});
$(".present-grid__item-plus").click(function (e) {
let id = parseInt($(this).attr("attr-id"));
// console.log(id)
let d = '.present-grid__item-text[attr-id=' + id + ']';
// console.log(d)
let val = parseInt($(d).val());
$(d).val(++val);
let price = $(d).attr("attr-price");
// console.log(price)
price = price * val;
// console.log(price)
setPrice(id, parseFloat(price));
});
$(".present-grid__item-minus").click(function (e) {
let id = parseInt($(this).attr("attr-id"));
let d = '.present-grid__item-text[attr-id=' + id + ']';
let val = parseInt($(d).val());
let price = $(d).attr(
"attr-price"
);
if (val != 1) --val;
$(d).val(val);
price = price * val;
setPrice(id, parseFloat(price));
});
function setPrice(id, val) {
let formatted = new Intl.NumberFormat("ru-RU").format(val);
$('.present-grid_item_added-price[attr-id='+ id + ']').html(
formatted + " " + "руб."
);
}
function updateCartButtonText() {
$.get('/site/cartStatus', {}, function (data) {
const empty = $('.shopping-cart .count .empty');
const cartData = $('.shopping-cart .count .cart-data ');
if (data['count'] == 0) {
empty.show();
cartData.hide();
} else {
empty.hide();
cartData.show();
cartData.find('.value ').text(data['count']);
}
//console.log(data)
});
}
document.addEventListener('click', (e) => {
const t = e.target.parentElement;
if (!t.classList.contains('present-grid__item-buybtn')) return;
let id = parseInt($(t).attr("attr-id"));
let count = parseInt($(".present-grid__item-text[attr-id=" + id + "]").val());
$.post("/index.php?route=checkout/cart/add",
{
product_id: id,
quantity: count
},
function(data, status){
updateCartButtonText();
parseInt($(".present-grid__item-text[attr-id=" + id + "]").val(1))
setPrice(id, parseInt($(".present-grid__item-text[attr-id=" + id + "]").attr('attr-price')))
$('.shopping-cart')[0].click()
});
// https://rostmetall.ru/index.php?route=checkout/cart/add
// product_id: 2861
// quantity: 2
});