What's new in nopCommerce 3.70

What's new in nopCommerce 3.70

What a better present for Christmas than another great release from our favorite e-commerce platform. Let's open the box and take a look at the most notable new features in the latest 3.70 version of nopCommerce.

1. Running multiple instances of nopCommerce.

Now it is possible to have multiple instances of nopCommerce running and serving requests while sharing the same database. This means that a single nopCommerce store can run on several web servers at the same time leveraging the power of several machines. In this blog we will use the term "website instance" or "nopCommerce instance" to mean a nopCommerce installation running on a separate web server. 

Why would you ever need to do this?

Imagine you have a lot of simultaneous visits to your website and your web server is heavily loaded. In such cases your visitors may experience delays in their page load times or even worse, your server may stop responding and your website will not load at all. To prevent this from happening, it is a common practice to have several website instances running and handling client requests simultaneously. So when a client makes a request to your store, the request is forwarded to the website instance that is less loaded and that website instance serves the request. A module called Load Balancer is responsible for forwarding the requests to any of the website instances. Remember that a single request is handled only by a single website instance. Let's illustrate this with a simple example. Imagine  that we have 2 instances of nopCommerce running and serving requests for Nop-Templates.com. In other words we have one and the same installation of nopCommerce running on two web servers and these two installations/instances are sharing the same database. When you visit Nop-Templates.com, the Load Balancer will forward the request to either one of the two running website instances. This way if we have 100 simultaneous requests to our website, 50 of the requests will be served by the first instance and the other 50 will be served by the second instance, resulting in faster request handling and better response times. Of course this equal 50/50 split is a very simplistic case in which the web servers are equally loaded all the time. In reality the load on the web servers will differ and the Load Balancer will be smart enough to distribute the work accordingly.

This sounds great! How can I do this for my nopCommerce website?

If you are hosting nopCommerce on your own servers then you need to have your nopCommerce website instances into a Web Farm, which requires you to have some advanced IIS administration skills. If you are interested in how to setup a web farm you can refer to this article.
But if you host nopCommerce in Azure then you can achieve this quite easily. One of the main reasons to run your website in the cloud is the ability to scale when you need to. This is why Azure offers a great multiple-instance support that you can configure with a few clicks in your Azure portal. Please refer to this article that explains how to scale your website in Azure.

Regardless of how your nopCommerce is hosted, multiple instance support would not have been possible without these newly introduced nopCommerce 3.70 features.

  • Redis distributed caching support. Redis is probably the most popular framework used for distributed caching. Since Redis is already available as a service in Azure, it was a natural choice for nopCommerce. A single nopCommece installation keeps its cached data in memory. But if we are to have the same nopCommerce installation spread across several nopCommerce instances/web servers, then it makes sense to have the cache stored in an external out-of-memory storage, where it can be shared between the nopCommerce instances.  This is exactly what Redis as a distributed storage system does. It allows the cached data to be distributed between multiple instances of nopCommerce. Let's illustrate this with an example again where we have our store running with two instances of nopCommerce. A client visits our home page and the web request is handled by the first nopCommerce instance, which caches some of the home page data in the distributed Redis cache rather than in its memory. Then if another request is made to the home page and it is served by the second nopCommerce instance, it will re-use the already cached data by the first instance from the distributed Redis cache. Otherwise both instances will have to cache the data in its own memory resulting in slower performance and duplicate storage. You can use Redis caching even if you have a single instance of nopCommerce but there isn't any real benefit of doing so since your cached data will be served from the same machine. And keeping it in memory is the same. To enable Redis you need to manually modify your Web.config file and specify your Redis server connection details. The Redis entries in the web.config are very well documented with comments so you just need to fill those entries. As mentioned before you already have Redis available out of the box in Azure. But before you use it in Azure you would probably want to use it on your local Windows machine while developing your nopCommerce website. For development purposes to install and setup your own Redis server on Windows you need the Redis port. This is the software we used while trying the Redis support for nopCommerce on our Windows machines. Starting the Redis server was easy and we had a lot of fun playing with it. So if you are up for it we recommend that you give it a try.
  • Redis for distributed session management. While having a distributed cache is an optimization feature, having a distributed session management is a must if you are running multiple instances of nopCommerce. To be able to understand this you should know that the user session is essentially a place where data related to one particular website visitor is kept between requests. In this way certain user workflows can be achieved on the website. Such a workflow for example is the user commenting on a blog. When an user posts a blog comment a confirmation message is stored in the user session and returned from there in the subsequent request to show the user that their comment has been posted and awaiting approval. On a single nopComerce instance the user session is kept in memory. Imagine however that we have our store running with two instances of nopCommerce. And it happens that the first instances picks up the comment submission request and the second instance picks up the request to confirm that the comment has been submitted. Then the user would not see the confirmation because the second instance would not find it in the user session stored in its memory. The good news is that the session data can also be kept in Redis and shared just like the cache data. Again you need to manually modify the Web.config file and add your Redis server details to enable it.
  • Scheduled tasks are run in only one nopCommerce instance at a time. This is very important as you do not want to run the same scheduled task on every nopCommerce instance. In order for this to be achieved every scheduled task keeps the name of the machine instance where it will be run at. This way other instances will simply ignore the scheduled task and will not run it. Remember that if your instances are run on Azure then you need to enable RunOnAzureWebsites setting from the Web.config so that the instances machine names are properly obtained.
  • Blob storage support for Azure. If you run your nopCommerce in Azure you can take advantage of the new BLOB storage support in nopCommerce. This allows you to keep all the generated catalog (product, category, etc...) picture thumbs in the BLOB storage. As you probably know, nopCommerce keeps the original product pictures either in the database or on the file system. Then for every different picture size a new file is generated in a thumbs folder on the file system. In this way requests for a particular picture with a particular size can be served instantaneously. For example if your nopCommerce product details page requests a picture file mobilePhone.jpg with size 450 px then a mobilePhone_450.jpg file (picture thumb) will be generated in the thumbs folder and the file will be served from this folder for every subsequent request. If you have multiple nopCommerce instances these picture thumbs will be generated on every instance. What you can do instead is generate them only once and store them in the BLOB storage, which is shared between the instances. To enable the BLOB storage, you just need to edit the Web.config again and specify your connection string, container name and end point for the BLOB storage.

2. "New" products in nopCommerce 3.70

NopCommerce 3.70 removes the "Recently added" products, which used to automatically show the last added products and introduces "New" products instead, which could be hand-picked by the store owner. To add a given product to the list of "New" products, the store owner needs to check the "Mark as new" setting in the administration of the products.. In this way store owners have complete control over the list of new products. They can even control how long a given product should be in the list by specifying a start and end date.

Mamage New Products

3. Enhanced discount support

  • Now customers can see more user-friendly messages when they are not able to apply a coupon code which is not valid. This is a nice improvement especially for flash sales like Black Friday, when your coupon codes are valid only during a specific period of time. Customers now can see messages that make sense to them when the coupon is not valid for example: "Sorry, this offer is not started yet" or "Sorry, this offer is expired".

    Message when discount has expired
  • Discount can be applied to a category and its subcategories. This is a huge time-saver especially if you have a complex category structure with many subcategories. Before you had to manually select every single subcategory, while now you just need to check a checkbox and select only the top category.

    Apply discounts to categories and subcategories

4. Better CMS and SEO support

NopCommerce 3.70 improves on its already powerful CMS and SEO functionality by adding a few handy features.

  • Store owners can decide which customers have access to which topics. This is really useful if you want to show a certain piece of information only to specific customers. In the example below we want to show the welcome topic on the home page only to registered customers.

    Access control list for topic pages

  • One of the most useful 3.70 features which can hugely impact the SEO of your stores is the ability to show products that have been unpublished. When you have a product page that appears in the top Google search results and for some reason you want to unpublish this product, you really do not want to lose all the SEO juice of that product. Before 3.70 when an unpublished product page was hit the visitor was being redirected to the home page. Not an SEO friendly manuever, let alone the frustration bestowed upon the user. Now nopCommerce allows the store owner to keep the product page visible and to display a message on it that this product is not available anymore. And as already mentioined this is good not only for SEO. Sometimes customers are just searching for information related to a specific product. With this new feature they can find the product information even though the product is not available at the moment. 

    View unpublished products

  • Store owners running multiple stores will certainly appreciate this next nopCommerce 3.70 feature. Now they can specify which is the default language for each of their stores.

    Choose a default language per store

5. Better customer and order management

NopCommerce 3.70 adds several important new features to its customer and order management system.

  • Store owners can now manage each customer's newsletter subscriptions from the administration.

    Newsletter subscription per store

  • Store owners can now see all the customer's back in stock subscriptions from the administration. This gives the store owners insight of what this customer is interested in and they may act accordingly, for example offering the customer a similar product that is in stock.

    Back in stock subscription

  • Store owners can now search orders by customer billing email address and last name. This is a feature we personally as store owners of Nop-Templates.com appreciate as finding an order by billing address was a real challenge before.

    Search orders by customer last name or billing address

  • Store owners can allow customers to apply for vendors via a contact form on the public site.

    Apply for vendor

5. Enhanced product attributes management

NopCommerce 3.70 adds several important new features to its attributes management system.

  • Store owners can now create attributes which are dependant on other attributes or in other words when a certain attribute needs to be visible only when a certain value from another attribute is selected. To make this possible nopCommerce introduces attribute Conditions. You can specify a condition for every attribute. Let's illustrate this with a simple example. Let’s say you are buying a computer. The customer can select which operating system they installed on it. So you have an attribute called OS with values: Windows and Linux. If the customer chooses Windows, you want them to select from several different versions of Windоws. Therefore you have an attribute called Windows OS with values: Windows 7, Windows 8, Windows 8.1, Windows 10. As you can see your Windows OS attribute depends on the OS attribute and it needs to be visible only when the OS -> Windows value is selected.

    Product Attributes

  • Store owners can now show stock availability and quantity based on product attributes. This was one of the most awaited features in nopCommerce. If you track inventory by product attributes and have different stock quantities for the different attribute combinations now your customers can see that information on the public store. Before customers could not see how many items were in stock for the different attribute combinations but now they can see that.

    Stock Availability and quantity based on product attributes

6. What's new for the nopCommerce developers

As usual nopCommerce 3.70 comes with more than a hundred bug fixes and refactorings, the details of which you can find in the nopCommerce issue tracker on codeplex. Among these there are a few new things that I would like to briefly mention.

  • As usual, all nuget packages have been updated to the latest ones.
  • Required packages for hosting OWIN have been added. You can now create a Startup class in your plugin and register OWIN middlewares. You will also need to enable the automatic app startup setting in the Web.config since it is disabled by default.
  • Now when a plugin fails to load you will know which one exactly. Before you didn't know which plugin caused the "could not load type" exceptions and troubleshooting such errors was very time-consuming. I am sure you understand why this new handy feature made it in our list :-).


7. Miscellaneous we love

NopCommerce 3.70 comes with many small fixes and improvements. Here are a few of them.

  • Store owners can now filter bestsellers by store and by vendor in the administration.

    Filter bestsellers by store and vendors
  • When a customer reorders a product the same checkout attributes as the original order are pre-selected.

  • Bulk delete of blog and news comments. Even with the best spam protection your store news and blog pages could fall victim to spam comments. Now as a store owner you can delete all such comments in bulk.

    Delete blog and news comments in bulk
  • The refund order message template, which sends a notification to the store owner was accidentally deleted in version 3.60. Now it is back and you will be notified when anyone from your staff refunds an order or when this happens as a result of an action taken on part of the payment provider.

    Refund Message template for store owners

I hope this blog post has given you plenty of insight of what's new in nopCommerce 3.70 and provided you with enough motivation to upgrade to the new version. All our nopCommerce themes and plugins have already been released for nopCommerce 3.70. Remember that our plugins have a trial version so you can take them for a spin anytime you need to. Our themes on the other hand have stunning demo websites. If this is not enough for you to try nopCommerce 3.70 and our products you can always to contact us for more information or a pesonal demo.

We have even more exciting nopCommerce products coming in 2016. So do stay tuned!

But before that, enjoy the Holidays and we wish you a very happy and successful New Year!