function closeProductAttributes() {
$('#productAttributesModal').modal('hide');
}
function closeProductZoom() {
$('#productZoom').modal('hide');
}
function zoom(e) {
document.getElementById("productZoomImage").src = e.currentTarget.getAttribute("image");
$("#productZoom").modal('show');
}
function productDetail(productId) {
let product = getProduct(productId);
if ((product == undefined) || (product == null))
return;
let HTML = "";
if ((product.status != undefined) && (product.deliveryTerm != undefined)) {
if (product.status == 0) {
if (product.deliveryTerm < 1) {
HTML += "
Dit product is momenteel niet beschikbaar.
";
}
else {
HTML += "Levering mogelijk binnen maximum " + product.deliveryTerm + " werkdagen.";
HTML += "
Een exacte leveringstermijn zal u bevestigd worden per mail na het plaatsen van uw bestelling.";
HTML += "
U kunt ons ook contacteren via e-mail:
charlotte@loosveldtbeirnaert.be";
HTML += "
of telefonisch: 051/401075.
";
}
}
else {
HTML += "Direct beschikbaar bij afhaling in onze winkel.
";
HTML += "Leverbaar aan huis binnen de 24 uur na bestelling.
";
}
document.getElementById("productDelivery").innerHTML = HTML;
}
HTML = ""
HTML += productDetailAttributeHTML("Referentie", product.reference);
for (pav in product.productAttributeValues) {
let productAttributeValue = product.productAttributeValues[pav];
HTML += productDetailAttributeHTML(productAttributeValue.attributeLabel, productAttributeValue.attributeValue);
}
document.getElementById("productAttributes").innerHTML = HTML;
$("#productAttributesModal").modal('show');
}
function productDetailAttributeHTML(label, value) {
let HTML = "";
HTML += "";
HTML += "
";
HTML += label;
HTML += "
";
HTML += "
";
HTML += value;
HTML += "
";
HTML += "
";
return HTML;
}