Commerce Server

Commerce Server Community - E-Business is Your Business

Learn all about Commerce Server. Find full documentation, get support and advice from experts, and discuss features and issues with peers.

Members

  • Michelle Sollicito
  • Gaël Duhamel
  • Gary Troutman
  • Victor O. Castro
  • Julien Leblanc
  • Bobbilin Taneri
  • Agnes Chisholm
  • Tom Grant
  • Steve Harclerode
  • Deva Swaminathan
  • Dionicio Gonzalez
  • bleepzter
  • Mark Sorenson
  • wanda
  • Rishi Girdhar
  • Gokul Ramachandran

MS Commerce Server team blog rss

Loading… Loading feed

WebTransit Inc

WebTransit is an Atlanta-based web development company specializing in Commerce Server and online store development and management.

WebTransit has been providing Web services to a broad range of clients for over 5 years. We are committed to customer satisfaction and have built a core staff of experienced project managers, system designers and technology specialists that can ensure that our clients make the most of the web.

Activities range from full Web project implementation to Web presence maintenance and upgrades. Services we offer include HTML, scripting and programming in a variety of languages and platforms, database design and implementation, as well as Web server setup and administration.

We follow a very structured methodology to ensure consistency and good business practices for our clients. We pay attention to the details. WebTransit has developed defined and repeatable processes and procedures that determine successful deployment of projects and maintenance services to our clients.

We use a proprietary product called OmniTracker™ to facilitate swift and accurate communication between all parties involved in the development process. Our methodology allows us to provide a defined, repeatable, and customer-focused process for successful implementation. By doing this, we are able to provide a predictable workflow and structured development environment in order to ensure direction and control over the entire course of a project or activity.


Bookmark and Share

eBar

Gaels Commerce Server blog

Loading… Loading feed

 

Forum

Sune Hansen

Commerce Server 2009 training, Copenhagen, Denmark

We have announced two new training event for Commerce Server 2009: Business User Course - September…Continue

Started by Sune Hansen Jul 14, 2010.

Michelle Sollicito

Microsoft Commerce Server 2009 Code Name "R2" May 2010 CTP is Now Available

The Commerce Server Product Unit is pleased to announce the following news update to our partner community:Microsoft Commerce Server 2009 Code Name "R2" May 2010 CTP is Now AvailableThe Microsoft…Continue

Tags: 2010, available, may, ctp, server

Started by Michelle Sollicito Jun 2, 2010.

Michelle Sollicito

Anyone interested in this position please contact me

Role      : Microsoft CommerceServerLocation  : Olympia WAStart     : ASAP Desired Skills: .Net, c#, MQ SQLServer Project Details:- Client wants to implement US multilingual store front will multi…Continue

Tags: wa, olympia, washington, role, server

Started by Michelle Sollicito May 13, 2010.

Sune Hansen

Commerce Server 2009 training, London (Luton), UK

Danish Commerce Server experts Vertica has taken over CommerceServerTrainng.com, and has announced a 5 day Commerce Server 2009 developer course in London (Luton)…Continue

Tags: 2009, course, microsoft, training, server

Started by Sune Hansen Apr 22, 2010.

rafael da silva almeida

Order issue

I have one business rule on my project that allow generate new tax for aorder, imagine the user buy this products: 1x product1 = 10,001x product2 = 11,00 1x product3 = 12,00 total = 33,00. iwill…Continue

Started by rafael da silva almeida Mar 17, 2010.

Michelle Sollicito

Commerce Server 2009 Evaluation VPC (with Feb 2010 update) is now available for download

Commerce Server 2009 Evaluation VPC (February 2010 Update) is Available for DownloadIn an effort to help improve the Microsoft® Commerce Server 2009 evaluation  experience, the Microsoft Commerce…Continue

Tags: download, available, update, 2009, server

Started by Michelle Sollicito Feb 18, 2010.

Michelle Sollicito

Commerce Server 2009 Training dates announced!

Microsoft Dallas is holding a 3-day Microsoft Commerce Server 2009 Bootcamp course for customers, Microsoft employees, and Microsoft partners from February 23-25, 2010 in Dallas, Texas.  Endorsed by…Continue

Tags: microsoft, training, 2009, server, commerce

Started by Michelle Sollicito Jan 21, 2010.

Michelle Sollicito

SharePoint architecture from a CS standpoint / Commerce Server 2007 v 2009

Attendee URL:…Continue

Tags: 2009, 2007, server, commerce

Started by Michelle Sollicito Dec 30, 2009.

Michelle Sollicito

Software Smith Commerce Server User Group

Software Smith, who co-wrote the recently published book about Commerce Server 2007 (the only? one I can find) has a user group meeting coming up you all may be interested in..…Continue

Started by Michelle Sollicito Dec 7, 2009.

Rishi Girdhar

Profile Data

CS manager provides the facility to import/export Profile Definition. How about the profile data, is there a way we can import/export profile data?thanks in advanceRishiContinue

Tags: Profile

Started by Rishi Girdhar Sep 14, 2009.

Rishi Girdhar

CS 2009 Templates missing 3 Replies

I have installed CS 2009.Thought of creating a web app. but did not find the templates (Commerce C# ASP.NET Web Application OR Commerce VB ASP.NET Web Application).Aren't these templates are the part…Continue

Tags: Templates, 2009, CS

Started by Rishi Girdhar. Last reply by Rishi Girdhar Sep 4, 2009.

Rishi Girdhar

Starter Site Architecture 2 Replies

Is the CS 2007 ASP.Net starter site - 2 tier or 3 tier web app?Can i use it for Production environment?Continue

Tags: site, starter, 2007, cs

Started by Rishi Girdhar. Last reply by Rishi Girdhar Sep 4, 2009.

Rishi Girdhar

Staging - Size, Automatic Restart and Incremental 4 Replies

I need clarifications for the follwing regarding staging(1)Is there any limit on the size of the data that can be staged? Are there any data/reports available on the size of data Vs time…Continue

Tags: Staging

Started by Rishi Girdhar. Last reply by Michelle Sollicito Sep 3, 2009.

Rishi Girdhar

Multichannel CS 2009

They say that CS 2009 is a multi-channel ready.As per my understanding - CS 2009 comes with a default sharepoint starter site as oppose to ASP.Net starter site (CS 2007). If I am not wrong,…Continue

Tags: Server, Commerce, Multi-Channel

Started by Rishi Girdhar Aug 31, 2009.

Rishi Girdhar

Staging Query 6 Replies

Hi,To tranfer the busuness data from one system to another (Dev to Test).....Q: Is it necessary to have the two systems identical in terms of existing business data or schema etc?recently i was…Continue

Started by Rishi Girdhar. Last reply by Rishi Girdhar Sep 3, 2009.

Rishi Girdhar

E-commerce for Insurance

Hi,We are following up with a prospect to go for a MS Commerce Server for e-commerce solution. I would like to know the 'Design' best practices for the following, your suggestions/inputs will be…Continue

Tags: Architecture, Design, CS

Started by Rishi Girdhar Aug 31, 2009.

Steve Harclerode

Issue With LineItemRollup Property 3 Replies

Hi,I have a client that is a ski resort. We have extended line items so that they have personalized information, such as Name, date of birth, etc. Each line item needs to be kept separate, so inside…Continue

Started by Steve Harclerode. Last reply by Michelle Sollicito Aug 7, 2009.

Michelle Sollicito

Congrats to Gael MVP!!

A member of our community, Gael Duhamel, has been made an MVP.. Congratulations Gael!!From Microsoft.."We are pleased to announce Gael Duhamel has been awarded MVP status. The MVP Award is given in…Continue

Tags: server, commerce, mvp, duhamel, gael

Started by Michelle Sollicito Jul 7, 2009.

Steve Harclerode

Issue Importing Promo Codes in CS 2007 5 Replies

I thought I would try out this forum to address an issue I'm having trying to import some promo codes.I'm using the C# snippet below in a Windows app I'm writing to import some coupon numbers from a…Continue

Started by Steve Harclerode. Last reply by Michelle Sollicito Jul 1, 2009.

Michelle Sollicito

Commerce Server Pal sessions

The Commerce Server Product Unit is holding (x2) Partner Academy Live (PAL) webinars in July:Session: WCS05PAL- Positioning Commerce Server 2009 to Key Business Decision MakersPresented by: Steven…Continue

Tags: microsoft, pal, server, commerce

Started by Michelle Sollicito Jun 30, 2009.

Max Akbar Blog

Commerce Server Staging (CSS) and Catalogs

A few things you didn’t know about CSS and how catalogs move from one environment to another. The process of using the CSS is pretty simple just use the MMC console for CSS and setup your project but there are some undocumented and some scenarios that will cause you some issues that you need to be aware.

So will I sing praise unto thy name for ever. that my Commerce Server site may daily perform

Someone had asked as to why his relationship would not move form one environment to another and I didn’t dive too deep into it and I couldn’t help him. As it turns out that my current client run into something very similar. So did some work and found out the reason.

Here is the scenario, have two catalogs in catalog one create a relationship add items form catalog two. Now setup a CSS job that will move your items from one server to another but choose catalog one. The job should be expression based. The relationship will not move by default. If you look there are three values that can be set for an expressional export None, Immediate Children and All Levels. If you select either Immediate Children or All Levels only then your relationship will be moved to the target environment.

exportoptions

The reason is simple you setup a relationship between two different catalogs but you select only one to move so you have to be explicit on what the export should do.

Another issue I have noticed is that when running CSS to move products is overwriting hierarchies and relationships. When you use the Catalog Manager this feature is available.

relationships  

But this option is missing when using CSS. It’s true that this option is not available through the UI but you can modify this using the project XML. When you create projects using CSS the project properties are created in the registry and xml file if using the data project. The project files are stored in “C:\Program Files\Microsoft Commerce Server 2007\Staging\Projects” if Commerce Server is installed using defaults. In the xml file there is an ImportOption that is set to Yes=True by default but you change this behavior.

projectfile

Now an over all look on the Import option for over writing category hierarchy and relationships. The product is using two catalog features but have only one option what if you wanted to overwrite your relationships but not your category hierarchy or the other way around, well your out of luck. Here is another scenario where things will get a bit tricky what if you only wanted to export your price property? In this case you would setup your CSS and set the property import option to overwrite relationship and category hierarchy to true. The exported XML file will only have one property the price. When you do the import the primary parent category will be removed if you had setup primary category with your product. So why does this happen? The reason is simple the primary parent category is setup as a property with the product when the export happens it exports all the parent categories and when an import happens the primary parent is removed because we have parent categories and setup to over write relationships.

Hacking Commerce Server Staging Part III

As promised here is the code for the previous post on hacking the CSS engine.

Download Code…

Hacking Commerce Server Staging Part II

In the previous post I showed you how to create a custom UI for the Commerce Server Staging (CSS). In this post I will show you how you can create a custom handler that will fire and perform some action based on the custom UI.

Custom Handler

As noted in previous post CSS uses managed code for data import\exports. CSS engine works on using a factory object to create handlers depending on the project type name. The project type name is specified in the “BusinessDataTypes.xml” file located in “C:\Program Files\Microsoft Commerce Server 2007\Staging\Bin\” folder if Commerce Server was installed with defaults. In my sample I have a custom name called “Max's Test”. When the CSS engine identifies an export or import it reads the “BusinessDataTypes.xml” file then look at the project xml file and finds the type identified. So our project xml file should have “Max's Test” as the BusinessDataTypeName attribute. When the match is made the CSS engine will load the “HandlerAssemblyQualifiedName” attribute value. In the sample “CSSTestUI.CustomHandler” is the handler. The CustomHandler class inherits from IBusinessDataStagingHandler having two methods for implementation Import\Export.

Let’s take a look at a simple implementation:

class CustomHandler : IBusinessDataStagingHandler
{
    #region IBusinessDataStagingHandler Members

    public void Export(string projectName, BusinessData businessData, string projectLocation, string sourceSite)
    {
        if (projectName == null)
        {
            throw new ArgumentNullException("projectName");
        }
        if (businessData == null)
        {
            throw new ArgumentNullException("businessData");
        }
        if (projectLocation == null)
        {
            throw new ArgumentNullException("projectLocation");
        }
        if (sourceSite == null)
        {
            throw new ArgumentNullException("sourceSite");
        }
        string filename = Path.Combine(projectLocation, businessData.BusinessDataId + ".xml");
        StreamWriter st = File.CreateText(filename);
        st.Write("From Custom handler (Export)...");
        st.Close();
    }

    public void Import(string projectName, BusinessData businessData, string projectLocation, string destinationSite)
    {
        if (businessData == null)
        {
            throw new ArgumentNullException("businessData");
        }
        if (projectLocation == null)
        {
            throw new ArgumentNullException("projectLocation");
        }
        if (destinationSite == null)
        {
            throw new ArgumentNullException("destinationSite");
        }
        string filename = Path.Combine(projectLocation, businessData.BusinessDataId + ".xml");
        StreamWriter st = File.AppendText(filename);
        st.Write("From Custom handler (Import)...");
        st.Close();
    }

    #endregion
}

In the sample above instead of doing real work I am just writing and reading the xml project data file. Please note I am not writing xml so if you open it in a xml browser you will generate errors.

Theda theda that’s all folks

Once you create your own custom handler just make sure to sing the assembly and GAC it. Then you need to stop\start the CSS Service before the project works. To debug your code you would attach to the MMC console for the UI and the CSS Service for the handler.

Good luck creating cool custom CSS projects.

 

Once I have access to ftp I will upload the project files in these blog posts. The project was created VS2008 and tested on windows 2008\Commerce Server 2007. There should be no issues with Commerce Server 2009 if you do find issues please send me an email so I can post it for others.

Hacking Commerce Server Staging

Way back when I was a program manger on the Commerce Server Product Group one of my features was Commerce Server Staging (CSS). While going over CSS with the dev team and PMs I wanted to make CSS extensible so customers could create their own CSS projects. But as is with everything else this decision was met with “We don’t have time and resources” and it was dropped.

The dev manager thought it was good idea and stated that he would keep the APIs public that way in the next version of Commerce Server they could revisit the subject. Here we are with the new version and no extensibility. Now as you know the CS product has gone through much turn over and that dev manager is with a different team with MS.

In this post I am going to show you how you could hack CSS and build your own custom projects.

CSS UI Basics

CSS UI is only visible using the MMC console. CSS is a windows service but there are APIs that talk to the service. The API support COM as well as .NET (COM wrappers) that allow you to pretty much do everything that you can using MMC.  Having COM means you can write VBScript code for automation (note the Java Script is not supported due to Java script not supporting parameter passing values by ref).There is also a command line tool and once again it almost does everything MMC can.

But this section is about the UI so lets talk about that. The Business Data UIs of CSS is written in .NET. So there is a whole framework that handles this for you. Which means the MMC loads .NET controls when you open a project or create one using the wizard. How does CSS know which tabs to load on the project properties? CSS when installed creates a folder in the Root of Commerce Sever “%COMMERCE_SERVER_ROOT%” called staging. In the staging folder there a sub folder called bin. In the bin folder there is an xml file BusinessDataTypes.xml that holds the types of business data that CSS support.

If you look into the content of the BusinessDataTypes.xml file (see table below) notice that you have Handlers and UIProgIDs. The UIProgIDs are used to load controls onto project tabs. The Handlers are used to export and import data when the project is executed.

<?xml version="1.0" ?>
<BusinessDataTypes>
  <BusinessDataType Name ="Orders"  HandlerAssemblyQualifiedName = "Microsoft.CommerceServer.Staging.OrdersHandler, Microsoft.CommerceServer.Staging.BusinessDataStagingFramework, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"  UIProgID = "Microsoft.CommerceServer.Staging.UI.OrdersConfigurationPropertyPageControl" />
  <BusinessDataType Name ="SiteTerms"  HandlerAssemblyQualifiedName = "Microsoft.CommerceServer.Staging.SiteTermHandler, Microsoft.CommerceServer.Staging.BusinessDataStagingFramework, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"  UIProgID = "Microsoft.CommerceServer.Staging.UI.SiteTermsPropertyPageControl" />
  <BusinessDataType Name ="Marketing"  HandlerAssemblyQualifiedName = "Microsoft.CommerceServer.Staging.MarketingHandler, Microsoft.CommerceServer.Staging.BusinessDataStagingFramework, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"  UIProgID = "Microsoft.CommerceServer.Staging.UI.MarketingPropertyPageControl" />
  <BusinessDataType Name ="Catalog" HandlerAssemblyQualifiedName = "Microsoft.CommerceServer.Staging.CatalogHandler, Microsoft.CommerceServer.Staging.BusinessDataStagingFramework, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" UIProgID = "Microsoft.CommerceServer.Staging.UI.CatalogControl" />
</BusinessDataTypes>

So can you create your own UI? Sure why not. I will show you a quick sample which I will outline in this post.

Create CSS Custom UI

  1. The first thing you want to do is create a project in Visual Studio and select Class Library.

  2. Step two add references by implementing the IBusinessDataUserInterface which exists in the “C:\Program Files\Microsoft Commerce Server 2007\Assemblies\CSStagingUserInterfaces.dll” assembly if commerce server was installed in it’s default location. Please note that this is also GACed. The next reference is Microsoft.CommerceServer.Staging.BusinessDataStagingFramework.dll also located in the same directory and GACed.

  3. Now that you have the two references you will need to add a Control to your project and have it inherit IBusinessDataUserInterface and implement all the interface. Your class should look like the image below:
    ClassImage  
    Notice the class attribute make sure that you have the same with your own unique Guid.

  4. Before we can actually write code to our UI we need to add registration code:


    #region Component Registration

    [ComRegisterFunction]
    private static void ComRegister(Type t)
    {
        string name = @"CLSID\" + t.GUID.ToString("B");
        using (RegistryKey key = Registry.ClassesRoot.OpenSubKey(name, true))
        {
            key.CreateSubKey("Control").Close();
            using (RegistryKey key2 = key.CreateSubKey("MiscStatus"))
            {
                key2.SetValue("", "131457");
            }
            using (RegistryKey key3 = key.CreateSubKey("TypeLib"))
            {
                key3.SetValue("", Marshal.GetTypeLibGuidForAssembly(t.Assembly).ToString("B"));
            }
            using (RegistryKey key4 = key.CreateSubKey("Version"))
            {
                Version version = t.Assembly.GetName().Version;
                string str2 = string.Format("{0}.{1}", version.Major, version.Minor);
                if (str2 == "0.0")
                {
                    str2 = "1.0";
                }
                key4.SetValue("", str2);
            }
        }
    }

    [ComUnregisterFunction]
    private static void ComUnregister(Type t)
    {
        string subkey = @"CLSID\" + t.GUID.ToString("B");
        Registry.ClassesRoot.DeleteSubKeyTree(subkey);
    }

    #endregion Component Registration

  5. Ok now we are ready to populate our interface implementations. For the ModuleName replace the text to with your own custom name. The wizardMode variable is used when creating projects using the wizard. When creating a project using the wizard mode you will not see your custom control as the UI for the process is hard coded to only display the four Commerce Sever Business Types. But you can view your control using non wizard mode. The modeReadOnly is used to distinguish between Operator and Administrator. Remember an Operator can not modify project properties.
    Private variables:


    internal const string ModuleName = "Max's Test";
    private BusinessDataCollection businessDataCollection;
    private bool modeReadOnly;
    private bool wizardMode;
    private BusinessData businessData;


    Flush Method:


    public void Flush()
    {
        for (int i = this.businessDataCollection.Count - 1; i >= 0; i--)
        {
            BusinessData businessData = this.businessDataCollection[i];
            if (!(businessData.BusinessDataTypeName != ModuleName))
            {
                this.businessDataCollection.Remove(businessData);
            }
        }
    }

    InitializeSate Method:

    public void InitializeSate(string siteName, Microsoft.CommerceServer.Staging.BusinessDataCollection collection, bool modeReadOnly)
    {
        if (siteName == null)
        {
            throw new ArgumentNullException("siteName");
        }
        if (collection == null)
        {
            throw new ArgumentNullException("collection");
        }
        this.modeReadOnly = modeReadOnly;
        this.businessDataCollection = collection;

        this.businessData = GetFirstBusinessData(collection, ModuleName);
        if (this.businessData == null)
        {
            this.businessData = new BusinessData();
            this.businessData.BusinessDataTypeName = ModuleName;
            this.businessData.BusinessDataId = Guid.NewGuid();

            BusinessDataOption opt = new BusinessDataOption("checkBox1", checkBox1.Checked.ToString());
            this.businessData.ExportOptions.Add(opt);

            BusinessDataOption opt2 = new BusinessDataOption("textBox1", textBox1.Text);
            this.businessData.ExportOptions.Add(opt2);

            this.businessDataCollection.Add(this.businessData);
        }
        else
        {
            string opt = Get(this.businessData.ExportOptions, "checkBox1");
            string opt2 = Get(this.businessData.ExportOptions, "textBox1");

            checkBox1.Checked = Convert.ToBoolean(opt);
            textBox1.Text = opt2;
        }
    }


    SaveState:

    public void SaveState()
    {
        if (!this.modeReadOnly)
        {
            // put code for read only
        }
        // We will assume administrator
        BusinessDataOption opt = GetOption(this.businessData.ExportOptions, "checkBox1");
        opt.Value = checkBox1.Checked.ToString();

        BusinessDataOption opt2 = GetOption(this.businessData.ExportOptions, "textBox1");
        opt2.Value = textBox1.Text;
    }


    WizardMode:

    public bool WizardMode
    {
        set
        {
            this.wizardMode = value;
        }
    }


    Helper Methods:

    internal static BusinessData GetFirstBusinessData(BusinessDataCollection collection, string type)
    {
        foreach (BusinessData data in collection)
        {
            if (data.BusinessDataTypeName == type)
            {
                return data;
            }
        }
        return null;
    }

    internal static BusinessDataOption GetOption(BusinessDataOptionCollection options, string optionName)
    {
        foreach (BusinessDataOption option in options)
        {
            if (option.Name == optionName)
            {
                return option;
            }
        }
        return null;
    }

    internal static string Get(BusinessDataOptionCollection options, string optionName)
    {
        if (options == null)
        {
            throw new ArgumentNullException("options");
        }
        if (optionName == null)
        {
            throw new ArgumentNullException("optionName");
        }
        foreach (BusinessDataOption option in options)
        {
            if (option.Name == null)
            {
                throw new ArgumentNullException("option");
            }
            if (option.Name.Trim().ToUpper(CultureInfo.InvariantCulture) == optionName.ToUpper(CultureInfo.InvariantCulture))
            {
                if (option.Value == null)
                {
                    throw new ArgumentNullException(optionName);
                }
                return option.Value.Trim().ToUpper(CultureInfo.InvariantCulture);
            }
        }
        return null;
    }

     

  6. Ok now that we have our code lets add a new control as we referenced a checkbox and textbox.
    ProjectImage

  7. Compile your project and make sure to sign the assembly as will add it to the GAC.

  8. Modify the BusinessDataTypes.xml file in “C:\Program Files\Microsoft Commerce Server 2007\Staging\Bin” to reflect the GACed assembly.
    xmlfile

  9. GAC the assembly and stop and restart the CSS service.

  10. Now open CSS MMC and create a project not using the wizard.
    CustomProject
    Notice that we have our control in the project properties. I have not figured out how to publish the custom control name to the tab, but all works. Add some values in your custom control tab and other project properties such as site name and destination. Select OK and save your project. Now examine the xml file that is created for your project.
    projectxml  

As you modify the project properties the settings will be saved in the project xml file. Notice that the options are ExportOption name\value. You can also have ImportOptions. In the SaveState method I added code to save the control options in ExportOptions collection you can if you have values that need to be saved for import in the ImportOptions collection.
Ok that’s it for now in the next post I will show you how to create your own handler that will get fired for your custom control.

Catalog Performance Tip

You may notice over time that your site is slow specifically the Catalog calls. In this post I hope to address some performance improvements by doing adding a maintenance task.

Catalog System

I am not going to tell you what the Catalog System is  you can always find info in the help files but I will explain some of the internals that slows down over time. Looking at how Commerce Server retrieve data is a bit interesting. The Catalog System has two databases one Your_SiteName_ProductCatalog and another MCSC_CatalogScratch.

All of the Catalogs, Categories, Products and their relationship is held in Your_SiteName_ProductCatalog database. The MCSC_CatalogScratch is a persisted temporary storage. Some Catalog APIs when called internally need to store their data into temp tables and then do a select of that. Any time you perform a search or use paganation among other calls the temporary location is used.

MSCS_CatalogScratch Database

So what is this database? The thought behind this database was the right idea but used incorrectly. If you have written advanced stored procedures you have at one time or another used temp tables. The creation of temp tables are a performance hit. So what the Commerce Server product did was to create a temp database and create it’s temp table in that database. So a table is created when a query is made and the next request that comes a long will do a quick search of system tables to see if a table already exists if so then it will use it else it will create a new table. Over time you have have thousands of tables but that’s not the only bad part. In some Catalog System stored procedures (which I have done sql traces) I have realized that they used hints like KEEPFIXED PLAN. Since multiple queries of different type use these tables it’s possible that you get a plan that is not very optimized and slow down the execution of the stored procedure.

You are a diseases and I am the cure

So how do you fix this. Well you really can’t touch the Commerce Server stored procedures but you can delete the temp tables to help performance. You should ideally have a job\task that periodically goes and deletes these tables. The VBScript that cleans out these tables is located in “C:\Program Files\Microsoft Commerce Server 2007\Tools\CatalogCleanup.vbs” if Commerce Server was installed using defaults. But you don’t have to use the VBScript just use the stored procedure that it calls.

EXEC dbo.ctlg_DropPersistentTablesInScratchDB 0

EXEC dbo.ctlg_DropPersistentTablesInScratchDB 1

There are two values you can pass it zero and one. I can’t remember exactly but if you use the zero value it will only delete tables that are not currently being used. If you pass one then all tables are deleted regardless if they are being used or not. I have done this with some customers who have had over several thousand tables and the stored procedure returned errors not to worry just keep running the stored procedure until you have not errors.

No comment!!!

I have been asked as to why the comment section of my blog is turned off. It seems that a porn site is trying to up their rating so they posted comment with links. It was becoming a headache to manage so I turned them off. It’s not that I don’t want you to comment I just don’t want to promote porn :). If you have a comment or question please send them to maximum2000 AT hotmail DOT com.

So should I or shouldn't...

I have always been asked the question of moving to CS2009 or staying with CS2007. Currently there are two versions CS2009 and CS2009\R2 which can make the choice even more difficult. Before I go through the benefits of the different version let me just come right out and say it.

I have never been a big fan of CS2009, the reason is that CS2009 was supposed to be a solution accelerator and now it has been made into a product. I believe that it is far from a complete product :(. If you go over the Microsoft site and read the benefits of CS2009 Microsoft is going to give a glass of fruit punch and once you drink, you are going to see rainbows everywhere you look. The only benefit I can find with CS2009 is that you get an extended life support.

SharePoint Integration

What about the SharePoint integration? Sorry, you could have done that with CS200x it’s a matter of modifying the web.config to make the integration happen. Well how about the WebParts? You don’t need SharePoint to have WebParts integration but you do get the source code in the new template site of CS2009 which forces you to use SharePoint. I have looked at the WebParts and they are as complicated to understand as the previous StarterSite :(. It’s a fine line between performance and architecture. Sometime you just need to put a nail in a board, no need to get fancy just get a hammer and drive the nail in.

New API

What about the new API isn’t it cool having a unified theory err… API? I have worked with the new API and I am sorry to say it’s much harder to work with and longer lines of code to write. The only benefit I can see is with R2 where you can have multiple tier architecture. But remember that will come with a cost so even if you are on one server for presentation and Business Logic you will have interprocessing which is expensive and degrade performance. Now some folks at the Product Group have been bold enough to tell me that the new CS2009 API are faster than the old. I find this very hard to believe. The reason is that the new API is built on top of the old API they are not going directly to the CS stored procedures so how in the world can the new API be faster.

New Feature of CS2009

Doesn’t CS2009 give you any new features? Of course it does. Customer can leave feedback, cool huh. Not really, the mechanism of leaving feedback is only if you have SharePoint integrated because that feedback\comment data is stored in SharePoint you can’t use it on a none SharePoint site.

Break Down

So what does CS2009 give you:

  • SharePoint Integration
  • Unified API
  • Product Feedback\Comment\Rating
  • CS2009\R2 multi tier architecture
    • Remember CS2009\R2 is 64 bit only
  • Has been said that CS2009 has bug fixes that CS2007 does not (I have not found a list of these bugs :()
    • WTF, are you kidding me
  • Longer Product Life Support

Please correct me if I am wrong on any of these points or missing something crucial.

Bottom Line

If you have CS2007 then stay on it no need unless you come to end of life of the product then upgrade. The upgrade will be simple just install CS2009 and your old API will work. None of the old API has changed.

If your business need to have multi tier architecture then go for CS2009\R2 when it’s RTMed.

Real Time Inventory? Hmm?

Does Commerce Server support real time inventory system? That’s the question of the day and I hope to shed some light on this subject.

Commerce Server Inventory System

The Inventory is a bit different than the other Systems in Commerce Server. In order to use the Inventory System you have to have the Catalog System but the other way is not true. You can have a Catalog System with no Inventory. Even thought there is a relationship between Inventory and Catalog they are two different systems. At least that’s what I used to think.

If you pay attention to the documentation of Commerce Server it’s not very clear about how closely integrated the two systems are. When caching of Catalog System is turned on then the Product object will cache the Inventory data. But what if I want to call the Inventory API so you can only get the Inventory data. What happens then? Well true believers you get the data from cache! Say what? Yes you get the data from the cache. What if I call the Refresh method? Nope, sorry that only refreshes the Inventory object not make a trip back to the database.

Commerce Server’s Real Time Inventory

So how in the world can Commerce Server be real time? The UpdateInventory and CheckInventory pipeline components are real time as they go to the database and call the stored procedures directly. In fact the documentation only notes that these components are real time.

So how do I get the inventory from the database?

Sadly,  you can’t. You have either wait for the data to fall of the cache or create your own stored procedure to fetch the data. A bit disappointing that you have to write custom call to check the inventory levels :(. By the way I looked at how difficult it would be to change this and it’s just an override boolean internally with the Inventory object. The Inventory code is hard coded to check the cache first. Say what!

When the gun goes bang bang bang, who's gonna know who's the one?

Since I am finishing up my business in the next few months I thought it would be best to go over some of the issues that my customers always struggling with. Bad Design and Performance and of the two I have spent most of my time with Performance tuning. I will also go over some of the most frequent questions I am asked the biggest one should I use CS2009 or CS2007. I will try to be as honest and open your eyes to CS2009. Stay tuned and as I get time I will post these two blogs. They won’t be the last but they are very important.

Got Marketing!

When the first request is made to a Commerce Server site Commerce Server loads it's modules and populate it's caches based on the configuration of web.config. One of these modules and Cache that can be modified is the Marketing data.

Marketing Runtime

Commerce Server loads it's Marketing data (Ads and discounts) in one shot by calling mktg_spRuntimeLoadDiscounts stored procedure. You can change this behavior by having your own stored procedure called. Why would you want to do that maybe  you want additional columns to be returned or have a staging environment and you want all discounts that are active and not active to be evaluated. Just make sure that you not omit any columns and records that the original stored procedure returns.

Change the default behavior of loading Marketing data

Modify the web.config by adding a <config> element to the <cache>: <key="LoadDiscountsProcedure" value="myProcedure"/> Note that myprocedure should have the same signature as the default mktg_spRuntimeLoadDiscounts procedure.

Blog Posts

Michelle Sollicito

Create your own page as a member of this community!

As a member of this community, you get your own page where you can advertise your site, tell us all about your work, talk about Commerce Server, add photos, add videos, you can even add widgets and music etc.
Feel free to personalize it as you wish!

Posted by Michelle Sollicito on April 20, 2009 at 2:45pm

Michelle Sollicito

Feel Free to add your own questions or documents/links

Glad to see we have some members of this Commerce Server community! Communities like this are much more useful when members really participate, so please actually take the time to sign up as a member and then feel free to put your own questions about Commerce Server in the forums, and load up your own documents about Commerce Server, or let others know about useful Commerce Server links.

Posted by Michelle Sollicito on April 20, 2009 at 11:30am

 
 
 

Latest Activity

Profile Icon

Commerce Server 2009 training, Copenhagen, Denmark

We have announced two new training event for Commerce Server 2009: Business User Course - September 6th - 7th 2010Developer Course - September 8th - 10th 2010 Both courses take place in Copenhagen Denmark, and is open for everyone. The training will include classroom presentation and hand-on labs as well…See More
Discussion posted by Sune Hansen Jul 14, 2010
Profile Icon

Microsoft Commerce Server 2009 Code Name "R2" May 2010 CTP is Now Available

The Commerce Server Product Unit is pleased to announce the following news update to our partner community:Microsoft Commerce Server 2009 Code Name "R2" May 2010 CTP is Now AvailableThe Microsoft Commerce Server 2009 code name "R2" May 2010 Community Technology Preview (CTP) is now available on the Download Center. We invite you to install this pre-release of the next version of Commerce Server 2009 code name "R2" into a non-production environment to learn how Commerce Server 2009 "R2" provides…See More
Discussion posted by Michelle Sollicito Jun 2, 2010
Profile Icon

Commerce Server 2009 training, London (Luton), UK

Danish Commerce Server experts Vertica has taken over CommerceServerTrainng.com, and has announced a 5 day Commerce Server 2009 developer course in London (Luton) June 21st – 25th 2010.The course is open for everyone and will include classroom presentation and hand-on labs as well as best practice discussions.For more information on this course as well as the full list of topics please visit…See More
Discussion posted by Sune Hansen Apr 22, 2010
Profile Icon

Order issue

I have one business rule on my project that allow generate new tax for aorder, imagine the user buy this products: 1x product1 = 10,001x product2 = 11,00 1x product3 = 12,00 total = 33,00. iwill generate a banking ticket for this order, until the customer payit and i process, my provider changed the price for product2 to 13,00,now my order need to be 35,00 in total. and i have to generate a newbanking ticket of 2,00. how can i do it with commerce ??? icant change the price after save as…See More
Discussion posted by rafael da silva almeida Mar 17, 2010
Profile Icon

Commerce Server 2009 Evaluation VPC (with Feb 2010 update) is now available for download

Commerce Server 2009 Evaluation VPC (February 2010 Update) is Available for DownloadIn an effort to help improve the Microsoft® Commerce Server 2009 evaluation  experience, the Microsoft Commerce Server 2009 Evaluation VPC (February 2010 update) is now available for download to partners and customers. This VPC has Commerce Server 2009 and Microsoft Office SharePoint® Server 2007 fully installed and configured (Core Systems, Multi-Channel Commerce Foundation, SharePoint Commerce Services),…See More
Discussion posted by Michelle Sollicito Feb 18, 2010
Profile Icon

Commerce Server 2009 Training dates announced!

Microsoft Dallas is holding a 3-day Microsoft Commerce Server 2009 Bootcamp course for customers, Microsoft employees, and Microsoft partners from February 23-25, 2010 in Dallas, Texas.  Endorsed by the Microsoft Commerce Server Product Unit, Cactus Commerce will teach students the fundamentals of working with Commerce Server 2009 in a balanced format of onsite classroom presentation, discussions and hands-on labs. Upon completion of the course, students will have the knowledge to develop…See More
Discussion posted by Michelle Sollicito Jan 21, 2010
Profile Icon

SharePoint architecture from a CS standpoint / Commerce Server 2007 v 2009

Attendee URL: https://www.livemeeting.com/cc/software-smith/join?id=BCH529&role=attend&pw=csugAttendeeMeeting ID: BCH529Attendee Entry Code: csugAttendeeWednesday 30 December at:7:30 pm Bangalore time3 pm Central European time6 am Redmond timeWe will have a lecture on SharePoint architecture from a CS standpoint, but would also like to discuss the differences between 2007 and…See More
Discussion posted by Michelle Sollicito Dec 30, 2009
Profile Icon

Software Smith Commerce Server User Group

Software Smith, who co-wrote the recently published book about Commerce Server 2007 (the only? one I can find) has a user group meeting coming up you all may be interested in..http://www.software-smith.com/usergroup.htmSee More
Discussion posted by Michelle Sollicito Dec 7, 2009
Profile Icon
Profile Icon

Profile Data

CS manager provides the facility to import/export Profile Definition. How about the profile data, is there a way we can import/export profile data?thanks in advanceRishiSee More
Discussion posted by Rishi Girdhar Sep 14, 2009
Profile Icon
Rishi Girdhar replied to Rishi Girdhar's discussion 'CS 2009 Templates missing'
Not exactly that. What I was looking for are the templates - Visual Studio Templates provided by Commerce Server 2009 to create web sites from scratch. Look at the documentation - "How to Create an Application in Visual Studio" To create…
Sep 4, 2009
Profile Icon
Rishi Girdhar replied to Rishi Girdhar's discussion 'Starter Site Architecture'
Thanks Michelle - I understand the delay, but that's what forum was invented for.I appreciate you try to reply with whatever knowledge you have.
Sep 4, 2009
Profile Icon
Michelle Sollicito replied to Rishi Girdhar's discussion 'Staging - Size, Automatic Restart and Incremental'
Ok.. for part 2) the rollback only applies to content (files - html, asp files, aspx files etc etc) NOT to data apparently See http://blog.vuscode.com/malovicn/archive/2007/06/17/commerce-server-2007-staging-how-to.aspx
Sep 3, 2009
Profile Icon
Michelle Sollicito replied to Rishi Girdhar's discussion 'Staging - Size, Automatic Restart and Incremental'
The only size limits I am aware of are.. The log files have size limits, see http://support.microsoft.com/kb/918312 CS 2007 and above do not have the 8kb row limit that older versions were subject to As far as I know any other limitations would be…
Sep 3, 2009
Profile Icon
Michelle Sollicito replied to Rishi Girdhar's discussion 'Starter Site Architecture'
I believe its 2 tier but again I will get the experts to reply here soon - they are real busy with a big project right now, sorry for the delay in getting responses to you on this stuff (free advice/stuff comes lowest priority for them of course -…
Sep 3, 2009
Profile Icon
Michelle Sollicito replied to Rishi Girdhar's discussion 'CS 2009 Templates missing'
I think this is what you are looking for.. http://commerceserver.ning.com/forum/topics/commerce-server-2009-partner if not let me know
Sep 3, 2009

eBar

Commerce Server Google Group

Loading… Loading feed

MS Commerce Server Tweets

Loading… Loading feed

© 2012   Created by Michelle Sollicito.   Powered by .

Report an Issue  |  Terms of Service

- - http://commerceserver.ning.com/ 1 daily - http://commerceserver.ning.com/forum 1 daily - http://commerceserver.ning.com/video 0.3 daily - http://commerceserver.ning.com/events 0.3 daily