I have a shopping cart page where if an item is Real Estate Forms 2d then there will be a sales tax assessed. If it equals any other item there will be no sales tax assessed. The problem I am having is I can't get a sales tax assessed for any of the item with my current code. Can someone provide assistance in what I am doing wrong with the code below and what I can do to correct it. This is just part of my code:
bool blnNoCart = false;
// get the user's cart
if (Session["CartID"] != null)
{
ShoppingCart objCart = ShoppingCart.Resume(Convert.ToInt32(Session["CartID"]));
if (objCart == null || objCart.Count == 0)
{
blnNoCart = true;
}
else
{
foreach (ShoppingCartItem item in objCart.GetItem())
{
if (item.Name == "Real Estate Forms 2d")
{
objCart.TaxRate = 0.06;
}
objCart.TaxRate = 0.00;
}
double dblShipping = 6;