ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
// this should always be different given the previous session productStoreId check, but just in case...
if (!productStoreId.equals(cart.getProductStoreId())) {
// this is a really simple operation now that we have prepared all of the data, as done above in this method
cart = new WebShoppingCart(request);
session.setAttribute("shoppingCart", cart);
}
}