Commerce Server Blog

Build world class ecommerce applications using Microsoft Commerce Server
  •  
  • Home
  • About
  • Advertise
  • Copyright Policy
  • Disclaimer

Advantages of Commerce Server 2007

ravikanth | August 26, 2008

Even though Commerce server got released 20 months before, still I am getting many mails from different business users explaining the usage of commerce server and what problems it can resolve. Why can’t we develop a e-commerce site from scratch without using commerce server.

My common answer for these types of questions is

Each aspect of developing, deploying, managing, maintaining, and monitoring e-commerce sites is designed to help maximize security, minimize Total Cost of Ownership (TCO), accelerate time to market, and simplify exchange of data with existing LOB systems and trading partners. You can create e-commerce sites that can support millions of customers and products. By using out-of-the-box functionality of commerce server, you can quickly start interacting with the various systems and processes that help you develop, manage, maintain, and help secure e-commerce web sites.

Here are the few advantages Commerce Server will provide.

  • Ready made business tools to configure products, catalogs, virtual catalogs, advertisements, discounts, order tracking, etc.
  • Supports service oriented architecture.. 
  • Using CS adapter for BizTalk, it can easily integrate with LOB, Partners, etc. 
  • Through staging feature, we are first import data into staging server and once confirmed we can import the data in production.
  • Profile system can be scalable and can store in SQL Server and/or in active directory.
  • CS 2007 is based on .NET 2.0
  • Partner software development kit is available.
  • CS business Analytics system is available with CS 2007 enterprise edition.

With the new version of commerce server (Mojave), the existing customers need not spend lot of money for software migration.

Commerce Server 2007 was built and tested to support large enterprises and to be deployed in 99.9% availability customer environments. It was tested against the following criteria:

  • Top-10 retail-oriented catalog scenarios
  • 15+ catalog/virtual catalog mix on live site
  • 2,500+ categories/catalog for 37.5 K+ categories live
  • 250 K+ products/catalog for 3.75 M+ products live
  • 250+ variants/product for 937 M SKUs live
  • 600–1,200 campaigns w/2 M coupons active
  • 60 M user profiles
  • 100,000 orders/day (11-hour peak)
  • 10 GB/hour Data Warehouse import
  • Deployed w/99.9% availability out of the box
  • Hosting support (100 active; 1,000 provisioned)

On top of this, if you add some facts and figures on investments and its returns (sorry I don’t have these details) then it will give full support to your business team to propose this technology for clients/projects.

Comments
No Comments »
Categories
commerce server 2007
Tags
Advantages of commerce server, commerce server benchmarks, usage of commerce server
Comments rss Comments rss
Trackback Trackback

Commerce Server Visual Studio project templates missing in SP2

ravikanth | August 20, 2008

With commerce server SP 2, the developers can start developing their application in visual studio 2008 but after installing commerce server SP 2, you may not find project template in visual studio. By default commerce server doesn’t install these templates and you have to manually install them.

Prerequisites:

  • Install commerce server 2007
  • Install commerce server 2007 SP2

Follow these steps to enable templates in visual studio 2008.

  1. Open control panel – go to add /remove programs. Select “Microsoft Commerce Server 2007 Developer Edition” and click on “Change/Remove” button.
  2. Installation wizard will be opened. Select “Modify” and click on next button.
  3. Select “Project Creation Wizard” check box from the available components (as shown below) and complete the installation.
    Installation 
  4. Now when you open the Visual studio, you can able to see commerce server templates in visual studio (as shown below)
    Templates 
  5. If you try to create commerce server C# ASP.NET web application, you may get “Package Load Failure” exception. This is known issue with visual studio packages where the full path of commercepkg.dll is missing.
    VS Error 
  6. Follow these steps to fix this problem.
    • Open Registry
    • If you are using x86 OS then navigate to
      [HKEY_LOCAL_MACHINESOFTWAREMicrosoftVisualStudio9.0Packages{1FAF7679-A5C1-4369-9F00-F87E8386F599}]
    • If you are using 64-bit OS then navigate to:
      [HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftVisualStudio9.0Packages{1FAF7679-A5C1-4369-9F00-F87E8386F599}]
    • If you see the “CommercePkg.dll” in the registry “InprocServer32″ registry key, change this value to the full path to that dll:
    • For x86 OS:
      Change the “InprocServer32″ value to “C:Program FilesMicrosoft Commerce Server 2007CommercePkg.dll” 
    • For 64-bit OS:
      Change the “InprocServer32″ value to “C:Program Files (x86)Microsoft Commerce Server 2007CommercePkg.dll”

After performing above changes you can now create commerce server C# asp.net web application using visual studio 2008.

Comments
3 Comments »
Categories
commerce server 2007
Tags
Commerce Server SP2, visual studio project templates, VS template missing
Comments rss Comments rss
Trackback Trackback

Commerce Server CategoryConfiguration Class

ravikanth | August 18, 2008

CategoryConfiguration class is used to configure the pre-loaded properties of a category object which includes child category and products.  Through this object, we can tell commerce server whether to fetch all products under a category (including sub categories) or products under that category only. In this article I am explaining how to fetch category products with the help of CategoryConfiguration class.

Requirement:

1.       If the category is root or parent then show all the products under that category (including products in sub categories).

2.       If the category is sub-category and doesn’t have any categories under it then show only those products.

Pre-requisites:

I created a catalogName “MySite” and top category named “Dance”. Under “Dance”, I have created two categories named “classic dance” and “break dance”. “Dance” category is having two products and sub-categories having one product each.

            string catalogName = “Mysite”;

            string categoryName = “Break Dance”;

            CatalogContext catalogContext = CommerceContext.Current.CatalogSystem;

            ProductCatalog catalog = catalogContext.GetCatalog(catalogName);

            CategoryConfiguration categoryConfig = new CategoryConfiguration();

            categoryConfig.RecursiveChildProducts = false;

           

            ProductCollection productCollection;

            CategoryCollection categoryCollection = null;

 

            if (categoryName == string.Empty)

            {

                productCollection = catalog.GetRootCategory(categoryConfig).ChildProducts;

            }

            else

            {

                Category category = null;

                category = catalog.GetCategory(categoryName, categoryConfig);

                categoryCollection = category.ChildCategories;

                if (categoryCollection.Count > 0)

                {

                    categoryConfig.RecursiveChildProducts = true;

                    category = catalog.GetCategory(categoryName, categoryConfig);

                }

                productCollection = category.ChildProducts

            }

            Response.Write(productCollection.Count.ToString());

 

In the above code, we are checking whether the category is having any child categories, if yes then we are getting all products under that category by setting the catalogConfiguration class property – RecursiveChildProducts to true. If the category doesn’t have any sub-categories then the products at the root are returned.

If I pass “Dance” value to category variable then I will get four products and If I pass “Break Dance” value to category variable then I will get one product.

Comments
No Comments »
Categories
commerce server 2007
Tags
CategoryConfiguration, commerce server, RecursiveChildProducts
Comments rss Comments rss
Trackback Trackback

Automatic User Creation / login in Commerce Server Starter Site

ravikanth | August 17, 2008

In Microsoft commerce server forums, I came across one post with a nice requirement. The requirement was

  1. Create a user in Starter site without manual entry . ie User Details would come from Active Directory, using this details , starter site should create a user profile if he visits the site for first time. 
  2. If an Existing user visits the Starter site, his user profile details should be fetched automatically without entering username and password.

Here is the resolution for this requirement.

Pre-requisites

  • Instead of having the same profile data at two different locations (commerce server & AD), if possible, try to extend the commerce server to map the fields in AD (optional).
  • By default commerce server uses email ID as primary key in User Profile. You can extend profile system to make user Id (which holds AD user ID) as primary key. To change primary key value, check below site for more details.
    http://techblog.ravikanth.net/blog/cns!F348D7145D1BE6C2!459.entry
  • Enable windows authentication on starter site.

Authentication Process: 

  • Get logged in user ID in to the application. We will check whether profile session available.
  • If there is no profile session available, we will get user details using WindowsIdentity class.
  • Call commerce server profile system to get user profile details
  • If nothing is returned, we will create a user profile for that user. We will fetch necessary information from active directory and create an entry in commerce server profile system.
    Note: The password will be same for all users – say Pass@123.
  • Store user profile details in session for further use.

I tested this approach on starter site and it worked. For instance, for auto-login feature I had added below code in standardLayoutMaster.CS init() method.

bool isAnonymousUser = SiteContext.Current.IsAnonymousUser;
if (isAnonymousUser == true)
{
     CurrentUser.RefreshCache();
     WindowsIdentity identity = WindowsIdentity.GetCurrent();
     string[] userName = identity.Name.ToString().Split(”);
     // Set new user id.
     Guid registeredUserId = (Guid)Membership.GetUser(userName[1]).ProviderUserKey;
     CommerceContext.Current.UserID = registeredUserId.ToString(”B”);
     SiteSecurity.CreateUserCookie();
     LogCommerceEvent.UserSignIn(registeredUserId);
}

Every time, application checks whether the current user is anonymous user. If yes, it will get user name (remove domain/system name) from windows identity and pass it to commerce server to get user Id (guid). This GUID is assigned to commerce server context.

Comments
No Comments »
Categories
commerce server 2007
Tags
auto login process, automatic user creation, commerce server, starter site customization
Comments rss Comments rss
Trackback Trackback

Windows Live Authentication in Commerce Server 2007 Starter Site

ravikanth | August 17, 2008

Commerce server provides independent profile mechanism for authorization. Windows live Id is Microsoft Internet based software service that is designed to manage identity & trust within the Microsoft eco system. Let’s leverage the Windows Live ID as a login authentication method for an e-Commerce site. Using a username and password that the user is familiar with will reduce the costs and time spent on managing user identities. This article will describe the process of integrating Windows Live ID with the Commerce Server Starter Site.

Following are the steps in authentication process

  1. User clicks on sign-in or sign-out button in starter site.
  2. If user already signed in then
    1. Retrieve user’s unique identifier from stoken.
      1. If User has commerce server profile
        1. If yes, validate user and perform other login tasks.
        2. Starter site will display personalized contents to the user.
      2. If user doesn’t have commerce server profile
        1. Redirect the user to registration page.
        2. User fills the registration form.
        3. Create user profile and other login tasks.
        4. Starter site will display personalized contents to the user.
  3. If user hasn’t signed in then
    1. Redirect user to windows live ID.
    2. Windows live ID authentication process will happen.
    3. Redirect to starter site. 

This is two step process.

  1. Register your application with windows live.
  2. Change your web site to use windows live ID.

Click on below URL to register your application with windows live
https://msm.live.com/app/

The second step is to do following changes in starter site so that the application asks windows ID authentication instead of default profile authentication. Here are the steps.

  • Copy WindowsLiveLogin.cs (from the Web Authentication SDK, downloaded above) to the Starter Site’s App_Code directory. You can download web authentication SDK from below link
    http://www.microsoft.com/downloads/details.aspx?FamilyId=24195B4E-6335-4844-A71D-7D395D20E67B&displaylang=en
  • Create a new login page say LiveIDLoginPage.aspx
  • Create a new registration page say LiveIDRegistrationPage.aspx.
  • Update the Starter Site’s web.config file to reference the new pages – e.g. loginUrl=“~//LiveIDLoginPage.aspx”
  • Add the following <appSettings> section to the web.config file. Make sure you set your application values appropriately.
    <appSettings>
    <add key=”wll_appid” value=”123456789″/>
    <add key=”wll_secret” value=”MySecretKeyForStarterSite”/>
    <add key=”wll_securityalgorithm” value=”XXXXX”/>
    </appSettings>
  • In your LiveIDLoginPage.aspx page, verify if the user has already been authenticated by Windows Live ID. If not, redirect to Windows Live ID sign-in page.
  • Retrieve user’s unique identifier and verify if profile exists in Commerce Server. Redirect to new user registration page if needed

This article will help you to understand how to implement window Live Id authentication and doesn’t provide end to end code? Many companies doesn’t want the user profile created at different entity (like passport authentication). Here we are using windows live ID only for authentication and rest of the user details are captured during registration process. This will help us to perform targeting our site content appropriately.

 

Comments
No Comments »
Categories
commerce server 2007
Tags
authentication, commerce server, Ravi Kanth Koppala, starter site, windows live Id authentication
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Sign up for Newsletter


Categories

Quiz

  • Catalog Quiz for Beginners
  • Profile Quiz for Beginners
  • Quiz 1 for Advance Users
  • Quiz for Beginners

Recent Posts

  • Configuration Error: Could not load type ‘Microsoft.Commerce.Providers.SharePointCommerceOrderModule from assembly because the parent type is sealed
  • How commerce server Site Terms are stored
  • Troubleshoot: An unexpected error has occurred.
  • Design consideration for developing commerce server catalog system
  • Troubleshoot: AuthManager(CommerceServer): Error reading Commerce Server administration database
  • Account Creation Approval Process
  • Troubleshoot: Unauthorized exception when the new user tries to access MyAccount page
  • Microsoft Commerce Server 2009 code name "R2" – January 2010 Community Technical Preview
  • Merchant Access to Catalog Manager
  • Commerce Server 2009 December VPC ready for download

Archives

  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008

Tags

add discounts add images to profile Advantages of commerce server approve discounts authentication auto login process automatic user creation basket Brand Management business tools campaign management Catalog catalog import Category CategoryConfiguration cc_number checkout commerce 7 commerce server commerce server 2002 commerce server 2007 commerce server 2007 Display Types Commerce Server SP2 discounts ecommerce Estimation inventory Kanth Koppala marketing system migration error Mojave Product profile profile subsystem property metadata purchase order quick checkout Ravi Ravi Kanth site cache refresh starter site tools transactions error Variant
(c) 2009 Commerce Server Blog. All rights Reserved. Articles cannot be reproduced without permission from the author.Write to me at kanth@ravikanth.net if you have any comments, questions, suggestions about this site or would like to send us a tip
About Us | Terms of Use | Disclaimer | Advertise .