");
$.each(data.additionalProperty, function(index, property) {
if (property.name === "tags") {
var categories = property.value.join(", ").replace(", Saleable Experience", "");
var tags = $("
").text(categories);
additionalProperties.append(tags);
}
});
$("#category").html(additionalProperties);
var cxoffers = data.offers.length;
for (var i = 0; i < cxoffers; i++) {
$('#offers').html($('#offers').html() + "
" + ShowBlankOrValue(data.offers[i].name) + " - Yes");
}
if (data.priceRange != undefined) {
$('#pricerange').html($('#pricerange').html() + "" + data.priceRange);
}
if (data.type != undefined) {
var cxtype = data.type.length;
for (var i = 0; i < cxoffers; i++) {
$('#type').html($('#type').html() + "
" + data.type[i]);
}
}
$('#data_output').html(cxStreetAddress + "
" + cxPostalCode + "
" + cxAddressRegion + "
" + cxAddressLocal + "
" + cxAddressCountry);
var cxBrand = data.brand.length;
gaBrand = data.brand[0].name;
for (var i = 0; i < cxBrand; i++) {
$('#Brand').html($('#Brand').html() + "
" + ShowBlankOrValue(data.brand[i].name) + "
");
}
var cxcontactPoint = data.contactPoint.length;
for (var i = 0; i < cxcontactPoint; i++) {
if (data.contactPoint[i].contactType == 'Booking') {
$('#contactPoint').html($('#contactPoint').html() + "
Name " + ShowBlankOrValue(data.contactPoint[i].name) + "
Email Address " + ShowBlankOrValue(data.contactPoint[i].email) + "
Telephone " + ShowBlankOrValue(data.contactPoint[i].telephone) + "
");
}
}
var cxhoursAvailable = data.hoursAvailable.length;
for (var i = 0; i < cxhoursAvailable; i++) {
$('#hoursAvailable').html($('#hoursAvailable').html() + data.hoursAvailable[i].description);
}
$.get("https://tradeportal.failteireland.ie/account_name/?id=" + data.identifier[2].value, function (data1) {
cxAccountName = data1;
// if(data.identifier[3] != null)
//{
// cxAccountName = data.identifier[3].value;
//}
for (var i = 0; i < data.identifier.length; i++) {
if (data.identifier[i].propertyID === "CrmAccountName") {
cxAccountName = data.identifier[i].value;
break;
}
}
$('#header').html(cxAccountName + " - " + data.name);
//reinitialise calculatedTitle
// calculatedTitle = "";
// if (!checkIfValidUUID(cxAccountName))
// {
// calculatedTitle = cxAccountName; //set calculated title as its not a guid
// }
// var delimiter = " -
";
// var x = calculatedTitle.replaceAll("'", "").replaceAll(";", "") + " -
";
// if (x == delimiter) x = "";
// $('#header').html(x + data.name);
// gaExperience = data.name;
});
$('#map').html("");
// Find all elements on the page
var elements = document.getElementsByTagName('*');
// Loop through each element and replace any instances of "undefined"
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
for (var j = 0; j < element.childNodes.length; j++) {
var node = element.childNodes[j];
if (node.nodeType === 3) {
var text = node.nodeValue;
var replacedText = text.replace(/undefined/gi, '');
if (replacedText !== text) {
element.replaceChild(document.createTextNode(replacedText), node);
}
}
}
}
},
error: function(jqXHR, textStatus, errorThrown) {
console.log("AJAX error: " + textStatus + ' : ' + errorThrown);
}
});
});
/* Check if string is valid UUID */
function checkIfValidUUID(str) {
// Regular expression to check if string is a valid UUID
const regexExp = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi;
return regexExp.test(str);
}
function openModal() {
document.getElementById("myModal").style.display = "block";
}
function closeModal() {
document.getElementById("myModal").style.display = "none";
}
//var slideIndex = 1;
//showSlides(slideIndex);
function plusSlides(n) {
showSlides(slideIndex += n);
}
function currentSlide(n) {
showSlides(slideIndex = n);
}
function showSlides(n) {
$('#img_selected')[0].src = n.src;
$('#myModal').show();
}
function hideModal() {
$('#myModal').hide();
}
function showModal(src) {
$("#img_selected").attr("src", src);
$('#myModal').show();
}
function hideModal() {
$('#myModal').hide();
}
function ShowBlankOrValue(value)
{
var retVal = '';
if (value != undefined)
{
retVal = value;
}
return retVal;
}
Pricing
Additional Information