app/assets/javascripts/caboose/cart_old.js in caboose-cms-0.7.85 vs app/assets/javascripts/caboose/cart_old.js in caboose-cms-0.8.1
- old
+ new
@@ -39,11 +39,11 @@
// Render
//
self.render = function() {
$.get('/cart/items', function(response) {
- self.$cart.empty().html(self.templates.line_items({ order: response.order }));
+ self.$cart.empty().html(self.templates.line_items({ invoice: response.invoice }));
self.$cart.removeClass('loading');
});
};
self.render_add_to_cart = function() {
@@ -141,10 +141,10 @@
url: '/cart/items/' + $line_item.data('id'),
data: { quantity: $quantity.val() },
success: function(response) {
if (response.success) {
$line_item.find('.price').empty().text('$' + response.line_item.price);
- if (self.$cart.find('.subtotal').length) self.$cart.find('.subtotal').empty().text('$' + response.order_subtotal);
+ if (self.$cart.find('.subtotal').length) self.$cart.find('.subtotal').empty().text('$' + response.invoice_subtotal);
} else {
alert(response.errors[0]);
}
}
});