P.S Данная инструкция учитывает наличие описания доставки. Если его у вас нет, то в некоторых шаблонах код нужно будет дополнительно изменить.
Шаблоны:
Техно, Будуар, Индиго, Лотос, Цветочный, Фиеста, Туризм
Скрытый текст
В шаблоне main.js найдите
замените на
найдите
замените на
Если в шаблоне Фиеста в выборе доставки текст "Название доставки - 0 рублей" отображался как "Название доставки" (без стоимости)
В шаблоне Быстрый заказ найдите строку
замените на
В шаблоне main.js найдите
$('.changeprice').text(startprice);
замените на
$('.changeprice').text(startprice); if(startprice >0) { $('.currentDeliveryPrice').show(); } else { $('.currentDeliveryPrice').hide(); }
найдите
$('.orderStageDeliveryZonePrice .changeprice').text(startprice);
замените на
$('.orderStageDeliveryZonePrice .changeprice').text(startprice); if(startprice >0) { $('.currentDeliveryPrice').show(); } else { $('.currentDeliveryPrice').hide(); }
Если в шаблоне Фиеста в выборе доставки текст "Название доставки - 0 рублей" отображался как "Название доставки" (без стоимости)
В шаблоне Быстрый заказ найдите строку
{order_delivery.NAME} {% IF order_delivery.zone_list_empty %}- {order_delivery.END_PRICE | money_format}{% ELSE %}(цена зависит от выбранной зоны){% ENDIF %}
замените на
{order_delivery.NAME}
Какаду
Скрытый текст
В шаблоне Быстрый заказ найдите
замените на
В шаблоне main.js найдите
В шаблоне Быстрый заказ найдите
<div class="delivery__fields">
замените на
<div class="delivery__fields" style="{% IF order_delivery.END_PRICE=0 %}display:none;{% ENDIF %}">
В шаблоне main.js найдите
// Обновление цены с учетом доставки var cartSumTotalHide = $('.cartSumTotalHide .num').text().toString().replace(/\s/g, ''); var newSum = parseInt(cartSumTotalHide) + parseInt(priceBlock.text()); $('.cartSumTotal .num').text(newSum); $('.cartSumDelivery .num').text(price);замените на
// Обновление цены с учетом доставки var cartSumTotalHide = $('.cartSumTotalHide .num').text().toString().replace(/\s/g, ''); var newSum = parseInt(cartSumTotalHide) + parseInt(priceBlock.text()); $('.cartSumTotal .num').text(newSum); $('.cartSumDelivery .num').text(price); if(price > 0) { $('.delivery__fields').show(); } else { $('.delivery__fields').hide(); }
Неон, Хобби, Уют, Новогодний, Мастер
Скрытый текст
В шаблоне cartPage.js найдите
замените на
найдите
замените на
В шаблоне cartPage.js найдите
$('.changeprice').text(startprice);
замените на
$('.changeprice').text(startprice); if(startprice >0) { $('.currentDeliveryPrice').show(); } else { $('.currentDeliveryPrice').hide(); }
найдите
$('.orderStageDeliveryZonePrice .changeprice').text(startprice);
замените на
$('.orderStageDeliveryZonePrice .changeprice').text(startprice); if(startprice >0) { $('.currentDeliveryPrice').show(); } else { $('.currentDeliveryPrice').hide(); }
Маркетплейс
Скрытый текст
В шаблоне Быстрый заказ найдите
замените на
В шаблоне main.js найдите
В шаблоне Быстрый заказ найдите
<div class="delivery__fields">
замените на
<div class="delivery__fields" style="{% IF order_delivery.END_PRICE=0 %}display:none;{% ENDIF %}">
В шаблоне main.js найдите
// Обновление цены с учетом доставки let cartSumTotalHide = $('.cartSumTotalHide:eq(0) .num').text().toString().replace(/\s/g, ''); let newSum = parseInt(cartSumTotalHide) + parseInt(priceBlock.text()); $('.cartSumTotal .num').text(newSum); $('.cartSumDelivery .num').text(price);замените на
let cartSumTotalHide = $('.cartSumTotalHide:eq(0) .num').text().toString().replace(/\s/g, ''); let newSum = parseInt(cartSumTotalHide) + parseInt(priceBlock.text()); $('.cartSumTotal .num').text(newSum); $('.cartSumDelivery .num').text(price); if(price > 0) { $('.delivery__fields').show(); } else { $('.delivery__fields').hide(); }
Фазенда
Скрытый текст
В шаблоне main.js найдите (встречается 2 раза)
замените на
В шаблоне main.js найдите (встречается 2 раза)
$('.cartTable .cartFoot .total .TotalDelivery .changeprice').text(startprice);
замените на
$('.cartTable .cartFoot .total .TotalDelivery .changeprice').text(startprice); if(startprice >0) { $('.currentDeliveryPrice').show(); } else { $('.currentDeliveryPrice').hide(); }
Дружок
Скрытый текст
В шаблоне Быстрый заказ найдите
замените на
В шаблоне main.js найдите
В шаблоне Быстрый заказ найдите
<div class="delivery__fields pricefield"> <label>Стоимость доставки:</label><span class="delivery__price">{order_delivery.END_PRICE | money_format}</span> </div>
замените на
<div class="delivery__fields pricefield" style="{% IF order_delivery.END_PRICE=0 %}display:none;{% ENDIF %}"> <label>Стоимость доставки:</label><span class="delivery__price">{order_delivery.END_PRICE | money_format}</span> </div>
В шаблоне main.js найдите
// Обновление цены с учетом доставки var cartSumTotalHide = $('.cartSumTotalHide:eq(0) .num').text().toString().replace(/\s/g, ''); var newSum = parseInt(cartSumTotalHide) + parseInt(priceBlock.text()); $('.formfastbuttons .cartSumTotal .num').text(newSum); }); // Действия при выборе зоны внутри варианта доставки на этапе оформления заказа $('.zone__radio').click(function(){ var val = $(this).attr('deliveryid'); var price = $(this).attr('price'); var priceBlock = $('.delivery__option[rel='+ val +']').find('.delivery__price').find('.num'); // Обновление цены priceBlock.text(price);замените на
// Обновление цены с учетом доставки var cartSumTotalHide = $('.cartSumTotalHide:eq(0) .num').text().toString().replace(/\s/g, ''); var newSum = parseInt(cartSumTotalHide) + parseInt(priceBlock.text()); $('.formfastbuttons .cartSumTotal .num').text(newSum); }); // Действия при выборе зоны внутри варианта доставки на этапе оформления заказа $('.zone__radio').click(function(){ var val = $(this).attr('deliveryid'); var price = $(this).attr('price'); var priceBlock = $('.delivery__option[rel='+ val +']').find('.delivery__price').find('.num'); // Обновление цены priceBlock.text(price); if (price>0) { $('.delivery__fields').show(); } else { $('.delivery__fields').hide(); }
Гламур
Скрытый текст
В шаблоне main.js найдите (встречается 2 раза)
замените на
В шаблоне main.js найдите (встречается 2 раза)
WithZone = $('div[rel='+ selectedDelId +'] .zone__radio:checked').attr('price'); if(WithZone >= 0){ startprice = WithZone; }else{ startprice = WithoutZone; } $('.changeprice').text(startprice);
замените на
WithZone = $('div[rel='+ selectedDelId +'] .zone__radio:checked').attr('price'); if(WithZone >= 0){ startprice = WithZone; }else{ startprice = WithoutZone; } $('.changeprice').text(startprice); if (startprice>0) { $('.delivery__price').show(); } else { $('.delivery__price').hide(); }
Кондитер
Скрытый текст
В шаблоне Быстрый заказ найдите
замените на
В шаблоне Быстрый заказ найдите
<div class="quickform-delivery__price">
замените на
<div class="quickform-delivery__price" style="{% IF order_delivery.END_PRICE=0 %}display:none;{% ENDIF %}">
Веган
Скрытый текст
В шаблоне Быстрый заказ найдите
замените на
найдите
замените на
В шаблоне Быстрый заказ найдите
$('.changeprice').text(startprice);
замените на
$('.changeprice').text(startprice); if(startprice >0) { $('.currentDeliveryPrice').show(); } else { $('.currentDeliveryPrice').hide(); }
найдите
$('.orderStageDeliveryZonePrice.changeprice').text(startprice);
замените на
$('.orderStageDeliveryZonePrice.changeprice').text(startprice); if(startprice >0) { $('.currentDeliveryPrice').show(); } else { $('.currentDeliveryPrice').hide(); }
Прайм
Скрытый текст
В шаблоне main.js найдите
замените на
В шаблоне Быстрый заказ найдите
замените на
В шаблоне main.js найдите
// Выбор доставки $('.delivery__select select').change(function(){ selectedDelId = $(this).find('option:selected').attr('delid'); $('.delivery__zoneSelect').hide(); $('.delivery__zoneSelect[del="'+selectedDelId+'"]').show(); $('.delivery__zoneSelect option').attr('selected',false) $('.delivery__zoneSelect[del="'+selectedDelId+'"] option:first-of-type').attr('selected',true); $('.delivery__option .delivery__radio[value="'+selectedDelId+'"]').click(); WithoutZone = $('div[rel='+ selectedDelId +'] input.delivery__radio:checked').attr('pricewithoutzones'); WithZone = $('div[rel='+ selectedDelId +'] input.zone__radio:checked').attr('price'); if(WithZone >= 0){ startprice = WithZone; }else{ startprice = WithoutZone; } $('.changeprice').text(startprice);
замените на
// Выбор доставки $('.delivery__select select').change(function(){ selectedDelId = $(this).find('option:selected').attr('delid'); $('.delivery__zoneSelect').hide(); $('.delivery__zoneSelect[del="'+selectedDelId+'"]').show(); $('.delivery__zoneSelect option').attr('selected',false) $('.delivery__zoneSelect[del="'+selectedDelId+'"] option:first-of-type').attr('selected',true); $('.delivery__option .delivery__radio[value="'+selectedDelId+'"]').click(); WithoutZone = $('div[rel='+ selectedDelId +'] input.delivery__radio:checked').attr('pricewithoutzones'); WithZone = $('div[rel='+ selectedDelId +'] input.zone__radio:checked').attr('price'); if(WithZone >= 0){ startprice = WithZone; }else{ startprice = WithoutZone; } $('.changeprice').text(startprice); if(startprice >0) { $('.delivery__price').show(); } else { $('.delivery__price').hide(); }
В шаблоне Быстрый заказ найдите
<div class="delivery__price">
замените на
<div class="delivery__price" style="{% IF order_delivery.END_PRICE=0 %}display:none;{% ENDIF %}">
Профи
Скрытый текст
В шаблоне main.js найдите
замените на
В шаблоне main.js найдите
$('.changeprice').text(startprice);
замените на
$('.changeprice').text(startprice); if(startprice >0) { $('.delivery__priceBlock').show(); $('.delivery__description').css('margin-top','1rem'); } else { $('.delivery__priceBlock').hide(); $('.delivery__description').css('margin-top','0'); }
Нептун, Динамика
Скрытый текст
В шаблоне Быстрый заказ найдите
замените на
В шаблоне main.js найдите
замените на
Если в шаблоне Динамика в выборе доставки текст "Название доставки - 0 рублей" отображался как "Название доставки" (без стоимости)
В шаблоне Быстрый заказ найдите строку
замените на
В шаблоне Быстрый заказ найдите
<div class="currentDeliveryPrice changer">
замените на
<div class="currentDeliveryPrice changer" style="{% IF order_delivery.END_PRICE=0 %}display:none;{% ENDIF %}">
В шаблоне main.js найдите
$('.changeprice').text(startprice);
замените на
$('.changeprice').text(startprice); if(startprice >0) { $('.currentDeliveryPrice').show(); } else { $('.currentDeliveryPrice').hide(); }
Если в шаблоне Динамика в выборе доставки текст "Название доставки - 0 рублей" отображался как "Название доставки" (без стоимости)
В шаблоне Быстрый заказ найдите строку
{order_delivery.NAME} {% IF order_delivery.zone_list_empty %}- {order_delivery.END_PRICE | money_format}{% ELSE %}(цена зависит от выбранной зоны){% ENDIF %}
замените на
{order_delivery.NAME}
Драйв
Скрытый текст
В шаблоне main.js найдите
замените на
найдите
замените на
В шаблоне main.js найдите
// Выбор доставки $('.delivery__select select').change(function(){ selectedDelId = $(this).find('option:selected').attr('delid'); $('.delivery__zoneSelect').hide(); $('.delivery__zoneSelect[del="'+selectedDelId+'"]').show(); $('.delivery__zoneSelect option').attr('selected',false) $('.delivery__zoneSelect[del="'+selectedDelId+'"] option:first-of-type').attr('selected',true); $('.delivery__option .delivery__radio[value="'+selectedDelId+'"]').click(); WithoutZone = $('div[rel='+ selectedDelId +'] .delivery__radio:checked').attr('pricewithoutzones'); WithZone = $('div[rel='+ selectedDelId +'] .zone__radio:checked').attr('price'); if(WithZone >= 0){ startprice = WithZone; }else{ startprice = WithoutZone; } $('.changeprice').text(startprice);
замените на
// Выбор доставки $('.delivery__select select').change(function(){ selectedDelId = $(this).find('option:selected').attr('delid'); $('.delivery__zoneSelect').hide(); $('.delivery__zoneSelect[del="'+selectedDelId+'"]').show(); $('.delivery__zoneSelect option').attr('selected',false) $('.delivery__zoneSelect[del="'+selectedDelId+'"] option:first-of-type').attr('selected',true); $('.delivery__option .delivery__radio[value="'+selectedDelId+'"]').click(); WithoutZone = $('div[rel='+ selectedDelId +'] .delivery__radio:checked').attr('pricewithoutzones'); WithZone = $('div[rel='+ selectedDelId +'] .zone__radio:checked').attr('price'); if(WithZone >= 0){ startprice = WithZone; }else{ startprice = WithoutZone; } $('.changeprice').text(startprice); if(startprice >0) { $('.delivery__price').show(); } else { $('.delivery__price').hide(); }
найдите
// Обновление цены и описания при выборе доставки $('.delivery__select select').each(function(){ selectedDelId = $(this).find('option:selected').attr('delid'); $('.delivery__zoneSelect').hide(); $('.delivery__zoneSelect[del="'+selectedDelId+'"]').show(); $('.delivery__zoneSelect option').attr('selected',false) $('.delivery__zoneSelect[del="'+selectedDelId+'"] option:first-of-type').attr('selected',true); $('.delivery__option .delivery__radio[value="'+selectedDelId+'"]').click(); WithoutZone = $('div[rel='+ selectedDelId +'] .delivery__radio:checked').attr('pricewithoutzones'); WithZone = $('div[rel='+ selectedDelId +'] .zone__radio:checked').attr('price'); if(WithZone >= 0){ startprice = WithZone; }else{ startprice = WithoutZone; } $('.changeprice').text(startprice);
замените на
// Обновление цены и описания при выборе доставки $('.delivery__select select').each(function(){ selectedDelId = $(this).find('option:selected').attr('delid'); $('.delivery__zoneSelect').hide(); $('.delivery__zoneSelect[del="'+selectedDelId+'"]').show(); $('.delivery__zoneSelect option').attr('selected',false) $('.delivery__zoneSelect[del="'+selectedDelId+'"] option:first-of-type').attr('selected',true); $('.delivery__option .delivery__radio[value="'+selectedDelId+'"]').click(); WithoutZone = $('div[rel='+ selectedDelId +'] .delivery__radio:checked').attr('pricewithoutzones'); WithZone = $('div[rel='+ selectedDelId +'] .zone__radio:checked').attr('price'); if(WithZone >= 0){ startprice = WithZone; }else{ startprice = WithoutZone; } $('.changeprice').text(startprice); if(startprice >0) { $('.delivery__price').show(); } else { $('.delivery__price').hide(); }
Сияние
Скрытый текст
В шаблоне Оформление заказа найдите
замените на
В шаблоне Оформление заказа найдите
<td rowspan="2" class="cell3 num"> + <span class="orderStageDeliveryDefaultPrice" {% IF order_delivery.ZONE_ID>0 %}style="display:none;"{% ENDIF%}>{order_delivery.END_PRICE | money_format}</span> <span class="orderStageDeliveryZonePrice" {% IF order_delivery.ZONE_ID<1 %}style="display:none;"{% ENDIF%}>{order_delivery.ZONE_END_PRICE | money_format}</span> </td>
замените на
<td rowspan="2" class="cell3 num"> {% IF order_delivery.END_PRICE != 0%} + <span class="orderStageDeliveryDefaultPrice" {% IF order_delivery.ZONE_ID>0 %}style="display:none;"{% ENDIF%}>{order_delivery.END_PRICE | money_format}</span> {% ENDIF %} <span class="orderStageDeliveryZonePrice" {% IF order_delivery.ZONE_ID<1 %}style="display:none;"{% ENDIF%}>{order_delivery.ZONE_END_PRICE | money_format}</span> </td>
Сканди
Скрытый текст
В шаблоне Быстрый заказ найдите
замените на
В шаблоне Быстрый заказ найдите
<span class="orderStageDeliveryDefaultPrice" {% IF order_delivery.ZONE_ID>0 %}style="display:none;"{% ENDIF%}><label>Стоимость доставки:</label>{order_delivery.END_PRICE | money_format}</span>
замените на
<span class="orderStageDeliveryDefaultPrice" {% IF order_delivery.ZONE_ID>0 || order_delivery.END_PRICE=0 %}style="display:none;"{% ENDIF%}><label>Стоимость доставки:</label>{order_delivery.END_PRICE | money_format}</span>
Инструкция для остальных шаблонов будет добавлена позже