КОРЗИНА В ШАПКЕ САЙТА

SHOP
COLLECTIONS
PRODUCTS
RESELLERS
CART
0
FE
SHOP
COLLECTIONS
PRODUCTS
RESELLERS
CART
0
FE
teka fireplace
DESIGN MARIO FERRARINI
Teka appears as a three-dimensional contemporary painting containing an ancestral element such as fire. It is an encased ethanol fireplace, a wall edged frame. Its minimalistic structure plays as background scenery and it is hosting the ethanol burner.
ANTONIO LUPI BATHROOM ACESSORIES
НОМЕР ШАБЛОНА 21540926
КАК ЭТО СДЕЛАНО:
1 - Добавляем иконку корзинки (сумочки, пакета, котомки) , при нажатии на которую будет открываться корзина;
2 - Добавляем текст "0", который будет показывать количество товара в ней (без кавычек)
3 - Нажимаем правой кнопкой мышки на иконку корзинки и присваиваем класс для этого элемента: cartcopy_elem
4 - Нажимаем правой кнопкой мышки на "0" и присваиваем класс для этого элемента cartcopy_elem
5 - Добавляем корзину ST100 и настраиваем все поля для ввода в соответствии с вашими потребностями
6 - Добавляем код на страницу в блок Т123
7 - Публикуем страницу, радуемся))

<style>
.blkElem{pointer-events:none; }
.cartcopyanim {
-webkit-animation: t706__pulse-anim 0.6s;
animation: t706__pulse-anim 0.6s;}
.cartcopy_elem .tn-atom , .cartprice_elem .tn-atom {display:none}
.cartcopy{cursor:pointer}
.t706__carticon {display: none !important;} 
</style>
<script>
$( document ).ready(function() {
   let hideMode = false; //Скрыть-Показать пустую корзину - true-false
   $('.cartcopy_elem .tn-atom').addClass('cartcopy');
   $('.cartprice_elem .tn-atom').addClass('cartcopyprice');
   function chkNum(){
   if(!hideMode) $('.cartcopy, .cartcopyprice').show();   
   let chCounter = window.tcart.total;
   let chPrice = window.tcart.prodamount;
   if  (chPrice==0){
        $('div[data-elem-type="text"] .cartcopyprice').html(''); 
        if(hideMode) {$('.cartcopy, .cartcopyprice').hide()
        }else{$('.cartcopy, .cartcopyprice').show()};
   }else{ 
       $('div[data-elem-type="text"] .cartcopyprice').html(chPrice+' руб'); 
          if(hideMode) $('.cartcopy, .cartcopyprice').show();
   };
   $('div[data-elem-type="text"] .cartcopy').html(chCounter);
   if(chCounter==0){ $('.cartcopy').addClass('blkElem');
   }else{ $('.cartcopy').removeClass('blkElem'); }; 
   if(chCounter==''){$('div[data-elem-type="text"] .cartcopy').html(0);}; };
       setTimeout(function(){chkNum();}, 50);
   $(".t706").on('DOMSubtreeModified', ".t706__carticon-counter", function() {
       setTimeout(function(){chkNum();}, 30);
   $('div[data-elem-type="image"] .cartcopy').addClass('cartcopyanim');    
   setTimeout(function(){ $('.cartcopy').removeClass('cartcopyanim');}, 1000);});
   $('.cartcopy').click(function(e){e.preventDefault();tcart__openCart();});
});	
</script>
Template id: 21540926