Home Web Development Getting Started with nopCommerce

Getting Started with nopCommerce

By Brandon Atkinson , Andrei Mazoulnitsyn
books-svg-icon Book
eBook $18.99
Print $38.99
Subscription $15.99
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $18.99
Print $38.99
Subscription $15.99
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
About this book
nopCommerce is a powerful e-commerce engine that gives you the tools to build an online store and start making money. Starting your own e-commerce store can seem like a daunting task. However, with nopCommerce you can easily start selling products online in no time. nopCommerce comes loaded with everything you need to run a first class e-commerce storefront.Getting Started with nopCommerce walks you through all the steps to get your storefront up and running. You will learn how to download and install nopCommerce, as well as how to configure all the main components of the storefront. From learning about the public facing storefront to managing orders in the backend, you will have all the skills needed to run a successful store.Getting Started with nopCommerce is a step-by-step guide for creating your online store with nopCommerce, allowing you to build a feature-rich and customizable store to sell your products online. It guides you through installation, the public facing storefront, configuration, adding products, accepting payments, and processing orders. As you work through each chapter, your online store will grow in scope and functionality. By the time you finish this book, you will have a complete and working store.
Publication date:
June 2013
Publisher
Packt
Pages
134
ISBN
9781782166443

 

Chapter 1. Downloading and Installing nopCommerce

nopCommerce is easy to obtain and easy to install. Whether you are a talented developer looking forward to highly customize your site, or you're a business owner who would just like to get their online store up and running fast, you'll find a flavor for you. nopCommerce can be downloaded as a ready to install e-commerce engine or as full source code ready to be modified. No matter which path you take, the end result is the same—a fully-featured e-commerce engine that will allow you to sell your products online and make money. This chapter will cover everything you need to know for downloading and installing nopCommerce. If you are interested in developing custom code, we'll also cover what prerequisites you will need and how to set up your development environment.

 

Prerequisites and requirements


nopCommerce has several requirements needed before you begin working with it. These requirements and prerequisites are different if you plan on performing custom development versus installing and using nopCommerce out of the box. The following list applies to versions of nopCommerce 2.0 through 2.8.

The following base components are required:

  • Supported operating systems: Windows 7, Windows 8, Windows Server 2008, and Windows Server 2012 (all with Internet Information Services (IIS) 7.0 or above installed).

  • Supported databases: Microsoft SQL Server 2005 or above, and Microsoft SQL Server Compact 4.0 or above.

  • ASP.NET 4.5 with MVC 4.

  • Supported browsers: Microsoft Internet Explorer 6.0 or above, Mozilla Firefox 2.0 or above, Google Chrome 1.0 or above, and Apple Safari 2.0 or above.

  • FileZilla (or other FTP software): In order to upload your files to your hosting provider, you will need an FTP program to facilitate the transfer. You can download FileZilla from http://filezilla-project.org/.

  • 7-Zip (or other file archive software): When you download nopCommerce, it will be in a compressed archive that will need to be extracted. You can download 7-Zip at http://7-zip.org/.

If you plan to write custom code or modify the existing code, you will also need to install the following:

  • Microsoft Visual Studio 2012 or above

  • Microsoft SQL Server 2005 or above

 

Hosting providers


Whether you intend to use nopCommerce out of the box or you want to make changes to the code, eventually you will need to host your website so that the public can visit your site and buy your products! Hosting providers literally host your website and provide a way for users to get to your site. nopCommerce can be hosted with almost any provider that uses Windows-based servers.

Choosing a hosting provider is an important decision. There are a lot of factors that should be considered before selecting a provider. First and foremost, you'll need to ensure your provider offers Windows hosting and one of the supported operating systems and databases, and has ASP.NET 4.5 with MVC 4. In addition, the following factors should be considered:

  • Uptime: A good provider should guarantee 99.9 percent uptime. Uptime simply means that your site will be up and running and available for users. If your site is consistently down or not available, you won't sell many products.

  • Support: Look for providers who offer 24/7 technical support. Ideally, you want 24/7 phone support, but sometimes this can be hard to find. Look for a provider who offers phone, e-mail, and live chat support.

  • Cost: For the most part, Windows hosting is relatively inexpensive. Choose a provider who offers annual or semi-annual discounts.

  • Dedicated IP address: Most nopCommerce installations will require an SSL certificate as you will be processing credit cards. Check with your provider about the cost of a dedicated IP address for your domain, as it should not be a very high cost.

  • Backups: Ensure your provider offers backups of your installation and database. This can either be automated backups or manual, but you will feel safer knowing your data has been backed up.

  • Growth options: As your site gets more users and you make more sales, your site will need to grow as well. A good provider will offer options for growing your site, from more disk space to more database space. This would also include moving from a shared server to a dedicated server.

You can visit the nopCommerce website to view their list of Premium Partners. These are recommended hosting providers, all of which guarantee that nopCommerce can be installed and run on their servers.

Note

Real world

Most providers offer shared hosting options at around the same price with 99.9 percent uptime. Because of this, support and growth options play a very important role in your decision. If your site goes down, you'll want to make sure that you can contact your provider immediately and get a response. Also, as your site grows you don't want to be locked into expensive upgrade options.

 

Setting up a basic development environment


A development environment is an area away from your public store where you can test out changes to your site. This is always a good idea if you are making user interface changes, code changes, or critical configuration changes. You can make these in your development environment without fear of affecting your public store or impacting users on your site. Once you are satisfied with the changes, you can then apply them to your public store.

A development environment is not needed to work with nopCommerce. You can instead opt to upload the files to your hosting provider and start using your site immediately. However, this is not recommended. There are a lot of settings and changes you will want to test before applying them to your public/production site.

Installing Internet Information Services (IIS)

Your development system can utilize any of the supported operating systems. However, you will most likely need to install the Internet Information Services (IIS). IIS is a web server that is used by hosting providers to run websites. It is part of Windows and you can use it to run your nopCommerce website on your PC to help develop and customize it away from your public storefront.

To install IIS, follow these steps:

  1. Navigate to Start | Control Panel | Programs.

  2. Click on Turn Windows features on or off.

  3. Check the Internet Information Services checkbox. This will automatically check Web Management Tools and World Wide Web Services.

  4. Click on OK. This will install IIS, after which you will need to restart your system.

Installing SQL Server and Visual Studio

nopCommerce requires Microsoft SQL Server, and if you plan to perform custom development, you will also need Visual Studio. Fortunately, Microsoft provides free Express versions of this software. These versions are not as feature-packed as some of their higher-end counter parts, but they are still very powerful products and will allow you to run and modify nopCommerce in your development environment.

  • SQL Server Express 2012: This version of SQL Server is ideal for developing and powering web and small server applications. You can download this version of SQL Server from http://www.microsoft.com/sql.

  • Visual Studio 2012 Express for Web: This version of Visual Studio is made for building web applications with the latest standards. You can download this version of Visual Studio from http://www.microsoft.com/visualstudio.

After downloading each of these products, run their installers, starting with SQL Server. After SQL Server is installed, install Visual Studio to complete your development environment.

These two products will also install the other pre-requisites needed for nopCommerce, namely ASP.NET 4.5 and MVC 4.

 

Downloading nopCommerce


You can download nopCommerce from the official site at http://www.nopcommerce.com. There are several options available when downloading nopCommerce. In order to determine which option to download, you need to decide how you will use it. The following options are available:

  • Web (no source): This option is available for users who do not wish/need to develop any custom code. This is a pre-compiled version of nopCommerce that can simply be uploaded to your hosting provider and used immediately. With this option, users can still modify the look and feel or user interface (UI) of their site to suit their needs, but they do not have to worry about development.

  • Source code: This option contains a full Visual Studio solution. It is for users who wish to customize the code within nopCommerce. It contains all the source code used to develop nopCommerce and must be opened in Visual Studio. It also includes scripts to build and compile the solution to upload to your hosting provider.

  • Upgrade script: The upgrade script option is for users who have a nopCommerce installation already in place. The script will upgrade your current installation to the latest version.

  • Microsoft Web Platform Installer: The Web PI is a free tool from Microsoft that allows users to download software. It's a one-stop source for a wide variety of products, including nopCommerce, SQL Server Express, and Visual Studio Express. You can download nopCommerce using the Web PI directly from the nopCommerce site.

As you can see, nopCommerce can be deployed by a wide range of users with various skill sets. With each of these options, excluding the upgrade script, you can deploy nopCommerce to your development environment and your hosting provider.

Choose the option that you would like to download and click on the appropriate download link to begin your download. It is recommended that you create a new folder on your desktop to store your downloaded files for easy access.

nopCommerce will be downloaded in a compressed archive that will need to be extracted. At the time of writing, the archive is using RAR compression. If you have 7-Zip or other file archive software, you can simply right-click on the file and choose to extract the files.

Note

Real world

7-Zip can open many other types of file archives including ZIP, RAR, GZIP, and TAR. It's free to download and use.

It is recommended that you choose the option that will create a new folder for you. In the case of 7-Zip, this is titled Extract to ''nopCommerce_2.80_NoSource''. Choosing this option creates a new folder alongside the downloaded archive.

No matter which version you download, you should now have a folder that contains all the files you'll be working on.

 

Uploading and installing


How to install nopCommerce will depend on which version you've downloaded. In each version, the steps are very similar, but we'll look at each one separately. We'll only be looking at two of the available options, namely Web (no source) and source code. The upgrade script option is outside the scope of this book, as it implies you already have a previous version of nopCommerce installed. Using the Web Platform Installer is a "point and click" guided installation that is self explanatory.

In most cases, you are going to use one of the two options we'll be looking at next.

For this book, I'll be using the local IIS server in my development environment for all the examples. This means you can simply copy and paste all the files needed to the local IIS folder located at C:\inetpub\wwwroot. If you are using a development environment, you can do the same. If you chose to deploy directly to your hosting provider, you can upload your files via FTP. Once you have your hosting provider set up, you can create an FTP login and password to access your provider with.

Before uploading, you will need to create your database. Work with your hosting provider to create your database and user account. You will need to supply this information when installing nopCommerce.

Web (no source)

Deploying the Web (no source) version of nopCommerce is fairly straightforward. Your hosting account should have a root folder where all your web application files will be uploaded. Using your FTP program, connect to your hosting provider and upload all the files from the nopCommerce_2.80_NoSource folder. If you are using a development environment, simply copy all of the files and paste them to your IIS folder located at C:\inetpub\wwwroot (choose Copy and Replace if existing files are present; this will ensure the new files are copied in but existing file permissions stay intact).

Once all the files are uploaded, open a web browser and navigate to the following URL: http://www.YOURDOMAINNAME.com/install (where YOURDOMAINNAME is the domain name you selected and attached to your hosting account). If you are using a development environment, navigate to http://localhost/install.

Source code

The Source code version of nopCommerce comes with a complete Visual Studio solution as well as scripts to build and package the website for deployment. Once you have extracted all the source files, you can run the included Deploy.bat file.

Double-click on the Deploy.bat file to start the process. This file will build the website and create a new folder called Deployable, which is located in the same location. Inside this new folder will be a folder titled nop_2.80, which will contain all the files to upload.

Note

Visual Studio is required to run the Deploy.bat file. Visual Studio is also needed to build and compile the source code into a deployable format.

Your hosting account should have a root folder where all your web application files will be uploaded. Using your FTP program, connect to your hosting provider and upload all the files from the Deployable/nop_2.80 folder. If you are using a development environment, simply copy all of the files and paste them to your IIS folder located at C:\inetpub\wwwroot (choose Copy and Replace if existing files are present; this will ensure the new files are copied in but existing file permissions stay intact).

Once all the files are uploaded, open a web browser and navigate to the following URL:

http://www.YOURDOMAINNAME.com/install

Here, YOURDOMAINNAME is the domain name you chose and attached to your hosting account. If you are using a development environment, navigate to http://localhost/install.

Note

Real world

When uploading your site to your hosting provider, there are some folders you may not want to upload. For instance, the Content folder holds all the product images that nopCommerce displays to users. These images are generated by the system and may be held in the Content folder. If you upload your local copy, you may overwrite images you don't mean to.

Installation

Navigating to the installation page of your nopCommerce site will launch the installation process. This is a guided installation, and you will need to provide some information for the install to successfully complete.

You'll need to enter the following details:

  • Admin user e-mail: This is the e-mail address for the first admin of the site.

  • Admin password: You will need to supply a password for the admin account.

  • Create sample data: Check this box if you would like sample products to be created. This is recommended so you can start working with your site before adding any of your own products. You can always delete these items later, or unpublish them so they no longer appear on your site.

  • Database Information: Here you can select either SQL Server Compact or SQL Server. It is recommended to use a full SQL Server product, not the Compact edition.

  • Create database if doesn't exist: It is recommended that you create your database and database user beforehand to ensure a successful installation. Simply create a database instance and add the database user to it. The installation process will create all the tables, stored procedures, and so on.

  • SQL Server name: This is the IP, URL, or server name for your database. You will get your SQL Server name from your hosting provider.

  • Database name: This is the name of the database used by nopCommerce. If you opted to create your database ahead of time, use the name you gave your database here.

  • Use SQL Server account/Use integrated Windows authentication: If you are installing at a hosting provider, you can use your SQL Server account and supply the credentials you created with your database. If you are using a development environment, you can select Windows authentication. If you are using Windows authentication, the account hosting the application pool in IIS must be a user in the database.

  • Specify Custom SQL Server collation: This is an advanced setting and should be left unchecked.

After all the required information has been provided, click on Install. You will be presented with the installation progress screen.

Once the installation is complete, you will be presented with the homepage of your new storefront.

 

Setting up file permissions


nopCommerce requires write permissions for various files and folders. Write permissions allow nopCommerce to modify these files as you make changes to the environment. During the installation process, permissions will be validated for these items. If you do not have appropriate permissions set up, a warning message will be displayed with items that need to be configured.

The following folders and files need write permissions:

  • Folders:

    • App_Data

    • Bin

    • Content (all child folders as well)

    • Plugins

    • Plugins\Bin

  • Files:

    • Global.asax

    • Web.config

If you find that you need permissions modified, please check with your hosting provider to help you modify these folders and files. Some providers allow you to modify permissions from your hosting control panel, while others will require technical support in order to modify these for you.

If you are deploying to a development environment, this should not be an issue, as you should already have appropriate permissions.

 

Summary


In this chapter, you were introduced to the various download options for nopCommerce as well as its prerequisites and requirements. You also learned about how to set up your development environment if you wanted to perform any custom development. You then learned how to install nopCommerce and how to set the necessary permissions. In the next chapter, you'll explore the storefront and dig into the customer experience.

About the Authors
  • Brandon Atkinson

    Brandon Atkinson is an architect and developer for CapTech Consulting in Richmond, VA. He specializes in Microsoft technologies including ASP.NET and SharePoint, regularly contributing to the SharePoint forums on TechNet. Brandon has owned and operated several online stores over the years, and he has also helped many others with their e-commerce efforts. When he is not writing code, Brandon enjoys playing music, reading, and spending time with his wife.

    Browse publications by this author
  • Andrei Mazoulnitsyn
Latest Reviews (1 reviews total)
Getting Started with nopCommerce
Unlock this book and the full library FREE for 7 days
Start now