diff --git a/plugins/shopping_cart/public/cart.js b/plugins/shopping_cart/public/cart.js index 9a07283..b65941d 100644 --- a/plugins/shopping_cart/public/cart.js +++ b/plugins/shopping_cart/public/cart.js @@ -309,7 +309,20 @@ function Cart(config) { } $(function(){ - $('.cart-add-item').button({ icons: { primary: 'ui-icon-cart'} }) + + var profile = 'foo'; // FIXME + $.ajax({ + url: "/profile/" + profile + "/plugin/shopping_cart/get", + dataType: 'json', + success: function(data) { + new Cart(data); + $('.cart-add-item').button({ icons: { primary: 'ui-icon-cart'} }) + }, + cache: false, + error: function(ajax, status, errorThrown) { + alert('Error getting shopping cart - HTTP '+status+': '+errorThrown); + } + }); }); })(jQuery); diff --git a/plugins/shopping_cart/views/cart.html.erb b/plugins/shopping_cart/views/cart.html.erb index f39af37..922f763 100644 --- a/plugins/shopping_cart/views/cart.html.erb +++ b/plugins/shopping_cart/views/cart.html.erb @@ -15,22 +15,3 @@ - - -- libgit2 0.21.2