User Login

Shopping cart

You do not have any items in your cart.

"); $('.btnlist').html('' + jstxtstartshoppingyo + ''); $('#shoppingcartbutton').html(''); $('.navcarttxt').html(jstxtcart); $('.quotesarea').hide(); $("#btnscrolltosavelater").hide(); $(".cartmsg_hideonzero").hide(); } else { $('#cartsubtotalitemqty').parent().hide(); $(".subTotalPrice").hide(); $('#cartsubtotalsrow').find('td:last').show().html(''); updateTotalPriceAndQuantity(); UpdateCartItemCount(); } } }, "json"); return false; }); $("input.cartitemqtbox").focus(function () { $("#cartqtyupdatego_" + $(this).attr("data-cartid")).css("visibility", "visible"); currentItemQuantity = $(this).val(); $('.cartrowdenymessage').hide(); $("#cartmsgdeny_" + $(this).attr("data-cartid")).remove(); }); $("input.cartitemqtbox").focusout(function () { $("#cartqtyupdatego_" + $(this).attr("data-cartid")).css("visibility", "hidden"); }); $("a.cartitemupd").click(function (e) { e.preventDefault(); }); $("input.cartitemqtbox").change(function () { $('input.cartitemqtbox').attr('readonly', 'true'); var elem = $(this); cartid = $(this).attr("data-cartid"); var maxItemCount = parseInt($('#cartitemmaxavail_' + cartid).val()); var isMinBuyQtyAllowed = $('#isminbuyqtyoptionallowed').val(); var minBuyQty = parseInt($('#cartitemminbuyqty_' + cartid).val()); var enteredValue = parseInt($(this).val()); var locationName = $("#isconditionalvienabled").val() == "allow" || $("#isretailconditionalenabled").val() == "allow" ? " " : " " + $("#cartitemfrom_" + cartid).html(); var backOrderAllowed = $("#isbackordersallowed").val(); var errorMessage = ""; if (enteredValue > maxItemCount && backOrderAllowed == "deny") { errorMessage = $('#cartitempartnumb_' + cartid).val() + ' ' + jstxtcannotbepurchased + '. ' + txtcurrentlyAvailText.replace('{{stock}}', maxItemCount) + '.'; } if (isMinBuyQtyAllowed == "allow" && enteredValue % minBuyQty != 0) { errorMessage += '

' + $('#cartitempartnumb_' + cartid).val() + " "+jstxtcanonlybepurchasedqty+" " + minBuyQty + "
"+jstxtquantity+" " + enteredValue + " "+jstxtcannotbeaddedtocart+"

"; } if (errorMessage) { $('
' + errorMessage + '
').insertBefore($('#saveforlater_' + cartid)); elem.val(currentItemQuantity); $('input.cartitemqtbox').removeAttr('readonly'); return false; } else { if (currentItemQuantity == enteredValue) { $('input.cartitemqtbox').removeAttr('readonly'); return false; } cartoh = parseInt(elem.next().children('a').attr("data-cartoh"), 10); $.post($("#storeurl_carthandler").val(), { mode: "updateitem", cid: cartid, cqty: $("#cartqty_" + cartid).val() }, function (data) { if (data.error != null) { alert(data.error); } else if (data.cupdated != null) { ciqtu = parseInt(data.cartquantity, 10); if (ciqtu <= cartoh) { $("#cartmsgdeny_" + cartid).remove(); } var cartItemQuant = $("#cartqty_" + cartid).val(); var cartItemPrice = $("#cartitembasecost_" + cartid).val(); $("#cartcosttotal_" + cartid).html(''); $('#cartsubtotalitemqty').parent().hide(); $(".subTotalPrice").hide(); $('#cartsubtotalsrow').find('td:last').show().html(''); var cartCostTotal = cartItemQuant * cartItemPrice; $.post($("#storeurl_currencyprint").val(), { "c": parseFloat(cartCostTotal).toFixed(2) }, function (data) { $("#cartcosttotal_" + cartid).html(data.currencytxt); }, "json"); updateTotalPriceAndQuantity(); $("tr.cartrow_" + cartid).effect("highlight"); $("#cartqtyupdatego_" + cartid).css("visibility", "hidden"); } else if (data.cremoved != null) { $("tr.cartrow_" + cartid).remove(); initialCartCount--; if (initialCartCount <= 0) { $('.cartcontents').html("

" + jstxtnoitemsincart + "

"); $('.btnlist').html('' + jstxtstartshoppingyo + ''); $('#shoppingcartbutton').html(''); $('.navcarttxt').html(jstxtcart); $("#btnscrolltosavelater").hide(); $(".cartmsg_hideonzero").hide(); } else { $('#cartsubtotalitemqty').parent().hide(); $(".subTotalPrice").hide(); $('#cartsubtotalsrow').find('td:last').show().html(''); updateTotalPriceAndQuantity(); UpdateCartItemCount(); } } $('input.cartitemqtbox').removeAttr('readonly'); }, "json"); return false; } }); function updateTotalPriceAndQuantity() { var totalQuantity = 0; var totalPrice = 0.00; $('.table > tbody > tr').each(function (index, tr) { if ($(tr).hasClass('cartmainrow')) { var itemCartId = $(tr).find('.cartitemqtbox').attr('data-cartid'); var ItemQuant = $("#cartqty_" + itemCartId).val(); var ItemPrice = $("#cartitembasecost_" + itemCartId).val(); totalQuantity += parseInt(ItemQuant); totalPrice += ItemPrice * ItemQuant; } }); var itemsText = totalQuantity > 1 ? "TXT_ITEMS" : "TXT_ITEM" $.post("/store/json-langtxt", { "langkey": itemsText }, function (data) { $('#cartsubtotalitemqty').html(totalQuantity + ' ' + data.langtxt); }, "json"); $.post($("#storeurl_currencyprint").val(), { "c": parseFloat(totalPrice).toFixed(2) }, function (data) { $(".subTotalPrice").html(data.currencytxt); $('#cartsubtotalitemqty').parent().show(); $(".subTotalPrice").show(); $('.totalPriceLoaderImage').remove(); }, "json"); } function UpdateCartItemCount() { $.post($("#storeurl_carthandler").val(), { mode: "cartcount" }, function (data) { $('#shoppingcartbutton').html(' (' + data.cartitemcount +')'); $('.navcarttxt').html(jstxtcart + ' (' + data.cartitemcount + ')'); }, "json"); } $(document).on("keydown", "form", function (event) { if (event.key == "Enter") { $('input.cartitemqtbox').blur(); return false; } }); var qwarnevents = []; $(".saveforlater").click(function () { var id = $(this).data("id"); $("#saveforlater_" + id).hide(); $("#newquotebox_" + id).val(''); $("#saveforlaterform_" + id).show(); $("select#existingquotes_" + id + " option[value='0']").hide(); $("select#existingquotes_" + id).chosen({ disable_search_threshold: 4, width: '220px' }); if(qwarnevents[id] == null) { qtwarnat = 15; $("#newquotebox_" + id).keypress(function(){if($("#newquotebox_" + id).val().length > qtwarnat){$("#qtitlewarn_"+id).show();}}); qwarnevents[id] = "set"; } }); $(document).on("click", ".btncancelsaveitem", function () { var id = $(this).data("id"); $("#saveforlaterform_" + id).hide(); $("#saveforlater_" + id).show(); }); $(document).on("change", ".newquotebox", function () { var id = $(this).data("id"); $("#existingquotes_" + id).val("0"); $("#existingquotes_" + id).trigger("chosen:updated"); $("#cartmessage_" + id).hide() $("#cartmessage_" + id).removeClass("cartrowdenymessage"); $("#cartmessage_" + id).addClass("bg-success"); }); $(document).on("input", "#moveallquotenamebox", function (e) { $("#titlecountmoveall").html($(this).val().length); }); $(document).on("input", ".newquotebox", function () { var id = $(this).data("id"); $("#titlecount_" + id).html($(this).val().length); }); $(document).on("change", ".existingquotes", function () { var id = $(this).data("id"); $("#newquotebox_" + id).val(""); $("#cartmessage_" + id).hide(); $("#cartmessage_" + id).removeClass("cartrowdenymessage"); $("#cartmessage_" + id).addClass("bg-success"); }); $(document).on("change", ".moveallquotenamebox", function () { $("#moveallexistingquotes").val("0"); $("#moveallexistingquotes").trigger("chosen:updated"); $("#cartmessagemoveall").hide(); $("#cartmessagemoveall").removeClass("cartrowdenymessage"); $("#cartmessagemoveall").addClass("bg-success"); }); $(document).on("change", "#moveallexistingquotes", function () { $(".moveallquotenamebox").val(""); $("#cartmessagemoveall").hide(); $("#cartmessagemoveall").removeClass("cartrowdenymessage"); $("#cartmessagemoveall").addClass("bg-success"); }); $(document).on("click", ".btnsaveitemforlater", function () { qmxl = 25; var id = $(this).data("id"); var newSavedItemQuoteName = $("#newquotebox_" + id).val() || ""; var selectedQuoteId = parseInt($("#existingquotes_" + id).val(), 10); selectedQuoteId = isNaN(selectedQuoteId) ? 0 : selectedQuoteId; var selectedQuoteName = newSavedItemQuoteName == "" || newSavedItemQuoteName == undefined ? $("#existingquotes_" + id + " option:selected").text() : newSavedItemQuoteName; if (selectedQuoteId > 0 || newSavedItemQuoteName != "") { if (newSavedItemQuoteName != "" && newSavedItemQuoteName.length >= qmxl) { $("#cartmessage_" + id).html("Title cannot exceed 25 characters"); $("#cartmessage_" + id).removeClass("bg-success"); $("#cartmessage_" + id).addClass("cartrowdenymessage"); $("#cartmessage_" + id).show(); return false; } var cartItemId = $(this).data("id"); var dataObj = { mode: $("#additemtoquotemode").val(), cartItemId: cartItemId, quoteId: selectedQuoteId, quoteTitle: newSavedItemQuoteName } $.post(quotesWebMethodsUrl, dataObj, function (response) { if (response.aybabtu == "win") { $("#saveforlaterform_" + id).hide(); var messageBox = $("#cartmessage_" + id).wrap("

").parent().html(); var partNumber = $(".cartrow_" + id).first().find(".cartpartnumber").html(); $(".cartrow_" + id).first().remove(); $(".cartrow_" + id).last().find(".cartitemdesc").html(messageBox); $("#cartmessage_" + id).html(partNumber + " " + jstxtmovedtosavedcart + ": " + selectedQuoteName + ""); $("#cartmessage_" + id).show(); $("#showsavedquotesbutton").show(); $.post(quotesWebMethodsUrl, { cartItemId: id, mode: $("#getuserquotesmode").val() }, function (quotesResponse) { if (quotesResponse.aybabtu == "win") { $(".existingquotetd").removeClass("existingquotetdhidden"); $("#moveallexistingquotes").html(quotesResponse.data) $(".existingquotes").html(quotesResponse.data); $("select#moveallexistingquotes option[value='0']").hide(); $("select.existingquotes option[value='0']").hide(); $("select#moveallexistingquotes").chosen({ disable_search_threshold: 4 }); $("select.existingquotes").chosen({ disable_search_threshold: 4, width: '220px' }); $("select#moveallexistingquotes").trigger("chosen:updated"); $("select.existingquotes").trigger("chosen:updated"); } }, "json"); initialCartCount--; if (initialCartCount <= 0) { $('.cartcontents').html("

" + jstxtnoitemsincart + ".

"); $('.btnlist').html('' + jstxtstartshoppingyo + ''); $('#shoppingcartbutton').html(''); $('.navcarttxt').html(jstxtcart); $('.moveallquoteshtml').html('
'+jstxtmovedtoquotew00t+': ' + selectedQuoteName + '
'); $("#btnscrolltosavelater").hide(); $(".cartmsg_hideonzero").hide(); } else { $('#cartsubtotalitemqty').parent().hide(); $(".subTotalPrice").hide(); $('#cartsubtotalsrow').find('td:last').show().html(''); updateTotalPriceAndQuantity(); UpdateCartItemCount(); } } else { $("#cartmessage_" + id).html(response.error); $("#cartmessage_" + id).removeClass("bg-success"); $("#cartmessage_" + id).addClass("cartrowdenymessage"); $("#cartmessage_" + id).show(); } }, 'json'); } else { $("#cartmessage_" + id).html(jstxtquotenotselected); $("#cartmessage_" + id).removeClass("bg-success"); $("#cartmessage_" + id).addClass("cartrowdenymessage"); $("#cartmessage_" + id).show(); } }); $(document).on("click", "#btnmoveallitems", function () { qmxl = 25; var moveItemsQuoteName = $("#moveallquotenamebox").val() || ""; var selectedQuoteId = parseInt($("#moveallexistingquotes").val(), 10); selectedQuoteId = isNaN(selectedQuoteId) ? 0 : selectedQuoteId; var moveAllSelectedQuoteName = moveItemsQuoteName == "" || moveItemsQuoteName == undefined ? $("#moveallexistingquotes option:selected").text() : moveItemsQuoteName; if (selectedQuoteId > 0 || moveItemsQuoteName != "") { if (moveItemsQuoteName != "" && moveItemsQuoteName.length >= qmxl) { $("#cartmessagemoveall").html("Title cannot exceed 25 characters"); $("#cartmessagemoveall").removeClass("bg-success"); $("#cartmessagemoveall").addClass("cartrowdenymessage"); $("#cartmessagemoveall").show(); return false; } var dataObj = { quoteId: selectedQuoteId, quoteTitle: moveItemsQuoteName, mode: $("#movecarttoquotemode").val() }; $.post(quotesWebMethodsUrl, dataObj, function (response) { if (response.aybabtu == "win") { $("#cartmessagemoveall").show().html(response.savedcarturl); $('.cartcontents').html("

" + jstxtnoitemsincart + ".

"); $('.btnlist').html('' + jstxtstartshoppingyo + ''); $('#shoppingcartbutton').html(''); $('.navcarttxt').html(jstxtcart); $("#cartmessagemoveall").hide(); $('.moveallquoteshtml').html('
'+jstxtmovedtoquotew00t+' (' + moveAllSelectedQuoteName + ') - '+jstxtgotosavedcart+'
'); $("#btnscrolltosavelater").hide(); $("#showsavedquotesbutton").show(); } else { $("#cartmessagemoveall").html(response.error); $("#cartmessagemoveall").removeClass("bg-success"); $("#cartmessagemoveall").addClass("cartrowdenymessage"); $("#cartmessagemoveall").show(); } }, 'json'); } else { $("#cartmessagemoveall").html(jstxtquotenotselected); $("#cartmessagemoveall").removeClass("bg-success"); $("#cartmessagemoveall").addClass("cartrowdenymessage"); $("#cartmessagemoveall").show(); } }); $("#moveallquotenamebox").keypress(function(){ qtwarnat = 15; if($("#moveallquotenamebox").val().length > qtwarnat){ $("#moveallquotewarnstub").hide(); $("#moveallquotewarn").show(); } }); $("select#moveallexistingquotes option[value='0']").hide(); $("select#moveallexistingquotes").chosen({ disable_search_threshold: 4 }); $("#btnscrolltosavelater").click(function () { var element = document.getElementById("moveallquoteshtml"); element.scrollIntoView(); $('#moveallquoteshtml').effect("highlight", { padding : false}, 2000); }); $(document).on("click", "#showsavedquotesbutton", function () { location.href = $(this).data('url'); });