Сейчас узнаем, какой подарок выпадет именно Вам
Крутите колесо
Ура, вы выиграли!
Ваш приз:
Годовой доступ
к видео на mo-ti -20%
по промокоду T19RAY
Промокод действителен 3 дня

Оформить доступ с промокодом
100
Как вызвать нужную карточку товара кнопкой из ZeroBlock в Tilda
Exclusive Offer - 10% off This Week
Toolkit Gallery #1 Everything You Need
Building skyscrapers is like building the relationships. Steady construction requires solid and robust foundatio
Exclusive Offer - 10% off This Week
Toolkit Gallery #1 Everything You Need
Building skyscrapers is like building the relationships. Steady construction requires solid and robust foundatio
Exclusive Offer - 10% off This Week
Toolkit Gallery #2 Everything You Need
Building skyscrapers is like building the relationships. Steady construction requires solid and robust foundatio
Exclusive Offer - 10% off This Week
Toolkit Gallery #2 Everything You Need
Building skyscrapers is like building the relationships. Steady construction requires solid and robust foundatio
Exclusive Offer - 10% off This Week
Toolkit Gallery #4 Everything You Need
Building skyscrapers is like building the relationships. Steady construction requires solid and robust foundatio
Exclusive Offer - 10% off This Week
Toolkit Gallery #4 Everything You Need
Building skyscrapers is like building the relationships. Steady construction requires solid and robust foundatio

Как вызвать нужную карточку товара кнопкой из ZeroBlock в Tilda

Код позволяет вызывать popup из блока магазина (связанного с каталогом) при клике на кнопку в ZeroBlock. (блок каталога при этом присутствует на странице)
1
Создали Zero с кнопками вызова товара
2
В кнопках указали ссылки вида #prodid-926733230141
Где 926733230141 это productID, который находится внизу карточки товара каталоге (посмотреть скрин)
3
Добавили на страницу блок с товарами из каталога. В примере это ST305N
4
Вставили код на страницу в блок Т123
Библиотека для примера
<script>
document.addEventListener("DOMContentLoaded", function() {
    (function () {
        const productButton = document.querySelectorAll('a[href^="#prodid-"]');
            if(productButton.length){
                productButton.forEach(function (el, index) {
                    el.addEventListener('click',function(e) {
                        const prodId = this.getAttribute('href').replace(/[^0-9]/g,"");
                        const orderButton =  document.querySelector('div.js-product[data-product-gen-uid="'+prodId+'"]>a');
                        if(orderButton!=null) orderButton.click();
                    });    
            
                });
            };
    })();    
});    
</script>
Made on
Tilda