Tour Guides
0065 8161 5060
No Records Found
function submitContactForm(modalId, guide_code) { //var ul=$('#errorNotice'+modalId); var ul = document.getElementById("errorNotice"+modalId); var firstName=$('#'+modalId+' #name_contact').val(); var lastName=$('#'+modalId+' #lastname_contact').val(); var subject=$('#'+modalId+' #phone_contact').val(); var email=$('#'+modalId+' #email_contact').val(); var message=$('#'+modalId+' #message_contact').val(); var guide_id=$('#'+modalId+' #guide_id').val(); /*var node = document.createElement("LI"); // Create a
  • node var textnode = document.createTextNode("Water"); // Create a text node node.appendChild(textnode); // Append the text to
  • document.getElementById("myList").appendChild(node);*/ /*var ul = document.getElementById("errorNotice"); var firstName=document.getElementById('name_contact').value; var lastName=document.getElementById('lastname_contact').value; var subject=document.getElementById('phone_contact').value; var email=document.getElementById('email_contact').value; var message=document.getElementById('message_contact').value; var guide_id=document.getElementById('guide_id').value;*/ var valid=true; while (ul.hasChildNodes()) { ul.removeChild(ul.firstChild); } if(firstName==null || firstName=="") { var li = document.createElement("li"); li.innerHTML = "First Name Can't be empty"; ul.appendChild(li); valid=false; } if(lastName==null || lastName=="") { var li = document.createElement("li"); li.innerHTML = "Last Name Can't be empty"; ul.appendChild(li); valid=false; } if(subject==null || subject=="") { var li = document.createElement("li"); li.innerHTML = "Subject Can't be empty"; ul.appendChild(li); valid=false; } if(email==null || email=="") { var li = document.createElement("li"); li.innerHTML = "Email Can't be empty"; ul.appendChild(li); valid=false; } else { var atpos = email.indexOf("@"); var dotpos = email.lastIndexOf("."); if (atpos<1 || dotpos=email.length) { var li = document.createElement("li"); li.innerHTML = "Enter a valid email"; ul.appendChild(li); valid=false; } } if(message==null || message=="") { var li = document.createElement("li"); li.innerHTML = "Message Can't be empty"; ul.appendChild(li); valid=false; } if(valid==true) { var dataString="guide_code="+guide_code+"&firstName="+firstName+"&lastName="+lastName+"&subject="+subject+"&email="+email+"&message="+message+"&guide_id="+guide_id+"&insert="; $.ajax({ type: "POST", url:"http://singaporedeals4u.com/customer_messages.php", data: dataString, async: false, crossDomain: true, cache: false, beforeSend: function(){ document.getElementById('submit-contact').disabled=true; }, success: function(data){ //alert(data); //document.getElementById('alert-success-id').style.display="inherit"; //window.location="http://singaporedeals4u.com/all_guides_list.php?msg=ok"; } }); var dataString="firstName="+firstName+"&lastName="+lastName+"&subject="+subject+"&email="+email+"&message="+message+"&guide_id="+guide_id+"&insert="; $.ajax({ type: "POST", url:"http://singaporedeals4u.com/assets/guide_mailer.php", data: dataString, async: false, crossDomain: true, cache: false, beforeSend: function(){ document.getElementById('submit-contact').disabled=true; }, success: function(data){ //document.getElementById('alert-success-id').style.display="inherit"; window.location="http://singaporedeals4u.com/all_guides_list.php?msg=ok"; } }); } } function addtowishlist(id) { $.ajax({ method: "POST", url: "addtowishlist.php", data: {pid: id}, beforeSend: function (msg) { //$("#progress").show(); } }) .done(function (responce) { if (responce) { if (responce == "success") { window.location.replace("wishlist.php"); return false; } else { alert(responce); } } }); } function setcart(id) { var pid = id.split("_"); id = pid[1]; $.ajax({ method: "POST", url: "set_cart.php", data: {prodid: id}, beforeSend: function (msg) { $("#progress").show(); } }) .done(function (responce) { if (responce) { if(responce == "success") { window.location.replace("cart.php?prodid=" + id); } else if(responce == "exist") { alert("product already exist in the cart"); } else { //console.log(responce); alert("Error: please try again"); return false; } } }); } function filter(id) { var price = 0; var rating = 0; var facility = 0; var sort_price = $("#sort_price").val(); var sort_rating = $("#sort_rating").val(); var path = window.location.pathname; var url = path.split("/").pop(); if ($('#' + id).is(':checked')) { price = $('.price:checked').map(function () { return this.id; }).get().join(',') rating = $('.rate:checked').map(function () { return this.id; }).get().join(',') facility = $('.facility:checked').map(function () { return this.id; }).get().join(',') console.log('price:' + price); //console.log('rating:'+rating); } else { price = $('.price:checked').map(function () { return this.id; }).get().join(',') rating = $('.rate:checked').map(function () { return this.id; }).get().join(',') facility = $('.facility:checked').map(function () { return this.id; }).get().join(',') //console.log(price);console.log('rating:'+rating); } $.ajax({ method: "POST", url: "guide_filter.php", // data: {url:url,price:price,rating:rating,facility:facility}, data: {sort_price: sort_price, sort_rating: sort_rating, url: url, price: price, rating: rating, facility: facility}, beforeSend: function (msg) { //$("#progress").show(); } }) .done(function (responce) { if (responce) { console.log(responce); $("#data_content").html(responce); return false; } }); } function getIndex(id) { var path = window.location.pathname; var url = path.split("/").pop(); var sort_price = $("#sort_price").val(); var sort_rating = $("#sort_rating").val(); if ($('#' + id).is(':checked')) { price = $('.price:checked').map(function () { return this.id; }).get().join(',') rating = $('.rate:checked').map(function () { return this.id; }).get().join(',') facility = $('.facility:checked').map(function () { return this.id; }).get().join(',') console.log('price:' + price); //console.log('rating:'+rating); } else { price = $('.price:checked').map(function () { return this.id; }).get().join(',') rating = $('.rate:checked').map(function () { return this.id; }).get().join(',') facility = $('.facility:checked').map(function () { return this.id; }).get().join(',') //console.log(price);console.log('rating:'+rating); } $.ajax({ method: "POST", url: "filter.php", data: {sort_price: sort_price, sort_rating: sort_rating, url: url, page: id, price: price, rating: rating, facility: facility}, beforeSend: function (msg) { //$("#progress").show(); } }) .done(function (responce) { if (responce) { console.log(responce); $("#data_content").html(responce); return false; } }); //alert(id); } function seemore(id){ $("."+id).toggle(); var btntext = $("#SeeMore").text(); if(btntext=="See More"){ $(".SeeMore").text('See Less'); } else { $(".SeeMore").text('See More'); } } function Showcartlimitation(d_type) { if(d_type == 'et') { $('#cartModal').modal({ show: 'true', backdrop: 'static', keyboard: false }); $("#text_message").html("E-ticket is not availible for this guide_profile. Please make seperate order to get E-ticket"); } else if(d_type == 'pt'){ $('#cartModal').modal({ show: 'true', backdrop: 'static', keyboard: false }); $("#text_message").html("Physical-ticket is not availible for this guide_profile. Please make seperate order to get physical ticket"); } } function cartLimit(){ $('#cartModal').modal({ show: 'true', backdrop: 'static', keyboard: false }); $("#text_message").html("Please contact 81615060 for Special price on Bulk Purchase.
    Alternatively, please book additional products in a separate order"); }