Get Ready for the Ucommerce for Sitefinity Master Classes

In this section we’ll cover what’s in the box before we start coding away. The solution is created so it resembles a “real life” Ucommerce project as close as possible.

 


The solution projects

The solution is built up from 3 different projects:

MyUCommerceApp.BusinessLogic
    • This will be used on the deep-dive part of the course primarily to create different extensions we will to deploy to the website but also on the integration project when exploring the query APIs.
MyUCommerceApp.Integration
    • Console Application that can access the APIs and the Ucommerce data store. We will use this on the deep-dive part of the course when we explore the query APIs. This project has an assembly reference for the BusinessLogic project.
MyUCommerceApp.WebsiteWebsite - project where all resources for the site exists including:
  • Ucommerce configuration files to register custom components used for deep-dive
  • Models, Views, and Controllers for MVC components to scaffold the webshop
  • Few javascript files and styles sheets including Bootstrap for bells and whistles

The purpose of the project is to push extensions and modifications to the site. This project has an assembly reference for MyUCommerceApp.BusinessLogic


The deploy tool

The deploy tool is used to push over all binaries, javascript files, style sheets, configuration files and more. The deploy tool is created as power shell files and will run a few scripts to deploy everything needed to the website.

To configure the deploy tool, follow the “Expertise 010”. This is the first exercise of the Master Class and is not required on beforehand.

The purpose of the project is to push extensions and modifications to the site. This project has an assembly reference for MyUCommerceApp.BusinessLogic


Expertise 010: Setup Your New Clean MVC Site

Intro
For this exercise the purpose is to setup the first base template in your solution so we’re ready to rock and roll right of the bat.


Requirements
Clean installation of Sitefinity and Ucommerce.


Hands-on
The first thing we need to do is point our development environment to our running website.

PLEASE NOTE: you need to run Visual studio as administrator.

 

 

In the Master Class solution, find the deploy-local.ps1 powershell script and open it. On line 1&2 you’ll find a property we need to change. Right now it matches something, probably, different than your setup. It needs to point to the root of your Sitefinity and Ucommerce website (folder where web.config is located).

# Website root folder (website is deployed here)
$website_root = "C:\inetpub\Sitefinity\Website\CMS"

Simply modify the $website_root found in the deploy-local.ps1 file to match this and you’re good to go on that part!


Next we need to be able to compile our solution. There’s a bunch of NuGet packages that are referenced, including Sitefinity’s packages for creating MVC widgets.

If you haven’t done already, please make sure you have setup visual studio’s package manager to include Sitefinity's package source. If you have already done that, you can skip this step.

 

 

In visual studio, go to tools, package manager and package manager settings.

Go to package sources and add a new source for http://nuget.sitefinity.com/nuget

So far so good. Now please compile the solution and log into the Sitefinity backend.

We’re going to setup a template with a single widget that will be used throughout our pages.

In the top bar, in the design dropdown go to “page templates“

Click create a template and give it the name “Master class main”.

 

 

Click “select another template” and select the left sidebar content in the modal dialog.

 

 

Click on “done”.

Click “create and go to add content”.

In the widget toolbox to the right, you should now see a section called “master class”.

 

 

Drag in the Category Navigation in the left sidebar.

Publish the template. 
Now go to “pages” in the topbar of Sitefinity.

Click “Create a page”.

Give it the name “Home” and select the template we created before.

 

 

Click create and go add content.

If you request the front-end on “/” you should now see a list of categories and otherwise a clean page.

Congratulations. You’re now ready to attend the Ucommerce Master Class.

 

{{lineitem.ProductName}}

{{lineitem.VariantName}} - {{lineitem.Quantity}} x {{lineitem.FormattedPrice}} {{lineitem.FormattedPrice}}

Your cart is empty ;(
Total {{basket.FormattedProductsTotal}}
Checkout