Menu
SIGN IN / REGISTER
- ALL AUCTIONS
- MAXX DEALS
- WHOLESALE
- PALLETS
'); var url = $(this).attr("href"); }); var ownerAllowsInstantCheckout = false; var autoGenerateInvoices = true; var highlightCheckoutButtonForBuyNow = false; var autoCheckoutForBuyNow = false; contextMessageDictionary["Failure"] = "Failure"; contextMessageDictionary["ListingNotExist"] = "Listing Does Not Exist"; contextMessageDictionary["ListingNotActive"] = "This Listing is Not Active"; contextMessageDictionary["ListerPerformingAction"] = "As the Seller, you cannot bid or purchase your own items."; contextMessageDictionary["Success"] = "Success"; contextMessageDictionary["BuyNowNotAvailable"] = "Buy Now is not available"; contextMessageDictionary["ProxyBeatingNewBid"] = "Another bidder\'s proxy bid is beating your new bid"; contextMessageDictionary["CantLowerProxyBid"] = "You can only increase your proxy bid"; contextMessageDictionary["BidAmountTooLow"] = "Bid amount too low"; contextMessageDictionary["ListingChangedDuringProcessing"] = "This listing changed during processing, please submit again."; contextMessageDictionary["QuantityTooHigh"] = "Quantity must be a number equal to or less than the number available"; contextMessageDictionary["LicenceInvalid"] = "The Licence is invalid. Contact the site administrator for further information."; contextMessageDictionary["ActingUserIsNotAuthorized"] = "You Are Not Authorized"; //show the latest Context message for this acting user $(document).on("SignalR_ListingActionResponse", function (event, data) { //console.log("SignalR_ListingActionResponse DATA:", data); if ($.inArray(data.Action_ListingID, interestingListings) >= 0) { var message = ""; var systemMessage = ""; var cssClass = ""; if (data.Context_IsFilled) { //Context is not null, prepare Context message if (!data.Context_Disregard) { if (!contextMessageDictionary[data.Context_Status]) { console.log("Dev Error: contextMessageDictionary['" + data.Context_Status + "'] is not defined."); message = "Unknown Status"; } else { message = contextMessageDictionary[data.Context_Status].format(data.Context_Parameters); } switch (data.Context_Disposition) { case 0: cssClass = "alert alert-success"; break; case 1: cssClass = "alert alert-warning"; break; case 2: cssClass = "alert alert-danger"; break; } //if Context message wasn't already visible, show it $(".ContextualStatus").each(function () { $(this).html("
" + message + "
"); if (!$(this).is(":visible")) { $(this).fadeTo(1000, 1, function () { $(this).slideDown(500); }); } }); } if (data.Accepted) { //prepare success system message systemMessage = "
×" + contextMessageDictionary["ActionSuccess"] + "
"; if (!$(".awe-rt-ListingActionMessage").is(":visible") || $(".awe-rt-ListingActionMessage").html() == "") { $(".awe-rt-ListingActionMessage").hide(); $(".awe-rt-ListingActionMessage").html(systemMessage); $(".awe-rt-ListingActionMessage").slideDown(); } else { $(".awe-rt-ListingActionMessage").fadeOut(200, function () { $(this).html(systemMessage); $(this).fadeIn(200); }); } //render checkout button if a lineitem was returned if ((autoGenerateInvoices || ownerAllowsInstantCheckout) && data.LineItemID) { var checkoutUrl = 'https://www.maxx.ca/Account/Checkout?lineitemid=' + data.LineItemID; checkoutUrl += '&returnUrl=%2fEvent%2fLotDetails%2f577820283%2fABCCANOPY-OUTDOOR-GAZEBO-10X12'; if (autoCheckoutForBuyNow) { window.location = checkoutUrl; } var checkoutHtml = '
' + '' + '' + '' + '' + '' + '' + 'Checkout' + '' + '' + '
'; if ($(".detail__context-menu").find(".btn__detail__checkout").length == 0) { $(".detail__context-menu").prepend(checkoutHtml).show(); } else { jslog("skipped rendering checkout button because one already exists."); } } if (data.LineItemID && !highlightCheckoutButtonForBuyNow) { //render contact seller button if one does not already exist if (true && $("a.btn__detail__contactuser").length == 0) { var contactSellerUrl = '/Account/SendListingMessage?receiver=admin&template=ask_listing_question&listingID=577820284&returnUrl=%2FEvent%2FLotDetails%2F577820283%2FABCCANOPY-OUTDOOR-GAZEBO-10X12'; var contactSellerHtml = '
' + '' + '' + '' + '' + '' + '' + 'Contact Seller' + '' + '' + '
'; $(".detail__context-menu").append(contactSellerHtml).show(); jslog("contact button rendered for line item #" + data.LineItemID); } } } else { //ReasonString is populated, prepare a Negative System message if (contextMessageDictionary[data.ReasonString]) { systemMessage = "
×" + contextMessageDictionary[data.ReasonString] + "
"; } else { systemMessage = "
×" + data.ReasonString + "
"; } if (!$(".awe-rt-ListingActionMessage").is(":visible") || $(".awe-rt-ListingActionMessage").html() == "") { $(".awe-rt-ListingActionMessage").hide(); $(".awe-rt-ListingActionMessage").html(systemMessage); $(".awe-rt-ListingActionMessage").slideDown(); } else { $(".awe-rt-ListingActionMessage").fadeOut(200, function () { $(this).html(systemMessage); $(this).fadeIn(200); }); } } } else { //Context is null, but ReasonString is populated, prepare a Negative System message if (contextMessageDictionary[data.ReasonString]) { systemMessage = "
×" + contextMessageDictionary[data.ReasonString] + "
"; } else { systemMessage = "
×" + data.ReasonString + "
"; } if (!$(".awe-rt-ListingActionMessage").is(":visible") || $(".awe-rt-ListingActionMessage").html() == "") { $(".awe-rt-ListingActionMessage").hide(); $(".awe-rt-ListingActionMessage").html(systemMessage); $(".awe-rt-ListingActionMessage").slideDown(); } else { $(".awe-rt-ListingActionMessage").fadeOut(200, function () { $(this).html(systemMessage); $(this).fadeIn(200); }); } } } }); if(!isAuction){ //render checkout button if the listing ends successfully and the winner is viewing $(document).on("SignalR_UpdateListingStatus", function (event, data) { if (autoGenerateInvoices || ownerAllowsInstantCheckout) { if (data.Status == "Successful" && data.LineItemID && data.LineItemPayerUN == "") { var checkoutUrl = 'https://www.maxx.ca/Account/Checkout?lineitemid=' + data.LineItemID; checkoutUrl += '&returnUrl=%2fEvent%2fLotDetails%2f577820283%2fABCCANOPY-OUTDOOR-GAZEBO-10X12'; var checkoutHtml = '
' + '' + '' + '' + '' + '' + '' + 'Checkout' + '' + '' + '
'; if ($(".detail__context-menu").find(".btn__detail__checkout").length == 0) { $(".detail__context-menu").prepend(checkoutHtml).show(); } else { jslog("skipped rendering checkout button because one already exists."); } } if (data.Status == "Successful" && data.LineItemID && data.LineItemPayerUN == "") { //render contact seller button if one does not already exist if (true && $("a.btn__detail__contactuser").length == 0) { //"/Account/SendListingMessage?receiver=tester1&template=ask_listing_question&listingID=166614&returnUrl=%2FListing%2FDetails%2F166614%2Ftest-item-J" var contactSellerUrl = '/Account/SendListingMessage?receiver=admin&template=ask_listing_question&listingID=577820284&returnUrl=%2FEvent%2FLotDetails%2F577820283%2FABCCANOPY-OUTDOOR-GAZEBO-10X12'; var contactSellerHtml = '
' + '' + '' + '' + '' + '' + '' + 'Contact Seller' + '' + '' + '
'; $(".detail__context-menu").append(contactSellerHtml).show(); jslog("contact button rendered for line item #" + data.LineItemID); } } } }); } $(document).on("SignalR_UpdateInvoiceStatus", function (event, data) { if (data.InvoicePayerUN == aweUserName) { } }); });