Shipping methods
Skip to content
NEW ITEMS
SHOP
INFO
ABOUT US
CONTACT
SHIPPING
INSTRUCTIONS
CATALOG
EN
DE
EN
FR
ES
IT
NL
SV
DA
JA
ZH
????
Shipping methods
apollon
2019-10-02T00:05:07+02:00
Please first select the destination country for shipment
Germany and Austria
Member states of the European Union
European countries outside the European Union
Countries outside Europe
Please first select the country for shipment
Germany
and Austria
Member states
of the European Union
European countries
outside
of the European Union
Countries
outside Europe
Page load link
Send
'; document.body.appendChild(box); var input = document.getElementById('mz-chat-input'); var sendBtn = document.getElementById('mz-chat-send'); var msgsDiv = document.getElementById('mz-chat-msgs'); var closeBtn = document.getElementById('mz-chat-close'); closeBtn.onclick = function() { box.classList.remove('open'); isOpen = false; }; sendBtn.onclick = sendMessage; input.onkeydown = function(e) { if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); sendMessage(); } }; function toggleChat() { isOpen = !isOpen; if (isOpen) { box.classList.add('open'); if (messages.length === 0) addBotMessage('Welcome to MAZANLI. How can I help you?'); input.focus(); } else { box.classList.remove('open'); } } function addBotMessage(text) { messages.push({ role: 'bot', text: text }); var div = document.createElement('div'); div.className = 'mz-msg mz-msg-bot'; div.innerHTML = '
' + escapeHtml(text) + '
'; msgsDiv.appendChild(div); msgsDiv.scrollTop = msgsDiv.scrollHeight; } function addUserMessage(text) { messages.push({ role: 'user', text: text }); var div = document.createElement('div'); div.className = 'mz-msg mz-msg-user'; div.innerHTML = '
' + escapeHtml(text) + '
'; msgsDiv.appendChild(div); msgsDiv.scrollTop = msgsDiv.scrollHeight; } function showTyping() { var div = document.createElement('div'); div.className = 'mz-msg mz-msg-bot'; div.id = 'mz-typing'; div.innerHTML = '
'; msgsDiv.appendChild(div); msgsDiv.scrollTop = msgsDiv.scrollHeight; } function hideTyping() { var el = document.getElementById('mz-typing'); if (el) el.remove(); } function showWeiterleitung() { if (document.querySelector('.mz-weiterleitung')) return; var wrap = document.getElementById('mz-chat-input-wrap'); var div = document.createElement('div'); div.className = 'mz-weiterleitung'; div.innerHTML = '
Send to Team
'; wrap.parentNode.insertBefore(div, wrap); } window._mzWeiterleiten = function() { var name = document.getElementById('mz-wl-name').value; var email = document.getElementById('mz-wl-email').value; var msg = document.getElementById('mz-wl-msg').value; if (!email) { alert('Please provide email'); return; } fetch(API + '/weiterleiten', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ conversation_id: convId, name: name, email: email, nachricht: msg }) }) .then(function(r) { return r.json(); }) .then(function(d) { var el = document.querySelector('.mz-weiterleitung'); if (el) el.remove(); addBotMessage(d.message || 'Message has been forwarded. We will contact you.'); }) .catch(function() { addBotMessage('Forwarding failed. Please contact us directly at info@mazan.li'); }); }; function sendMessage() { var text = input.value.trim(); if (!text) return; input.value = ''; addUserMessage(text); sendBtn.disabled = true; showTyping(); fetch(API + '/message', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ message: text, conversation_id: convId }) }) .then(function(r) { return r.json(); }) .then(function(d) { hideTyping(); sendBtn.disabled = false; if (d.error) { addBotMessage('Sorry, an error has occurred.'); return; } convId = d.conversation_id; addBotMessage(d.antwort); if (d.antwort.toLowerCase().indexOf('forward') > -1 || d.antwort.toLowerCase().indexOf('team') > -1 || d.antwort.toLowerCase().indexOf('info@mazan.li') > -1) { showWeiterleitung(); } input.focus(); }) .catch(function() { hideTyping(); sendBtn.disabled = false; addBotMessage('Connection failed. Please try again.'); }); } function escapeHtml(str) { return str.replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/\n/g,'
'); } })();