Финализирай поръчката и ние ще се погрижим за останалото.
Животът е по-хубав край водата.
Благодарим ти за доверието!
/** * SUPSY Checkout Cards v1.0 * Visual layer for the existing working Tilda shipping engine. * * IMPORTANT: * - Add this file AFTER the existing SUPSY shipping scripts. * - It does not change the real Tilda prices. * - It uses the existing native radio options marked with data-supsy: * BOARD1, BOARD2, BOARD3, BOARD4, SMALL, FREE, PICKUP. * - COD/deposit payment is intentionally NOT enabled here because it requires * a real payment flow that charges only the deposit and records the remainder. */ (function () { 'use strict'; const CONFIG = { pickupAddress: 'гр. София, ул. Пъстър свят 6', phoneDisplay: '0878 929 283', phoneHref: 'tel:+359878929283', freeDeliveryDays: 12, renderDelays: [250, 700, 1400, 2600] }; const IDS = { root: 'supsy-cards-addon', style: 'supsy-cards-addon-style' }; let renderQueued = false; let observer = null; function injectStyles() { if (document.getElementById(IDS.style)) return; const style = document.createElement('style'); style.id = IDS.style; style.textContent = ` #${IDS.root}, #${IDS.root} * { box-sizing: border-box; } #${IDS.root} { width: 100%; margin: 18px 0 22px; font-family: inherit; } .supsy-addon-title { margin: 0 0 14px; font-size: 18px; font-weight: 800; line-height: 1.3; color: #111; } .supsy-addon-list { display: grid; gap: 13px; } .supsy-addon-card { position: relative; width: 100%; padding: 20px 16px 17px; border: 2px solid #dedede; border-radius: 15px; background: #fff; color: #111; cursor: pointer; text-align: left; box-shadow: 0 7px 22px rgba(0,0,0,.06); transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, opacity .18s ease; -webkit-tap-highlight-color: transparent; } .supsy-addon-card:hover { transform: translateY(-1px); border-color: #aaa; box-shadow: 0 10px 28px rgba(0,0,0,.09); } .supsy-addon-card.is-selected { transform: scale(1.012); border-color: #111; background: #111; color: #fff; box-shadow: 0 13px 30px rgba(0,0,0,.18); } .supsy-addon-card.is-muted { opacity: .78; } .supsy-addon-badge { position: absolute; top: -10px; right: 12px; padding: 6px 10px; border-radius: 999px; font-size: 10px; font-weight: 900; line-height: 1; white-space: nowrap; letter-spacing: .25px; } .supsy-addon-badge-fast { background: #ffa726; color: #111; } .supsy-addon-badge-popular { background: #28b765; color: #fff; } .supsy-addon-name { padding-right: 96px; font-size: 17px; font-weight: 800; line-height: 1.3; } .supsy-addon-price { margin-top: 7px; font-size: 23px; font-weight: 900; line-height: 1.15; } .supsy-addon-line { margin-top: 9px; font-size: 13px; line-height: 1.45; } .supsy-addon-card.is-selected .supsy-addon-line { color: rgba(255,255,255,.9); } .supsy-addon-selected { display: none; margin-top: 12px; font-size: 12px; font-weight: 900; } .supsy-addon-card.is-selected .supsy-addon-selected { display: block; } .supsy-addon-toggle, .supsy-addon-stock-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; } .supsy-addon-toggle { margin-top: 12px; } .supsy-addon-arrow { display: inline-block; transition: transform .18s ease; } .supsy-addon-toggle.is-open .supsy-addon-arrow, .supsy-addon-stock-toggle.is-open .supsy-addon-arrow { transform: rotate(180deg); } .supsy-addon-details { display: none; margin-top: 12px; padding: 13px 14px; border-radius: 10px; background: #f3f3f3; color: #222; font-size: 13px; line-height: 1.55; } .supsy-addon-details.is-open { display: block; } .supsy-addon-card.is-selected .supsy-addon-details { background: rgba(255,255,255,.12); color: #fff; } .supsy-addon-details a { color: inherit; font-weight: 900; text-decoration: underline; } .supsy-addon-trust { margin-top: 16px; padding: 15px; border: 1px solid #dedede; border-radius: 13px; background: #fafafa; color: #222; font-size: 13px; line-height: 1.5; } .supsy-addon-stock-main { display: flex; align-items: center; gap: 9px; font-weight: 850; } .supsy-addon-stock-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: #20ad58; box-shadow: 0 0 0 4px rgba(32,173,88,.13); } .supsy-addon-stock-toggle { margin: 8px 0 0 19px; color: #555; } .supsy-addon-stock-details { display: none; margin: 9px 0 0 19px; color: #555; font-size: 12px; line-height: 1.55; } .supsy-addon-stock-details.is-open { display: block; } .supsy-addon-trust-lines { display: grid; gap: 7px; margin-top: 14px; padding-top: 13px; border-top: 1px solid #e2e2e2; font-weight: 750; } body.supsy-addon-ready [data-supsy] { position: absolute !important; left: -9999px !important; top: auto !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; opacity: 0 !important; pointer-events: none !important; } @media (max-width: 600px) { .supsy-addon-card { padding: 19px 14px 16px; } .supsy-addon-name { font-size: 16px; padding-right: 88px; } .supsy-addon-price { font-size: 21px; } .supsy-addon-badge { right: 9px; font-size: 9px; } } `; document.head.appendChild(style); } function getProducts() { try { return (window.tcart && window.tcart.products) || []; } catch (_) { return []; } } function qty(product) { return Number(product.quantity || product.amount || product.qty || 1); } function detectType() { const products = getProducts(); if (!products.length) return null; let boards = 0; let small = false; let free = false; products.forEach(function (product) { const text = JSON.stringify(product); if (text.includes('BOARD')) boards += qty(product); if (text.includes('SMALL')) small = true; if (text.includes('FREE')) free = true; }); if (boards > 0) return 'BOARD' + Math.min(boards, 4); if (small) return 'SMALL'; if (free) return 'FREE'; return null; } function getNativeRow(type) { return document.querySelector('[data-supsy="' + type + '"]'); } function getNativeInput(type) { const row = getNativeRow(type); return row ? row.querySelector('input[type="radio"]') : null; } function selectNative(type) { const input = getNativeInput(type); if (!input) return false; if (!input.checked) { input.click(); input.dispatchEvent(new Event('change', { bubbles: true })); } return true; } function extractPrice(type) { if (type === 'PICKUP' || type === 'FREE') return 'Безплатно'; const row = getNativeRow(type); if (!row) return ''; const text = row.getAttribute('data-original-text') || row.innerText || ''; const matches = text.match(/(\d+(?:[.,]\d+)?)\s*€/g); if (!matches || !matches.length) return ''; return matches[matches.length - 1].replace('.', ','); } function formatDate(date) { const days = [ 'неделя', 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота' ]; const d = String(date.getDate()).padStart(2, '0'); const m = String(date.getMonth() + 1).padStart(2, '0'); return d + '.' + m + ' (' + days[date.getDay()] + ')'; } function speedyDate() { const now = new Date(); const offsets = { 0: 2, // неделя -> вторник 1: 2, // понеделник -> сряда 2: 2, // вторник -> четвъртък 3: 2, // сряда -> петък 4: 2, // четвъртък -> събота 5: 3, // петък -> понеделник 6: 2 // събота -> понеделник }; const result = new Date(now); result.setDate(result.getDate() + offsets[now.getDay()]); return result; } function freeDate() { const result = new Date(); result.setDate(result.getDate() + CONFIG.freeDeliveryDays); return result; } function badge(text, className) { return '' + text + ''; } function pickupCard() { return `
Ръкохватки за гребло
Как да избереш правилното SUP гребло?
Защо качественото гребло е важно?