Error while showing the Total amount on the header page

Posted: June 08, 2010 at 8:39 AM Quote #19008
Hello Every one,

I am getting following error while showing the Total amount on the header page. I have add the following code in header.ascx.cs in page load. Please give me solution for the following error.

ShoppingCart Cart = ShoppingCartManager.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart);
            
            decimal applieddiscount;
            
            decimal subTotalDiscountBase = decimal.Zero;
            Discount appliedDiscount = null;
            List<AppliedGiftCard> appliedGiftCards = null;
            decimal subtotalBaseWithoutPromo = decimal.Zero;
            decimal subtotalBaseWithPromo = decimal.Zero;
          
          
            string SubTotalError = ShoppingCartManager.GetShoppingCartSubTotal(Cart, NopContext.Current.User, out subTotalDiscountBase, out appliedDiscount, out appliedGiftCards, out subtotalBaseWithoutPromo, out subtotalBaseWithPromo);
            string shoppingCartSubTotal = ShoppingCartManager.GetShoppingCartSubTotal(Cart, NopContext.Current.User, out applieddiscount, out appliedDiscount, out appliedGiftCards, out subtotalBaseWithoutPromo, out subtotalBaseWithPromo);

Error 21 The best overloaded method match for 'NopSolutions.NopCommerce.BusinessLogic.Orders.ShoppingCartManager.GetShoppingCartSubTotal(NopSolutions.NopCommerce.BusinessLogic.Orders.ShoppingCart, NopSolutions.NopCommerce.BusinessLogic.CustomerManagement.Customer, out decimal, out NopSolutions.NopCommerce.BusinessLogic.Promo.Discounts.Discount, bool, out decimal, out decimal)' has some invalid arguments C:\NopCommerceStore\Modules\Header.ascx.cs 70 36 NopCommerceStore



I have added the following lines in the Header.ascx

               <li><a href="<%=Page.ResolveUrl("~/ShoppingCart.aspx")%>" class="ico-cart">
                    <%=GetLocaleResourceString("Account.ShoppingCart")%>
                </a><a href="<%=Page.ResolveUrl("~/ShoppingCart.aspx")%>">(<%=ShoppingCartManager.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart).Count%>)</a>
                <strong>
                        <%=GetLocaleResourceString("ShoppingCart.OrderTotal")%>:$</strong>
                 <asp:Label ID="lblTotalAmount" runat="server" CssClass="productPrice" />
                </li>
                

i want to show the total on the lblTotalAmount.. Please provide help for solving this problem by giving any example.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: June 08, 2010 at 4:52 PM Quote #19049
You have extra parameter in 1.5 and now in 1.6 there is tax as boolean.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.