This is a great snippit of code. If I could get it working right, it would be even better
This is exactly something I need.
My problem is I'm not on a domain yet, so I am @ a http://IP/~username/.
I played around a bit, and removed the / from $items['/ajax/cart/count'] = array( to get $items['ajax/cart/count'] = array(
I'm also using :
$.get('/~username/ajax/cart/count', function(data) {
$('#cartRight').find('a[href$="/cart"]').text('Cart ('+data+')');
});
I'm sure I'm doing something wrong in terms of pointing to the server (I'm not good with ajax or javascript).
What's happening is if I add an item to cart, I get my ajax cart popup saying I added it, but the number does not change.
If I reload the page or re-run the :
$.get('/~username/ajax/cart/count', function(data) {
$('#cartRight').find('a[href$="/cart"]').text('Cart ('+data+')');
});
via firebug, the number updates. What can I do to fix this?
