Cart sublayout that loads an MVC powered cart item
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Control Language="c#" AutoEventWireup="true" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> | |
<asp:Panel runat="server" ID="pnlMvcShoppingCart" ClientIDMode="Static"> | |
<div class="loader loader-bar" style="margin: 200px 0"></div> | |
</asp:Panel> | |
<script src="/ui/trede/js/libs/jquery-2.2.4.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
(function () { | |
$("#pnlMvcShoppingCart").load("/<%=Sitecore.Context.Language.Name%>/Commerce/Pages/Cart%20Page?ajax=true", function (response, status, xhr) { | |
if (status == "error") { | |
var msg = "Sorry but there was an error: "; | |
$("#pnlMvcCheckout").html(msg + xhr.status + " " + xhr.statusText); | |
} | |
}); | |
})(); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment