Posts Tagged ‘Commerce Server 2009’

Here are some thoughts on how can we create generic commerce server platform where we can onboard multiple brands easily (like samsung.commerceserverguru.com, lg.commerceserverguru.com, etc). Some assumptions made are..

  1. There will be one commerce server site and I provides one (virtual) catalog for each brand.
  2. There can be multiple web channels (sub sites – each subsite will get get one channel ).

The first thing its strike our minds is the configuration changes. We have two configurations, one is  application configuration and the other is business process configuration. These things will be different from one website to another website. In total, our configuration points are

  • Pipelines: Will leverage out of box pipelines but if the business process are different then we will created different pipelines for each brand and the same will get reflect in the channel configuration.
  • Channelconfiguration: If business process are different, its better we create different channel for each site and this channel name is provided in the ChannelConfiguration list (in the site).
  • Metadata xml file: this can be the same for all website as the code base/structure is same.
  • Web.config (Appsettings) - Since the configuration will differ from site to site, recommending to keep them in SharePoint Property Bag (It is a hash table where we are able to accumulate key and values).

 

First, I have created two CS applications on two different root site collections (same web application). The first site collection name is etv & second site collection name is mtv(Both points to different CS sites). Next, I have created a new channel in channel configuration (as shown below).

clip_image001

If we open the webpage, you will see wired exception and following exception is logged in the event viewer.

clip_image002

In order to fix this issue, I have added new site information at <Sites> section.

<Sites>
<Site sitename="etv" disableProductVersionHttpHeader="true" metadataRepositoryPath="c:\inetpub\wwwroot\wss\VirtualDirectories\cssite\MetadataDefinitions.xml> </Site>
<Site sitename="mtv" disableProductVersionHttpHeader="true" metadataRepositoryPath="c:\inetpub\wwwroot\wss\VirtualDirectories\cssite\MetadataDefinitions.xml> </Site>
</Sites>

When web page opened, you will receive different exception in the event viewer.

clip_image003

Changing the useSharedCommerceContexts=false in channelconfiguration will not work . A value of true indicates that CommerceContext.Current will be available, and used by all operation sequence components. Context objects exposed through the CommerceSiteContexts class will refer back to the context objects exposed through CommerceContext.Current. This also means that only a single site can be configured in ChannelConfiguration.config. A value of false indicates that CommerceContext.Current will be null, and not used by any operation sequence components. A separate set of Commerce Server context objects will be created for each site configured in ChannelConfiguration.config. These can be accessed through the CommerceSiteContexts class.

Note: As of now, commerce server 2009 allows us to point to single CS site from a web application. This is fixed in CS2009 R2.

Final option is to provide the same commerce server site name for both site collections in the channelconfiguration. After doing below changes the site is working fine.

<Channel sitename="etv" name="mtv">
<MessageHandlers>
<MessageHandler ………….

clip_image004

Here are my findings/recommendations.

  • For each site collection(brand), we will create different channel (if required), or leverage default channel.
  • Try to leverage existing pipelines – on demand we will create new pipelines for the brands. The same has to be reflected in channelconfiguration (under channels).
  • Metadata xml file is mapped to a CS site so this configuration will be common for all brands.

White labeling is still a myth using commerce server 2009 but my thought process is how can we reduce the development efforts to make this happen (if not self serviced site creation). If you have any queries or suggestions, please do drop me an email.

Related Articles


If you like this post, please click on our sponsor advertisement.


After successfull installation, when you open the commerce website, you may see nothing but a warning message – “WebPart can not be displayed. The Channel Name have not been specified in your channel configuration” (as shown in the below image).

image

This warning is because the default channel name is not configured in channel configuration. Follow these steps to fix this problem.

  • From web page, click Site Actions > Manage Content and Structure”.
  • Navigate to “Channel Configuration”
  • Change the Values to
  • Channel : Channel name using which the data is to be fetched. For example, “Default”.
  • DefaultCatalog : Name of the catalog which would be loaded by default to your site. For example, “Adventure Works Catalog”.
  • LiveApplicationID : Application ID to use for Windows Live ID Web Authentication.
  • LiveApplicationSecret : Secret key to use for Windows Live ID Web Authentication.

Note: Keep LiveApplicationID, LiveApplicationSecret as blank if we don’t want the application to have windows live authentication.

Once these values are saved, you can able to see the web parts and the data from the catalog name provided. One thing to note is that out of box SharePoint site supports loading data from one catalog only. If you want to show information from multiple catalog then we have to rely on virtual catalogs.

Related Articles


If you like this post, please click on our sponsor advertisement.


Follow me on Google+
Couldn't get data from google+
Sign up for Newsletter