Rabatten gäller för alla produkter, även de med reducerat pris, inom 60 dagar efter registrering av nyhetsbrevet. En kombination med andra rabattkoder är inte möjlig.
$(window).on("load", function () {
var savedColumns = localStorage.getItem('selectedColumns');
var initialColumns = savedColumns ? parseInt(savedColumns, 10) : 5;
setGridColumns(initialColumns);
$('.dropdown-view .dropdown-item').on('click', function () {
var columns = $(this).data('columns'); setGridColumns(columns); localStorage.setItem('selectedColumns', columns);
});
function setGridColumns(columns) {
$('.product-list').removeClass('columns-1 columns-2 columns-3 columns-4 columns-5 columns-6').addClass('columns-' + columns);
}
});
$(document).ready(function() {
function setCookie(n, v, d) {
var e = d ? "; expires=" + new Date(Date.now() + d * 864e5).toUTCString() : ""; document.cookie = n + "=" + (v || "") + e + "; path=/";
}
function getCookie(n) {
var e = n + "=", c = document.cookie.split(';');
for (var i = 0; i < c.length; i++) {
var s = c[i].trim();
if (s.indexOf(e) == 0) return s.substring(e.length);
}
return null;
}
function fetchData() {
if (getCookie('geoLocationModalShown')) return;
fetch("https://morgenland-cpanel.eu/api/morgenland-info").then(function(r) {
if (!r.ok) throw new Error('HTTP error! status: ' + r.status);
return r.json();
}).then(function(d) {
var c = normalizeCountryCode(d.data.countryCode), l = [{"lang":"de","locale":"de","url":"https:\/\/www.morgenland-teppiche.de","name":"German","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/German.png"},{"lang":"en","locale":"en","url":"https:\/\/www.morgenland-rugs.com","name":"English","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/USA.png"},{"lang":"uk","locale":"en-gb","url":"https:\/\/www.morgenland-rugs.co.uk","name":"English","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/UK.png"},{"lang":"fr","locale":"fr","url":"https:\/\/www.morgenland-tapis.fr","name":"French","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/France.png"},{"lang":"nl","locale":"nl","url":"https:\/\/www.morgenland-tapijt.nl","name":"Dutch","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/Netherland.png"},{"lang":"at","locale":"de-AT","url":"https:\/\/www.morgenland-teppiche.at","name":"Austria","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/Austria.png"},{"lang":"ch","locale":"de-CH","url":"https:\/\/www.morgenland-teppiche.ch","name":"Swiss German","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/Switzerland.png"},{"lang":"nn","locale":"no-NO","url":"https:\/\/www.morgenland-tepper.com","name":"Norwegian","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/Norway.png"},{"lang":"da","locale":"da","url":"https:\/\/www.morgenland-taepper.com","name":"Danish","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/Denmark.png"},{"lang":"es","locale":"es","url":"https:\/\/www.morgenland-alfombra.es","name":"Spanish","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/Spain.png"},{"lang":"it","locale":"it","url":"https:\/\/www.morgenland-tappeto.it","name":"Italian","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/Italy.png"},{"lang":"pl","locale":"pl","url":"https:\/\/www.morgenland-dywany.pl","name":"Polish","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/Poland.png"},{"lang":"pt","locale":"pt","url":"https:\/\/www.morgenland-tapetes.pt","name":"Portuguese","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/Portguese.png"},{"lang":"cz","locale":"cs-CZ","url":"https:\/\/www.morgenland-koberce.cz","name":"Czech","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/Czech-Republic.png"}], a = {"lang":"se","name":"Swedish","image":"https:\/\/cdn02.plentymarkets.com\/6wg68w8zahno\/frontend\/assets\/imgs\/flags\/Sweden.png"}, f = findActiveUrl(l, c);
if (shouldShowModal(f, a, c)) {
updateModal(f); $('#geoLocationModal').modal('show'); $('#geoLocationModal').attr('aria-hidden', 'false'); setCookie('geoLocationModalShown', 'true', 3);
}
}).catch(function(e) { console.error('Fetch error:', e.message); });
}
function normalizeCountryCode(c) {
return c.toLowerCase() === "gb" ? "uk" : c.toLowerCase();
}
function findActiveUrl(l, c) {
var d = l.filter(function(u) { return u.lang === 'en'; })[0];
return l.find(function(u) { return u.lang === c; }) || d;
}
function shouldShowModal(foundUrl, activeUrl, countryCode) {
if (!foundUrl || countryCode === activeUrl.lang) return false;
var exceptions = { 'de': ['at', 'ch'], 'uk': ['en'], 'en': ['uk'], 'at': ['de', 'ch'], 'ch': ['de', 'at'] };
var activeExceptions = exceptions[activeUrl.lang] || [];
return !activeExceptions.includes(foundUrl.lang);
}
function updateModal(f) {
var b = document.querySelector('#redirectButton'), t = document.querySelector('#geoLocationText'), bt = document.querySelector('#redirectButtonText'), bi = document.querySelector('#redirectButtonImage');
b.href = f.url;
t.textContent = "The website is in Swedish language. Would you like to be redirected to our {name} website for a better experience?".replace("{name}", f.name);
bi.src = bi['data-src'] = f.image;
bi.alt = f.name;
bt.textContent = "Redirect to {name} Site".replace("{name}", f.name);
}
fetchData();
});
Vi använder cookies och avancerad teknik för att säkerställa en säker och pålitlig drift av webbplatsen, analysera prestanda och förbättra upplevelsen. Genom att använda våra tjänster eller klicka på ’Acceptera alla’ samtycker du till databehandling via cookies och liknande teknologier, inklusive överföring av data till tredje parts marknadsföringspartners.