{%- comment -%} Help widget, by Your Elevens (yourelevens.com) A floating button that opens a small panel: quick answers (your own FAQ), a delivery pincode check, and a "Chat on WhatsApp" button that sends the shopper's page and product with the message. No bot, no AI, no third-party scripts. Answers come only from what you type here. Add it from the theme editor: Footer group > Add section > Help widget. {%- endcomment -%} {%- liquid assign sid = section.id assign num = section.settings.whatsapp | replace: '+', '' | replace: ' ', '' | replace: '-', '' if section.settings.hide_on_checkout_pages and request.page_type == 'cart' assign hide = true endif -%} {%- unless hide or num == blank -%} {%- style -%} #yw-{{ sid }} { --yw-ac: {{ section.settings.accent }}; --yw-acx: {{ section.settings.accent_text }}; --yw-bg: {{ section.settings.bg }}; --yw-tx: {{ section.settings.text }}; --yw-ln: color-mix(in srgb, {{ section.settings.text }} 14%, transparent); position: fixed; bottom: 18px; {{ section.settings.position }}: 18px; z-index: 60; font-family: inherit; color: var(--yw-tx); } #yw-{{ sid }} * { box-sizing: border-box; } #yw-{{ sid }} .yw-fab { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; background: var(--yw-ac); color: var(--yw-acx); font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1; padding: 14px 18px; border-radius: 999px; box-shadow: 0 8px 28px rgba(0,0,0,.28); } #yw-{{ sid }} .yw-fab svg { width: 20px; height: 20px; } #yw-{{ sid }} .yw-panel { position: absolute; bottom: 62px; {{ section.settings.position }}: 0; width: min(360px, calc(100vw - 36px)); max-height: min(560px, calc(100vh - 120px)); overflow: auto; background: var(--yw-bg); border: 1px solid var(--yw-ln); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.28); display: none; } #yw-{{ sid }}.is-open .yw-panel { display: block; } #yw-{{ sid }} .yw-hd { background: var(--yw-ac); color: var(--yw-acx); padding: 16px 18px; border-radius: 16px 16px 0 0; } #yw-{{ sid }} .yw-hd b { display: block; font-size: 16px; } #yw-{{ sid }} .yw-hd span { font-size: 13px; opacity: .9; } #yw-{{ sid }} .yw-bd { padding: 14px 16px 16px; display: grid; gap: 14px; } #yw-{{ sid }} details { border: 1px solid var(--yw-ln); border-radius: 10px; padding: 0 12px; } #yw-{{ sid }} summary { cursor: pointer; padding: 11px 0; font-size: 14px; font-weight: 600; list-style: none; } #yw-{{ sid }} summary::-webkit-details-marker { display: none; } #yw-{{ sid }} details p { margin: 0 0 12px; font-size: 14px; opacity: .85; line-height: 1.5; } #yw-{{ sid }} .yw-pin { display: flex; gap: 8px; } #yw-{{ sid }} .yw-pin input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--yw-ln); border-radius: 10px; background: var(--yw-bg); color: var(--yw-tx); } #yw-{{ sid }} .yw-pin button { font-family: inherit; font-weight: 600; font-size: 14px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--yw-ln); background: transparent; color: var(--yw-tx); cursor: pointer; } #yw-{{ sid }} .yw-res { font-size: 14px; margin-top: 8px; min-height: 18px; } #yw-{{ sid }} .yw-wa { display: block; text-align: center; text-decoration: none; background: var(--yw-ac); color: var(--yw-acx); font-weight: 600; padding: 13px; border-radius: 10px; font-size: 15px; } #yw-{{ sid }} .yw-chips { display: flex; flex-wrap: wrap; gap: 8px; } #yw-{{ sid }} .yw-chip { font-family: inherit; font-weight: 500; font-size: 13px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--yw-ln); background: transparent; color: var(--yw-tx); cursor: pointer; } #yw-{{ sid }} .yw-chip[aria-pressed="true"] { background: var(--yw-ac); color: var(--yw-acx); border-color: var(--yw-ac); } #yw-{{ sid }} .yw-order { display: none; margin-top: 10px; } #yw-{{ sid }} .yw-order.is-on { display: block; } #yw-{{ sid }} .yw-order input { width: 100%; font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--yw-ln); border-radius: 10px; background: var(--yw-bg); color: var(--yw-tx); } #yw-{{ sid }} .yw-lb { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .6; margin-bottom: 6px; display: block; } @media (prefers-reduced-motion: no-preference) { #yw-{{ sid }}.is-open .yw-panel { animation: yw-in-{{ sid }} .18s ease-out; } @keyframes yw-in-{{ sid }} { from { opacity: 0; transform: translateY(8px); } } } {%- unless section.settings.show_mobile -%}@media (max-width: 749px) { #yw-{{ sid }} { display: none; } }{%- endunless -%} {%- endstyle -%}
{%- endunless -%} {% schema %} { "name": "Help widget", "class": "ye-help", "max_blocks": 6, "settings": [ { "type": "header", "content": "WhatsApp" }, { "type": "text", "id": "whatsapp", "label": "WhatsApp number with country code", "info": "Digits only, for example 919876543210. Use your support number, not a personal one." }, { "type": "text", "id": "message", "label": "First line of the message", "default": "Hi, I have a question." }, { "type": "text", "id": "wa_label", "label": "WhatsApp button label", "default": "Chat on WhatsApp" }, { "type": "header", "content": "Quick actions (order status and COD)" }, { "type": "checkbox", "id": "show_actions", "label": "Show quick actions", "default": true, "info": "Shoppers pick what they need and enter an order number. The WhatsApp message arrives ready to answer." }, { "type": "text", "id": "chip_order", "label": "Button: order status", "default": "Where is my order?" }, { "type": "text", "id": "msg_order", "label": "Message: order status", "default": "Hi, where is my order {order}?", "info": "{order} is replaced with the number the shopper types." }, { "type": "text", "id": "chip_cod", "label": "Button: COD confirmation", "default": "Confirm my COD order" }, { "type": "text", "id": "msg_cod", "label": "Message: COD confirmation", "default": "Hi, I am confirming my COD order {order}." }, { "type": "text", "id": "chip_product", "label": "Button: product question", "default": "Ask about this product" }, { "type": "header", "content": "Panel" }, { "type": "text", "id": "button_label", "label": "Floating button label", "default": "Need help?" }, { "type": "text", "id": "title", "label": "Panel title", "default": "How can we help?" }, { "type": "text", "id": "subtitle", "label": "Panel text", "default": "Quick answers below, or chat with our team." }, { "type": "header", "content": "Delivery pincode check (optional)" }, { "type": "textarea", "id": "pincodes", "label": "Pincodes you deliver to", "info": "One per line. A short prefix covers a whole area, for example 560 covers every pincode starting with 560. Leave empty to hide the check." }, { "type": "text", "id": "pin_yes", "label": "Message when covered", "default": "Yes, we deliver there. Usually 3 to 6 days." }, { "type": "text", "id": "pin_no", "label": "Message when not covered", "default": "We do not deliver there yet. Message us and we will check." }, { "type": "header", "content": "Look" }, { "type": "select", "id": "position", "label": "Position", "default": "right", "options": [ { "value": "right", "label": "Bottom right" }, { "value": "left", "label": "Bottom left" } ] }, { "type": "checkbox", "id": "show_mobile", "label": "Show on phones", "default": true }, { "type": "checkbox", "id": "hide_on_checkout_pages", "label": "Hide on the cart page", "default": false }, { "type": "color", "id": "accent", "label": "Accent", "default": "#128c4a" }, { "type": "color", "id": "accent_text", "label": "Text on accent", "default": "#ffffff" }, { "type": "color", "id": "bg", "label": "Panel background", "default": "#ffffff" }, { "type": "color", "id": "text", "label": "Panel text", "default": "#111111" } ], "blocks": [ { "type": "faq", "name": "Quick answer", "settings": [ { "type": "text", "id": "q", "label": "Question", "default": "Do you offer cash on delivery?" }, { "type": "textarea", "id": "a", "label": "Answer", "default": "Yes, on orders up to the limit shown at checkout." } ] } ], "presets": [ { "name": "Help widget", "blocks": [ { "type": "faq", "settings": { "q": "How long does delivery take?", "a": "Most orders arrive in 3 to 6 days." } }, { "type": "faq", "settings": { "q": "Can I return or exchange?", "a": "Yes, within the window shown on our returns page." } } ] } ] } {% endschema %}