Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Cart sublayout that loads an MVC powered cart item
<%@ Control Language="c#" AutoEventWireup="true" TargetSchema="" %>
<asp:Panel runat="server" ID="pnlMvcShoppingCart" ClientIDMode="Static">
<div class="loader loader-bar" style="margin: 200px 0"></div>
<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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment