PHPBuilder.com has continued their series looking at building an Ajax-driven shopping cart with part two posted today (part one here). Last time they laid the PHP foundation for the example app, this time they add another layer - the Ajax functionality to manage the current contents of the cart.
Finally, a link to the shopping cart is provided, although you could just as easily have displayed the cart contents on the same page. For the sake of brevity I'll just show you how to integrate the add feature, and will leave the subtraction mechanism to you as an exercise.
The Ajax frontend calls a managecart.php backend file that calls addToCart and deleteFromCart based on which type of "task" is passed to it.