Skip to Main Content
#= data.Name ? data.Name : data.Sku #
Mfr Part\\#: #:ManufacturerItemNumber#
Total Qty in Stock:" + stockInfoLink; } } var dlgStockInfo = null; function showStockInquiry(link) { var sx = $(link); var p = JSON.parse(sx.attr('data-properties')); var progressTarget = $(document.body); kendo.ui.progress(progressTarget, true); if (!dlgStockInfo) { dlgStockInfo = $("#dlgStockInfo").kendoDialog({ title: 'Stock Inquiry', width: 450, closable: true, modal: true, visible: false }).data("kendoDialog"); dlgStockInfo.wrapper.addClass('cart-dialog'); dlgStockInfo.wrapper.find('.k-window-title').prepend(''); } $.post('/api/sitecore/Products/ProductStockInquiry', { 'p': p }) .done(function(result) { kendo.ui.progress(progressTarget, false); dlgStockInfo.content(result).open(); }); } function checkMSRP() { $(".item-container-pricing.main-price:contains('$0.01')").html(""); $(".item-container-pricing.field-msrp:contains('0.01')").html(" Call for Pricing"); }function loadPricing(pricePrefix, addSelector, hideTotalQty) { addSelector = addSelector || '.related-product-add'; var reqs = [], ctlHash = {}; $((pricePrefix ? pricePrefix : '') + '.item-container-pricing[data-properties]').each(function (i, ph) { phx = $(ph); var qtyInput = phx.closest('.product-detail-container').find('.k-input[data-role=numerictextbox]'); var pd = JSON.parse(phx.attr('data-properties')); var qty = (qtyInput.length ? qtyInput.val() : !pd.MOQ ? 1 : parseInt(pd.MOQ)); var uuid = (pd.itemNumber + "_" + qty + "_" + reqs.length); //BL: container id is not setup yet ctlHash[uuid] = { "data": pd, "control": phx }; reqs.push({ "UUID": uuid, "itemNumber": pd.itemNumber, "sku": pd.sku, "msrp": pd.msrp, "Quantity": qty, "HasAlternates": pd.HasAlternates, "HasAccessories": pd.HasAccessories }); if ((priceContext == null || !priceContext.IsAuthenticated) && pricePrefix == 'div.search-results.product-list ' && (pd.HasAccessories == 'True' || pd.HasAlternates == 'True')) { buildRelationshipLink(null, pd, phx); } }); //BL: don't get contract pricing if you don't have a valid user who is allowed to see it if (priceContext == null || !priceContext.IsAuthenticated /*|| priceContext.HideContractPricing*/) { checkMSRP(); return; } $.post('/api/sitecore/Products/GetPricingMulti', { "context": priceContext, "priceRequests": reqs, "dealIds": globalDealIds }) .done(function (prices) { if (prices) { $.each(prices, function (pi, p) { var px = ctlHash[pi]; var ph = px.control, pd = px.data, phParent = ph.parent(); var cnt = ph.closest(ph.hasClass('main-price') || ph.hasClass('field-msrp') ? '.product-detail-container' : '.related-product-container'); if (priceContext.CanCreateCart && pd.webOrdering !== 'ViewOnly') { cnt.addClass('buyable'); } // put price in if (!p.DealerAuthorized) { var add = cnt.find(addSelector).first(); setupGetAuthorizedCTA(add, ph); } else { if (pd.displayRetail === 'C' || pd.msrp === "0.01") { ph.html('Call for Pricing'); } else if (!priceContext.HideContractPricing) { ph.html('
MSRP | Your Price |
---|
' + qtyStr + '
').appendTo(phParent); } } } triggerPricingEvent(pricePrefix, phParent, pd, p); }); } }); } function triggerPricingEvent(pricePrefix, prcElem, productData, prcDetail) { const evtPricing = new CustomEvent('product.pricing', { detail: { pricePrefix: pricePrefix, element: prcElem, product: productData, price: prcDetail } }); window.dispatchEvent(evtPricing); } function onAccountSelect(e) { selectAccount(e.dataItem); } var pageAccountChangeHandler = null; function selectAccount(a) { //BL: throw an event here for other pages to listen to // - should we keep reload from always happening? // - can we check if handler is subcribed and only reload if not? kendo.ui.progress($(document.body), true); $.get('/api/sitecore/Account/SelectAccount', { "CustomerNumber": a.CustomerNumber, "Name": a.Name, "Description": a.Description } ) .done(function (data) { if (pageAccountChangeHandler) { // fix stuff in header and let page handler do the rest $("div.account-name").html(a.Description); priceContext.CustomerNumber = a.CustomerNumber; pageAccountChangeHandler(a); //B (4.21.22): horrible code necessary to hide account nav menu after selection var ac = $("#accountMenu .child-navigation"); $("#ddlAccounts").focus(); ac.hide(); ac.mouseleave(); ac.show(); kendo.ui.progress($(document.body), false); } else { document.location.reload(); // reload everything to make sure account gets applied } }); } function addCartItem(itemId, sku, qty, persist, origin) { if (origin === undefined) { origin = ""; } // update count overlay (and show, if need be) var lblCount = $("#cartItemCount"); if (!cartItemCount) { cartItemCount = parseInt(lblCount.html()); } // animate, while waiting lblCount.html(""); cartItemCount += qty; if (persist) { $.post('/api/sitecore/Carts/AddItem', { "sku": sku, "materialId": itemId, "quantity": qty, "origin": origin, "dealIds": globalDealIds }) .done(function (result) { // nothing really needs done here, yet ... already updated count lblCount.html(cartItemCount.toString()); hideShowCartCount(lblCount, cartItemCount); }) .fail(function (error) { alert('Issue adding item to cart: ' + error.statusText); lblCount.html("?"); }); } else { lblCount.html(cartItemCount.toString()); } } function hideShowCartCount(lblCount, cnt) { var pdiv = lblCount.parent(); if (cnt && !pdiv.is(":visible")) { pdiv.show(); } else if (cnt <= 0 && pdiv.is(":visible")) { pdiv.hide(); } } function updateCartItemCount(cnt) { cartItemCount = cnt; var lblCount = $("#cartItemCount"); lblCount.html(cartItemCount.toString()); hideShowCartCount(lblCount, cnt); } function login(returnUrl) { document.location = '/api/sitecore/Account/SignUpSignIn' + (returnUrl ? '?returnUrl=' + encodeURIComponent(returnUrl) : ''); } function logout(returnUrl) { document.location = '/api/sitecore/Account/SignOut' + (returnUrl ? '?returnUrl=' + encodeURIComponent(returnUrl) : ''); } var scopes = ['search-all', 'search-product','search-blogs']; function submitSearch(searceInputId) { // close search and auto-complete $('.search-btn').click(); $('#search').data("kendoAutoComplete").close(); var sval = $("#" + searceInputId).val(); var searchUrl = ''; if ($("#rbSearchProducts").is(":checked")) { searchUrl = '/shop#search-product_e=0&search-product_q=' + sval; } else { searchUrl = '/search'; $.each(scopes, function (i, s) { searchUrl += (i == 0 ? '#' : '&') + /*s + '_e=0&' +*/ s + '_q=' + sval; }); } document.location.href = searchUrl; } function setupGetAuthorizedCTA(ctrlAdd, ctrlPH) { // create cta button in ctrl ctrlAdd.html("Get Authorized
' + shopMessage + '
').prependTo(warningContainerSelector || '#main-content > .container > .row'); } } var productFlags = { 'Featured': { label: 'Featured', info: 'This product is featured in some promotion.', class:'flag-featured' }, 'Rebox': { label: 'ReBox', info: 'ReBox products are new, undamaged and have full factory warranty. They arrived at our warehouse in a damaged carton, and do not meet our standards to be sold as new.', class: 'flag-rebox' }, 'BStock': { label: 'B-Stock', info: 'B-Stock products are functional products that may be in an impaired physical condition, missing items or both. Standard DOA return policies apply.', class: 'flag-bstock' }, 'NonReturnable': { label: 'Non-Returnable', info: 'Non-Returnable products can not be returned once they have been shipped.', class: 'flag-non-returnable' }, 'NonCancelable': { label: 'Non-Cancelable', info: 'Non-Cancelable products can not be canceled once the order is confirmed in our system.', class: 'flag-non-cancelable' }, 'New': { label: 'New', info: 'Specialty Items are products or services that are called out as being featured, new or end-of-life', class: 'flag-new' }, 'EndOfLife': { label: 'End of Life', info: 'Specialty Items are products or services that are called out as being featured, new or end-of-life', class: 'flag-end-of-life' }, 'Clearance': { label: 'Clearance', info: 'Item marked for clearance', class: 'flag-end-of-life' }, 'PendingObsolete': { label: 'Pending Obsolescence', info: 'The manufacturer has announced that the item will soon be discontinued. Contact your sales rep for more details and potential replacement information.', class: 'flag-end-of-life' } }; function setupFlagTooltip(img) { var fdata = img.getAttribute('flag-data'); var ttContent = ''; var flags = fdata.split('|'); for (var i = 0; i < flags.length; ++i) { var fname = flags[i]; if (fname) { var f = productFlags[fname]; if (typeof f !== 'undefined') { ttContent += '
' + f.info + '
'; } } } ttContent += '
', { 'class': 'cbxWrapper', 'data-cbxvalue': name }) .append( $(document.createElement('input')).prop({ 'id': 'cbxEcommUser' + counter, 'name': 'userEmail', 'value': email, 'type': 'checkbox' }) ).append( $(document.createElement('label')).prop({ 'for': 'cbxEcommUser' + counter }).html(name)) ); } function removeHtmlTags(str) { if ((str===null) || (str==='')) return false; else str = str.toString(); return str.replace( /(<([^>]+)>)/ig, ''); } function getuuid() { return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) ); } function sendEmails(chosenElements, cartid, cartname, message) { var emails = []; chosenElements.each(function () { emails.push($(this).val()); }); $.post('/api/sitecore/Carts/NotifySharedCart', { "emails": emails, "cartid": cartid, "cartname": cartname, "note": message }) .done(function (result) { }); } var dlgCreateQuote = null; function confirmCreateQuote() { //BL: check if there is anything to quote if (!order || !order.Lines || order.Lines.length == 0) { showNotification('Please add items to your cart before creating a quote', 'error'); return; } if (!dlgCreateQuote) { dlgCreateQuote = $("#dlgCreateQuote").kendoDialog({ title: 'Create Quote', closable: true, modal: true, top: 100 }).data("kendoDialog"); dlgCreateQuote.wrapper.addClass('cart-dialog'); dlgCreateQuote.wrapper.find('.k-window-title').prepend(''); dlgCreateQuote.wrapper.find('.k-dialog-close').prepend('Close'); dlgCreateQuote.wrapper.attr("style", "top:" + (document.body.scrollTop + 50) + "px"); dlgCreateQuote.wrapper.find('.cancel-button').on('click', function () { dlgCreateQuote.close(); }); dlgCreateQuote.wrapper.find('.save-button').on('click', function () { createQuote(); dlgCreateQuote.close(); }); } dlgCreateQuote.open(); } function createQuote(cartScopeID = null, cartID = null) { if (cartScopeID == null) { //quote is coming from brand new cart var dlg = dlgCreateQuote.wrapper; var name = dlg.find("#edQuoteName").val(); var desc = dlg.find("#edQuoteDecription").val(); var mediaType = dlg.find("input[name='quoteMedia']:checked").val(); var isExcel = mediaType == "excel" ? true : false; var newName = (name !== null && name.trim() !== '') ? name : + '-' + formatShortDate(new Date()); buildQuote(newName, desc, order, itemMeta, isExcel); } else { //quote is coming from existing cart - currently forcing to PDF and using cart name/description $.get('/api/sitecore/Carts/GetCartContextForQuote', { "cartScopeId": cartScopeID, "cartId": cartID }) .done(function (quote) { buildQuote(quote.quoteName, quote.quoteDescription, quote.cartContext.Order, quote.cartContext.ItemMeta, false); }); } } function buildQuote(name, desc, cartorder, cartitemmeta, isExcel) { //BL: need to have window popup call come from main UI thread to avoid popup blocker var d2 = window.open(); var progresstarget = $(d2.document.body); kendo.ui.progress(progresstarget, true); $.post('/api/sitecore/Carts/CreateQuote',{ "name": name, "description": desc, "cart": { "Order": cartorder, "ItemMeta": cartitemmeta }, "isExcel": isExcel }) .done(function (quote) { if (quote != null) { var custnum = quote.ValidForCustomerNum; var username = quote.CreatorName.replace(" ", "-").toLowerCase(); var filename = quote.ID.toString() + quote.FileTypeExtension; if (isExcel) { buildExcelQuote(quote, custnum, username, filename); } else { kendo.ui.progress(progresstarget, false); d2.document.location = '/~/media/Project/scansource/scansourceweb/quotes/' + custnum + "/" + username + "/" + filename, '_blank'; } } else { window.alert('An error occurred while processing your quote. Please try again or contact your ScanSource sales representative.'); } }); } function buildExcelQuote(quote, custnum, username, filename) { var progresstarget = $("body"); var createDate = parseJsonDate(quote.CreationDate); var expireDate = parseJsonDate(quote.ExpirationDate); var title = "ScanSource Quote - " + quote.ValidForCustomerName + "-" + formatShortDate(createDate, true, false) + "-" + createDate.getMilliseconds(); var headercount = 6; var rows = [{}]; if (quote.Name != null && quote.Name != "") { rows.push({ cells: [{ value: 'Quote Name: ' + quote.Name, colSpan: 5 }] }) headercount++; } rows.push({ cells: [ { value: 'Requested By: ' + quote.CreatorName, colSpan: 5 }, { value: 'Date Created: ' + formatShortDate(createDate, false, true), colSpan: 4, textAlign: "right" } ] }) rows.push({ cells: [ { value: 'Valid For: ' + quote.ValidForCustomerName + " (" + quote.ValidForCustomerNum + ")", colSpan: 5 } //,{ value: 'Quote Expiration: ' + formatShortDate(expireDate, false, true), colSpan: 4, textAlign: "right" } ] }) if (quote.SalesRepEmail != null && quote.SalesRepEmail != "") { rows.push({ cells: [ { value: 'Sales Rep Email: ' + quote.SalesRepEmail, colSpan: 5 } ] }) headercount++; } if (quote.Description != null && quote.Description != "") { rows.push({ cells: [ { value: 'Quote Description: ' + quote.Description, colSpan: 9, wrap: true, verticalAlign: "top" } ] }) headercount++; } rows.push({ cells: [{}] }) rows.push({ cells: [ { value: title, background: "#f4a361", fontSize: 30, bold: true, colSpan: 9, verticalAlign: "center" } ], height: 50 }) rows.push({ cells: [ { value: 'Item#', background: "#f1f586", bold: true, fontSize: 18, borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 }, borderLeft: { color: "#000000", size: 1 } }, { value: 'Description', background: "#f1f586", bold: true, fontSize: 18, borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 } }, { value: 'Stock', background: "#f1f586", bold: true, fontSize: 18, textAlign: "Right", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 } }, { value: 'Discounts', background: "#f1f586", bold: true, fontSize: 18, borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 } }, { value: 'Discount Notes', background: "#f1f586", bold: true, fontSize: 18, borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 } }, { value: 'MSRP', background: "#f1f586", bold: true, fontSize: 18, textAlign: "Right", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 } }, { value: 'Price', background: "#f1f586", bold: true, fontSize: 18, textAlign: "Right", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 } }, { value: 'Qty', background: "#f1f586", bold: true, fontSize: 18, textAlign: "Right", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 } }, { value: 'Total', background: "#f1f586", bold: true, fontSize: 18, textAlign: "Right", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 } } ], height: 35 }); // Use fetch so that you can process the data when the request is successfully completed. for (var i = 0; i < quote.QuoteLines.length; i++) { var color = i % 2 == 1 ? "#eff8ff" : "#ffffff"; rows.push({ cells: [ { value: quote.QuoteLines[i].ManufacturerItemNumber, background: color, verticalAlign: "top", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 }, borderBottom: { color: "#000000", size: 1 }, borderLeft: { color: "#000000", size: 1 } }, { value: quote.QuoteLines[i].Description == "null" ? '' : quote.QuoteLines[i].Description, wrap: true, background: color, verticalAlign: "top", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 }, borderBottom: { color: "#000000", size: 1 } }, { value: quote.QuoteLines[i].QuantityAvailable, format: '#', background: color, verticalAlign: "top", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 }, borderBottom: { color: "#000000", size: 1 } }, { value: quote.QuoteLines[i].SPADescription == "null" ? '' : quote.QuoteLines[i].SPADescription, wrap: true, background: color, verticalAlign: "top", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 }, borderBottom: { color: "#000000", size: 1 } }, { value: quote.QuoteLines[i].SPARestriction == "null" ? '' : quote.QuoteLines[i].SPARestriction, wrap: true, background: color, verticalAlign: "top", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 }, borderBottom: { color: "#000000", size: 1 } }, { value: quote.QuoteLines[i].MSRP, format: '$#.00', background: color, verticalAlign: "top", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 }, borderBottom: { color: "#000000", size: 1 } }, { value: quote.QuoteLines[i].Price, format: '$#.00', background: color, verticalAlign: "top", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 }, borderBottom: { color: "#000000", size: 1 } }, { value: quote.QuoteLines[i].Quantity, background: color, verticalAlign: "top", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 }, borderBottom: { color: "#000000", size: 1 } }, { value: quote.QuoteLines[i].ExtPrice, format: '$#.00', background: color, verticalAlign: "top", borderTop: { color: "#000000", size: 1 }, borderRight: { color: "#000000", size: 1 }, borderBottom: { color: "#000000", size: 1 } } ], height: 40 }) } rows.push({ cells: [{}, {}, {}, {}, {}, { value: 'Total: ', background: "#ffffff", textAlign: "right" }, { value: quote.Total, format: '$#.00', background: "#ffffff", colSpan: 2, textAlign: "right" } ], height: 30 }) rows.push({ cells: [{}, { value: 'Thank you for your business. Please note that pricing, dates and availability are subject to change without notice. Due to fluctuations in the exchange rate, all prices are subject to change until invoiced. ScanSource Trading Terms apply to the exclusion of any other terms.', background: "#ffffff", color: "#0D47A1", colSpan: 6, wrap: true, textAlign: "center", verticalAlign: "top" }], height: 45 }) rows.push({ cells: [{}] }) rows.push({ cells: [{}] }) rows.push({ cells: [ { value: 'Reference # : ' + quote.ValidForCustomerName.replace(/[^a-zA-Z0-9-]/, "") + "-" + quote.ID, colSpan: 9 } ] }) var workbook = new kendo.ooxml.Workbook({ sheets: [ { frozenRows: headercount, columns: [ { width: 150 }, { width: 400 }, { autoWidth: true }, { width: 300 }, { width: 300 }, { autoWidth: true }, { autoWidth: true }, { autoWidth: true }, { autoWidth: true } ], title: 'ScanSource Custom Quote', rows: rows, } ], }); var data = workbook.toDataURL(); var base64 = data.split(";base64,")[1]; $.post('/api/sitecore/Carts/UploadQuote', { "file": base64, "quote": quote }) .done(function (success) { if (success) { kendo.ui.progress(progresstarget, false); document.location.href = '/~/media/Project/scansource/scansourceweb/quotes/' + custnum + "/" + username + "/" + filename; } else { window.alert('An error occurred while processing your quote. Please try again or contact your ScanSource sales representative.'); } }); } function formatShortDate(date, pad, slashes) { var year = date.getFullYear(); var month = pad ? String(date.getMonth() + 1).padStart(2, '0') : String(date.getMonth() + 1); var day = pad ? String(date.getDate()).padStart(2, '0') : String(date.getDate()); return slashes? [month, day, year].join('/') : year + month + day; } function parseJsonDate(jsonDateString) { return new Date(parseInt(jsonDateString.replace(/\D/g, ''))); } var dlgSessionTimeout = null; function scKeepAlive() { // check if user is still authenticated $.post('/api/sitecore/Base/Ping') .done(function (res) { if (!res || !res.IsAuthenticated) { // clear timed ping if (keepAlive) { window.clearInterval(keepAlive); } // show dialog if (dlgSessionTimeout) { dlgSessionTimeout.show(); } else { dlgSessionTimeout = $("#dlgSessionTimeout").kendoDialog({ title: false, content: '
Are you still there?
Your session has timed out due to an extended period of inactivity
', width: 400, modal: true, closable: false, buttonLayout: "normal", actions: [{ text: "I'm Here", primary: true, action: function (e) { document.location.href = '/api/sitecore/Account/SignUpSignIn?returnUrl=' + encodeURIComponent(document.location.href); return true; } }, { text: "Sign out", action: function (e) { document.location.reload(); return true; } }] }).data("kendoDialog"); } } }); }Wisenet IP Installer Tool
-
shop Hanwha Vision >
NEED MORE HELP?
Wisenet IP Installer Tool
The IP Installer Tool is an easy-to-download program that allows the user to search for any Hanwha IP camera that resides on the local network. It also allows the user to manually set the individual IP addresses of each camera in one location, which eliminates the need to enter each individual camera’s GUI to set the appropriate network settings.