In this blog post, we will look into the steps to add any kind of content to the top header in nopCommerce.
Go to this location:
Views > Shared > Header.cshtml
Open “Header.cshtml” file and look for the code block below:
<div class="header"> @Html.Widget("header") <div class="header-upper"> <div class="header-selectors-wrapper"> @Html.Action("TaxTypeSelector", "Common") @Html.Action("CurrencySelector", "Common") @Html.Action("LanguageSelector", "Common") @Html.Widget("header_selectors") </div> <div class="header-links-wrapper"> @Html.Action("HeaderLinks", "Common") @Html.Action("FlyoutShoppingCart", "ShoppingCart") </div> </div> <div class="header-lower"> <div class="header-logo"> <a href="@Url.RouteUrl("HomePage")"> <img title="" alt="@storeName" src="@Url.Content(logoPath)"> </a> </div> <div class="search-box store-search-box"> @Html.Action("SearchBox", "Catalog") </div> </div> </div>
Now, we will add a test content line in the top header like this-
<div class="header-upper"> <div class="header-selectors-wrapper"> @Html.Action("TaxTypeSelector", "Common") @Html.Action("CurrencySelector", "Common") @Html.Action("LanguageSelector", "Common") @Html.Widget("header_selectors") </div> <div>This is a test line</div> <div class="header-links-wrapper"> @Html.Action("HeaderLinks", "Common") @Html.Action("FlyoutShoppingCart", "ShoppingCart") </div> </div>
On the public store you should see the result like this-
Looking for quality nopCommerce Web Hosting? Look no further than Arvixe Web Hosting!
thanks for sharing it
You’re welcome!