'); // $('#tozipcode').append('Please enter Zip/Post code!'); parent.fb.end(); return false; } } function confirmapply() { current_quantity = getCurrentQty(); var zipcode = document.getElementById('zipcode').value; if($('#zipcode_error').length != 0) { $('#zipcode_error').remove(); }	var shiptxt='will apply';	if(document.getElementById("blankchecked").value==1 && current_quantity <= 2500){	shiptxt='Free Shipping';	}	if (zipcode != '') { $('#zipcode_input').removeClass('new_error'); if ($('#zipcode_error').length != 0) { $('#zipcode_error').remove();}var blankprd = 1; if (document.getElementById('blankchecked').value == 2) { blankprd = 2; } var id = 755; var residential = $(".zip_res input[type='radio']:checked").val(); /*if(document.getElementById('residential').checked) { var residential=document.getElementById('residential').value; }else{ var residential=0; }*/ var zipcode = document.getElementById('zipcode').value; if (zipcode != '') { var qty_get = $('#quantity').val(); var quantity=qty_get; var c=qty_get.length; var char_end=quantity.charAt(c-1); if(char_end == '+'){ if(document.getElementById("quantitytxt").value!=''){ quantity = document.getElementById("quantitytxt").value; }else{ quantity = quantity.replace('+',''); } } /*var quantity = document.getElementById('quantity').value;*/ var total = document.getElementById('producttot').value.replace(/[$,]+/g, ""); if ($('#prod_imprint').length > 0) { var fimprint = document.getElementById("prod_imprint").value; } if ($('#prod_simprint').length > 0) { var simprint = document.getElementById('prod_simprint').value; } $.ajax({ type: 'POST', url: 'index.php?route=product/product/shippingestimation/', data: "product_id=" + id + "&postcode=" + zipcode + "&quantity=" + quantity + "&blankstat=" + blankprd + "&total=" + total + "&fimprint=" + fimprint + "&simprint=" + simprint + "&residential=" + residential, dataType: 'json', beforeSend: function() { $('.wait').remove(); $('#apply_ship').attr('disabled', 'true'); if ($('#zipcode_applied').length != 0) { $('#zipcode_applied').remove(); } $('#shipping_content').before('