Mind if I ask what the reason you're writing all of this custom is, rather than using the existing shopping cart control?
Some speed things:
It looks like you're reaching out to the database a lot instead of using the EcommerceContext.CurrentShoppingCart as is.
Like in
// Get the product
SKUInfo product = SKUInfoProvider.GetSKUs().WhereEquals("SKUID", Int32.Parse(skuid)).FirstObject;
// Prepares the shopping cart item
ShoppingCartItemInfo item = null;
// Loops through the items in the shopping cart
foreach (ShoppingCartItemInfo cartItem in cart.CartItems)
{
// Gets the first shopping cart item matching the specified product
if (cartItem.SKUID == product.SKUID)
{
item = cartItem;
break;
}
}
return item;
Consider instead adding a 'using System.Linq;' and then replacing all of that with return cart.CartItems.First(item => item.SKUID == Int32.Parse(skuid))
. Which saves you the DB call.
Then for Add, you just replace the entire call with
ShoppingCartItemInfoProvider.UpdateShoppingCartItemUnits(cartItemInfo, cartItemInfo.CartItemUnits + 1);
See the "CartItemUnits" control in CMSModules/Ecommerce/Controls/Checkout for examples. You'd similarly be able to update the "Remove" method. (along with some logic to delete the item if its quantity reaches 0)
(Also I assume you're not using Product Options or bundles, since this code isn't adding those into the cart when you say 'add')
If you resolve the speed issues here you may not actually need to have the updatepanels at all.