18 października 2018 15:43:45

Moving shopping cart in bootstrap theme

  • Wysłany: one year ago
We bought the bootstrap theme and we want to modify this theme to our needs.

One of the things we want to change is the location of the shopping cart. At the moment this one is located in the top menu (next to Register, Log in, Wishlist etc). We want to move this next to the search bar(like your other theme: http://theme13.nopcommerce.pl).

Do you have any sugestions to do this because the views (AdminHeaderLinks.cshtml and HeaderLinks.cshtml) and models (AdminHeaderLinksModel and HeaderLinksModel) are diffrent.

  • Wysłany: one year ago
  • Moderator

Thanks for reaching us. You can do it with:

You can use this part of code, paste it in the Header.cshtml

@using Nop.Core.Infrastructure;
                                    @using Nop.Web.Framework.Themes;
                                    @using Nop.Core;
                                    @using Nop.Services.Localization;
                                    @using Nop.Services.Orders;
                                        var storeContext = EngineContext.Current.Resolve<Nop.Core.IStoreContext>();
                                        var customerCartItemNumber = EngineContext.Current.Resolve<Nop.Core.IWorkContext>().CurrentCustomer.ShoppingCartItems.Where(x => x.ShoppingCartType == Nop.Core.Domain.Orders.ShoppingCartType.ShoppingCart)
@Html.Action("FlyoutShoppingCart", "ShoppingCart")
back to top