nopcommerce from 3.3 to 3.9

update nopcommerce

update nopcommerce from 3.3-3.9
Here is the steps to update

  1. download form nop

  2. unblock the zar for window securtiy issue,if not, there wil be problems when releasing

  3. Extract files
  4. setup by: run NopCommerce.sln, clean and rebuild
  5. view in chrome
  6. you will see the installation page: input your local database and choose to create one database, it doesn’t matter, because you will rewrite it later, but it seems that you cannot skip the initial part
  7. open nop.web/app_data/setting.txt
  8. change the database to your own one. make sure the version of you database is same with the source code. if it is not ,you should download the update.sql from nopcommerce and run it one by one: 3.3-3.4, 3.4-3.5. when you run it, make sure you open the microsoft sql server and click the target database you want to update
  9. copy the original theme from v3.3 to 3.9, choose the new theme from backend of website, then you will notice the difference ,what we are supposed to do is address them one by one:

  10. solve the problem of responsive by go to the nop.web/views/shared/_Root.cshtml

@{
    Layout = "~/Views/Shared/_Root.Head.cshtml";
}
@Html.Widget("body_start_html_tag_after")
@Html.Partial("_Notifications")
@Html.Action("JavaScriptDisabledWarning", "Common")
@Html.Partial("OldInternetExplorerWarning")

<div class="master-wrapper-page">
    @Html.Action("AdminHeaderLinks", "Common")

    <div class="master-wrapper-content">
    @Html.Partial("Header")
    <script type="text/javascript">
        AjaxCart.init(false, '.header-links .cart-qty', '.header-links .wishlist-qty', '#flyout-cart');
    </script>
    <div class="header-menu">
        @Html.Action("TopMenu", "Catalog")
    </div>
        @Html.Widget("content_before")
        <div class="master-wrappermain">

           <div class="master-wrapper-main clearfix">
            @if (IsSectionDefined("Breadcrumb"))
                {
                    @RenderSection("Breadcrumb") 
                }
             @RenderBody()
            </div>
        </div>
        @Html.Widget("content_after")
    </div>
    @Html.Action("Footer", "Common")
</div>
@Html.Action("EuCookieLaw", "Common")
@Html.Widget("body_end_html_tag_before")
  1. modify for the slider by go to the nop.web\Plugins\Nop.Plugin.Widgets.NivoSlider\Content\nivoslider\themes\custom

    @media all and (min-width: 1001px) {
    .theme-custom {
    /*margin: -30px 0 60px;*/
    }
    
  2. go to the views/common/footer.cshtml,update as below:

    @model FooterModel
    @using Nop.Core
    @using Nop.Core.Domain.Tax
    @using Nop.Core.Infrastructure
    @using Nop.Web.Models.Common;
    
    <div class="footer">
        <div class="footer-menu-wrapper">
            <div class="column information">
    
            <h3>@T("Footer.Information")</h3>
            <ul>
    
        @if (Model.SitemapEnabled)
        {
            <li><a href="@Url.RouteUrl("Sitemap")">@T("Sitemap")</a></li>
        }
        <li><a href="@Url.RouteUrl("Topic", new {SeName = Html.GetTopicSeName("shippinginfo") })">@T("ShippingReturns")</a></li>
        <li><a href="@Url.RouteUrl("Topic", new {SeName = Html.GetTopicSeName("privacyinfo") })">@T("PrivacyNotice")</a></li>
        <li><a href="@Url.RouteUrl("Topic", new {SeName = Html.GetTopicSeName("conditionsofuse") })">@T("ConditionsOfUse")</a></li>
        <li><a href="@Url.RouteUrl("Topic", new {SeName = Html.GetTopicSeName("aboutus") })">@T("AboutUs")</a></li>




        <li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a></li>
    </ul>
</div>
<div class="column customer-service">

    <h3>@T("Footer.CustomerService")</h3>
    <ul>


        <li><a href="@Url.RouteUrl("ProductSearch")">@T("Search")</a> </li>
        @if (Model.NewsEnabled)
        {
            <li><a href="@Url.RouteUrl("NewsArchive")">@T("News")</a></li>
        }
        @if (Model.BlogEnabled)
        {
            <li><a href="@Url.RouteUrl("Blog")">@T("Blog")</a></li>
        }
        @if (Model.ForumEnabled)
        {
            <li><a href="@Url.RouteUrl("Boards")">@T("Forum.Forums")</a></li>
        }
        @if (Model.RecentlyViewedProductsEnabled)
        {
            <li><a href="@Url.RouteUrl("RecentlyViewedProducts")">@T("Products.RecentlyViewedProducts")</a></li>
        }
        @if (Model.CompareProductsEnabled)
        {
            <li><a href="@Url.RouteUrl("CompareProducts")">@T("Products.Compare.List")</a></li>
        }
        @if (Model.NewProductsEnabled)

        {
            <li><a href="@Url.RouteUrl("NewProducts")">@T("Products.NewProducts")</a></li>
        }




    </ul>
</div>
<div class="column my-account">

    <h3>@T("Footer.MyAccount")</h3>
    <ul>


        <li><a href="@Url.RouteUrl("CustomerInfo")" class="account">@T("Account.MyAccount")</a></li>
        @if (!Model.HideOrders)
        {
            <li><a href="@Url.RouteUrl("CustomerOrders")">@T("Account.CustomerOrders")</a></li>
        }
        @if (!Model.HideAddresses)
        {
            <li><a href="@Url.RouteUrl("CustomerAddresses")" class="">@T("Account.CustomerAddresses")</a></li>
        }
        @if (Model.ShoppingCartEnabled)
        {
            <li><a href="@Url.RouteUrl("ShoppingCart")" class="ico-cart">@T("ShoppingCart")</a></li>
        }
        @if (Model.WishlistEnabled)
        {
            <li><a href="@Url.RouteUrl("Wishlist")" class="ico-wishlist">@T("Wishlist")</a></li>
        }
    </ul>
        </div>
        <div class="column follow-us">
              <div class="social">
                <div class="title">
                    <strong>@T("Footer.FollowUs")</strong>
                </div>
                @Html.Action("Social", "Common")
            </div>
        </div>
    </div>
    <div class="footer-poweredby">
        Powered by <a href="http://www.nopcommerce.com/">nopCommerce</a>
        @*Would you like to remove the "Powered by nopCommerce" link in the bottom of the footer?
            Find more info here http://www.nopcommerce.com/copyrightremoval.aspx*@

    </div>

    @if (Model.DisplayTaxShippingInfoFooter)
    {
        var inclTax = EngineContext.Current.Resolve<IWorkContext>().TaxDisplayType == TaxDisplayType.IncludingTax;
        <div class="footer-tax-shipping">
            @T(inclTax ? "Footer.TaxShipping.InclTax" : "Footer.TaxShipping.ExclTax", Url.RouteUrl("Topic", new {SeName = Html.GetTopicSeName("shippinginfo")}))
        </div>

    }
    <div class="footer-disclaimer">
        @T("Content.CopyrightNotice", DateTime.Now.Year, Model.StoreName)
    </div>


    <div class="footer-store-theme">
        @Html.Action("StoreThemeSelector", "Common")
    </div>

    @Html.Widget("footer")
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $('.footer-block .title').click(function () {
            var e = window, a = 'inner';
            if (!('innerWidth' in window)) {
                a = 'client';
                e = document.documentElement || document.body;
            }
            var result = { width: e[a + 'Width'], height: e[a + 'Height'] };
            if (result.width < 769) {
                $(this).siblings('.list').slideToggle('slow');
            }
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $('.block .title').click(function () {
            var e = window, a = 'inner';
            if (!('innerWidth' in window)) {
                a = 'client';
                e = document.documentElement || document.body;
            }
            var result = { width: e[a + 'Width'], height: e[a + 'Height'] };
            if (result.width < 1001) {
                $(this).siblings('.listbox').slideToggle('slow');
            }
        });
    });
</script>

meanwhile, go to the model/commom/FooterModel.cs modify as below:

using System.Collections.Generic;
using Nop.Web.Framework.Mvc;

namespace Nop.Web.Models.Common
{
    public partial class FooterModel : BaseNopModel
    {
        public FooterModel()
        {
            Topics = new List<FooterTopicModel>();
        }
        public string FacebookLink { get; set; }
        public string TwitterLink { get; set; }
        public string YoutubeLink { get; set; }
        public string GooglePlusLink { get; set; }
        public string StoreName { get; set; }
        public bool WishlistEnabled { get; set; }
        public bool ShoppingCartEnabled { get; set; }
        public bool HideAddresses { get; set; }
        public bool HideOrders { get; set; }
        public bool SitemapEnabled { get; set; }
        public bool NewsEnabled { get; set; }
        public bool BlogEnabled { get; set; }
        public bool CompareProductsEnabled { get; set; }
        public bool ForumEnabled { get; set; }
        public bool RecentlyViewedProductsEnabled { get; set; }
        public bool NewProductsEnabled { get; set; }
        public bool AllowCustomersToApplyForVendorAccount { get; set; }
        public bool DisplayTaxShippingInfoFooter { get; set; }
        public bool HidePoweredByNopCommerce { get; set; }

        public int WorkingLanguageId { get; set; }

        public IList<FooterTopicModel> Topics { get; set; }

        #region Nested classes

        public class FooterTopicModel : BaseNopEntityModel
        {
            public string Name { get; set; }
            public string SeName { get; set; }

            public bool IncludeInFooterColumn1 { get; set; }
            public bool IncludeInFooterColumn2 { get; set; }
            public bool IncludeInFooterColumn3 { get; set; }
        }

        #endregion
    }
}
  1. go to the model/commom/ContactUsModel.cs

    using System.Web.Mvc;
    using FluentValidation.Attributes;
    using Nop.Web.Framework;
    using Nop.Web.Framework.Mvc;
    using Nop.Web.Validators.Common;
    
    namespace Nop.Web.Models.Common
    {
    [Validator(typeof(ContactUsValidator))]
    public partial class ContactUsModel : BaseNopModel
    {
    [AllowHtml]
    [NopResourceDisplayName("ContactUs.Email")]
    public string Email { get; set; }
    
    [AllowHtml]
    [NopResourceDisplayName("ContactUs.Subject")]
    public string Subject { get; set; }
    public bool SubjectEnabled { get; set; }
    
    [AllowHtml]
    [NopResourceDisplayName("ContactUs.Enquiry")]
    public string Enquiry { get; set; }
    
    [AllowHtml]
    [NopResourceDisplayName("ContactUs.FullName")]
    public string FullName { get; set; }
    
    [AllowHtml]
    [NopResourceDisplayName("ContactUs.Business")]
    public string Business { get; set; }
    
    [AllowHtml]
    [NopResourceDisplayName("ContactUs.Department")]
    public string Department { get; set; }
    
    [AllowHtml]
    [NopResourceDisplayName("ContactUs.Phone")]
    public string Phone { get; set; }
    
    [AllowHtml]
    [NopResourceDisplayName("ContactUs.Mobile")]
    public string Mobile { get; set; }
    
    public bool SuccessfullySent { get; set; }
    public string Result { get; set; }
    
    public bool DisplayCaptcha { get; set; }
        }
    }