Hi,
We want to add a ‘# Of Items In Cart’ <div> at the top of the site on every page. (Lots of cart programs have this—think Amazon.com)
I created an ajax function to grab the value of
$ImStore->cart[‘items’]
…which works fine, except when adding an item to the cart because there is no page refresh.
Is there a way to hook into the updated # of items in the cart immediately after you update the cart total when one hits the ‘Add To Cart’ button? on order-form.php?
Ideally, the sequence would be:
1. User hits Add To Cart
2. The # Of Items In Cart would update from a global PHP var (this is where I hook in)
3. -Then- the light green message would display (Items added to cart).
Suggestions?
TIA,
—JC