<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>E-Commerce Product Architecture</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/khavas/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/khavas/feed.xml</link>
    <description>This blog deals with all aspects of designing solutions for E-Commerce in the modern world.</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:23:21 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>CSMetal - Code generating/Linq provider Release 2 is available</title>
      <link>https://docs.microsoft.com/archive/blogs/khavas/csmetal-code-generatinglinq-provider-release-2-is-available</link>
      <pubDate>Thu, 03 Mar 2011 09:34:51 GMT</pubDate>
      <dc:creator><![CDATA[Kerry 'Darth Stewie' Havas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/khavas/2011/03/03/csmetal-code-generatinglinq-provider-release-2-is-available/</guid>
      <description><![CDATA[CSMetal is a command line tool that reads Commerce Server 2009 metadata and generates a set of...]]></description>
      <content:encoded><![CDATA[<p>
<p><span style="color: #080808; font-size: xx-small;"><span style="color: #080808; font-size: xx-small;"><br /><b>CSMetal</b> is a command line tool that reads Commerce Server 2009 metadata and generates a set of strongly-typed classes to use with the Commerce Foundation API and a set of Linq providers to allow access to Commerce Server entities via Linq.<br />It can dramatically simplify basic access to Commerce Server 2009 functionality by enabling simple Linq-syntax queries against most Commerce Server entities.<br />Sample unit tests are included that demonstrate the various access methods including a full checkout scenario. <br /><br />This tool was created by Kerry Havas, Product Architect of the Commerce Server Product Unit.<br />It is not an official Microsoft release and is not supported by Microsoft Product Support.<br />Please use the discussion lists on MSDN Code Gallery to ask questions and provide feedback.<br /><br />It is on MSDN code gallery here:</span></span></p>
</p>
<p>&nbsp;</p>
<p><span style="font-size: xx-small;"><font size="1">
<p>&nbsp;</p>
</font></span>
<p>&nbsp;</p>
<a href="https://code.msdn.microsoft.com/csmetal"><span style="text-decoration: underline;"><span style="color: #0000ff; font-size: xx-small;"><span style="color: #0000ff; font-size: xx-small;">https://code.msdn.microsoft.com/csmetal</span></span></span></a><span style="color: #080808; font-size: xx-small;"><span style="color: #080808; font-size: xx-small;">
<p><br />There are also a couple of sample applications, including a rewritten version of the "Orders" sample that comes with Commerce Server, which demonstrates the savings in overall code of using the Linq based queries and even a pretty complete sample ASP.NET MVC 3 (Razor) application.<br /><br />All source code is provided for the code generator and it may be modified to fit your need.</p>
</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>CSMetal - Code generating/Linq provider sample Released</title>
      <link>https://docs.microsoft.com/archive/blogs/khavas/csmetal-code-generatinglinq-provider-sample-released</link>
      <pubDate>Mon, 25 Oct 2010 10:15:14 GMT</pubDate>
      <dc:creator><![CDATA[Kerry 'Darth Stewie' Havas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/khavas/2010/10/25/csmetal-code-generatinglinq-provider-sample-released/</guid>
      <description><![CDATA[CSMetal is a command line tool that reads Commerce Server 2009 metadata and generates a set of...]]></description>
      <content:encoded><![CDATA[<p><b>CSMetal</b> is a command line tool that reads Commerce Server 2009 metadata and generates a set of strongly-typed classes to use with the Commerce Foundation API and a set of Linq providers to allow access to Commerce Server entities via Linq.    <br />It can dramatically simplify basic access to Commerce Server 2009 functionality by enabling simple Linq-syntax queries against most Commerce Server entities.    <br />Sample unit tests are included that demonstrate the various access methods including a full checkout scenario.     <br />This tool was created by Kerry Havas (me), Product Architect of the Commerce Server Product Unit.    <br />It is not an official Microsoft release and is not supported by Microsoft Product Support.    <br />Please use the discussion lists here to ask questions and provide feedback.    <br />It is on MSDN code gallery here:</p>  <p>https://code.msdn.microsoft.com/csmetal</p>  <p>There are also a couple of sample applications, including a rewritten version of the &quot;Orders&quot; sample that comes with Commerce Server, which demonstrates the savings in overall code of using the Linq based queries and even a sample ASP.NET MVC 3 (Razor) application.   <br />All source code is provided for the code generator and it may be modified to fit your need.</p>  <p>Questions/Comments can be posted here or on the Discussion tab in MSDN Code Gallery.</p>]]></content:encoded>
    </item>
    <item>
      <title>Refreshing a particular profile cache instance</title>
      <link>https://docs.microsoft.com/archive/blogs/khavas/refreshing-a-particular-profile-cache-instance</link>
      <pubDate>Mon, 26 Jul 2010 15:38:41 GMT</pubDate>
      <dc:creator><![CDATA[Kerry 'Darth Stewie' Havas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/khavas/2010/07/26/refreshing-a-particular-profile-cache-instance/</guid>
      <description><![CDATA[It’s pretty easy to call an operation in Commerce Server 2009 that refreshes the entire profile...]]></description>
      <content:encoded><![CDATA[<p>It’s pretty easy to call an operation in Commerce Server 2009 that refreshes the entire profile cache like below:</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:10c4508d-1bbe-4b94-bec2-d77e1ffb72ef" class="wlWriterEditableSmartContent"><pre style=" width: 545px; height: 99px;background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;;font-family:Courier New;font-size:7.8"><div><!--

code highlighting produced by Actipro CodeHighlighter (freeware)
https://www.CodeHighlighter.com/

--><span style="color: #000000;">var updateCaches </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> CommerceUpdate</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">CommerceEntity</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">CommerceCache</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);updateCaches.SearchCriteria.Model.Properties[</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Name</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">] </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">ProfileCache</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">;
CommerceResponse updateResponse </span><span style="color: #000000;">=</span><span style="color: #000000;">  OperationService.ProcessRequest(currentContext, updateCache.ToRequest());</span></!--

code></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  https://dunnhq.com --></!--></div>


<p>But what if you want to modify a particular instance in the cache, rather than blowing the whole cache away?</p>

<p>There is no out of the box way to do that in Commerce Server,&#160; but its very easy to create a new message that does exactly that.</p>

<p>To start, create a new OperationSequenceComponent that encapsulates the Commerce Core Service functionality that clears a cache instance like below:</p>

<pre><font size="1"></font></pre>

<pre><font size="1"></font></pre>

<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:e0131f00-75e8-4d80-91b7-7e924a91c184" class="wlWriterEditableSmartContent"><pre style=" width: 545px; height: 379px;background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;;font-family:Courier New;font-size:7.8"><div><!--

code highlighting produced by Actipro CodeHighlighter (freeware)
https://www.CodeHighlighter.com/

--><span style="color: #0000FF;">namespace</span><span style="color: #000000;"> Microsoft.Commerce.Samples.Pipelines
{
    </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> ProfileCacheInstance : OperationSequenceComponent
    {
        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">override</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> ExecuteUpdate(CommerceUpdateOperation updateOperation, OperationCacheDictionary operationCache, CommerceUpdateOperationResponse response)
        {

            var modelSearch </span><span style="color: #000000;">=</span><span style="color: #000000;"> (CommerceModelSearch)updateOperation.SearchCriteria;

            var eMail </span><span style="color: #000000;">=</span><span style="color: #000000;"> modelSearch.Model.Properties[</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">email</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">].ToString();

            </span><span style="color: #008000;">//</span><span style="color: #008000;"> Get the Profiles run-time object.</span><span style="color: #008000;">
</span><span style="color: #000000;">            ProfileContext ctxt </span><span style="color: #000000;">=</span><span style="color: #000000;"> CommerceContext.Current.ProfileSystem;

            </span><span style="color: #008000;">//</span><span style="color: #008000;"> Get the profile from an eMail variable.</span><span style="color: #008000;">
</span><span style="color: #000000;">            Profile prof </span><span style="color: #000000;">=</span><span style="color: #000000;"> ctxt.GetProfile(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">email_address</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, eMail, </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">UserObject</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);

            </span><span style="color: #008000;">//</span><span style="color: #008000;"> Refresh the profile.</span><span style="color: #008000;">
</span><span style="color: #000000;">            prof.Refresh();

        }
    }
} 
</span></!--

code></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  https://dunnhq.com --></!--></div>

<p>Next, you add a reference to this handler in your CommerceConfiguration.config file like this:</p>

<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:c4a5f286-6b7c-4d07-ad8f-ad6b56224927" class="wlWriterEditableSmartContent"><pre style=" width: 545px; height: 99px;background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;;font-family:Courier New;font-size:7.8"><div><!--

code highlighting produced by Actipro CodeHighlighter (freeware)
https://www.CodeHighlighter.com/

--><span style="color: #000000;">&lt;</span><span style="color: #000000;">MessageHandler name</span><span style="color: #000000;">=</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">CommerceUpdateOperation_ProfileCacheInstance</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">        responseType</span><span style="color: #000000;">=</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Microsoft.Commerce.Contracts.Messages.CommerceUpdateOperationResponse,            Microsoft.Commerce.Contracts, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">
        </span><span style="color: #000000;">&lt;</span><span style="color: #000000;">OperationSequence</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">
          </span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Component name</span><span style="color: #000000;">=</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">ProfileCacheInstance Updater</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">              type</span><span style="color: #000000;">=</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Microsoft.Commerce.Samples.Pipelines.ProfileCacheInstance,             Microsoft.Commerce.Samples.Pipelines, Version=1.0.0.0, Culture=neutral,PublicKeyToken=b23706c1d1011ab9</span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">/&gt;</span><span style="color: #000000;">
        </span><span style="color: #000000;">&lt;/</span><span style="color: #000000;">OperationSequence</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">
      </span><span style="color: #000000;">&lt;/</span><span style="color: #000000;">MessageHandler</span><span style="color: #000000;">&gt;</span></!--

code></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  https://dunnhq.com --></!--></div>

<p>To call this functionality, you can build a CommerceUpdate operation like this one:</p>

<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:7d32bd72-6ef4-4d54-bbb4-90b9d7df4b68" class="wlWriterEditableSmartContent"><pre style=" width: 545px; height: 99px;background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;;font-family:Courier New;font-size:7.8"><div><!--

code highlighting produced by Actipro CodeHighlighter (freeware)
https://www.CodeHighlighter.com/

--><span style="color: #000000;">var updateCaches </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> CommerceUpdate</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">CommerceEntity</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">ProfileCacheInstance</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">); 
updateCaches.SearchCriteria.Model.Properties.Add(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">email</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, “foo@foo.com”);

CommerceResponse updateResponse </span><span style="color: #000000;">=</span><span style="color: #000000;">  OperationService.ProcessRequest(currentContext, updateCache.ToRequest());</span></!--

code></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  https://dunnhq.com --></!--></div>

<p>As you can see, it is quite easy to add a new message and a new handler that executes specific business functionality.&#160; Now you have that business functionality in a nice discreet handler that can be reused in many projects.</p>]]></content:encoded>
    </item>
    <item>
      <title>Commerce Server 2009 OperationSequenceComponent Extensibility, Part 2</title>
      <link>https://docs.microsoft.com/archive/blogs/khavas/commerce-server-2009-operationsequencecomponent-extensibility-part-2</link>
      <pubDate>Mon, 12 Jul 2010 14:54:09 GMT</pubDate>
      <dc:creator><![CDATA[Kerry 'Darth Stewie' Havas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/khavas/2010/07/12/commerce-server-2009-operationsequencecomponent-extensibility-part-2/</guid>
      <description><![CDATA[In my previous post, I discussed using the Commerce Foundation’s extensibilty model to create a...]]></description>
      <content:encoded><![CDATA[<p>In my previous post, I discussed using the Commerce Foundation’s extensibilty model to create a basic pricing engine.&#160; I created a simple OperationSequenceComponent that I configure to run whenever a query for a product comes through the foundation.</p>  <p>While this was simple to do and worked great, as Brian pointed out in the comments, it doesn’t completely solve the problem.&#160; As you can see, once we add that item to the basket, then the pricing reverts back to the original pricing.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/8372.image_3F19F0BF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/8372.image_5F00_3F19F0BF.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/2273.image_thumb_7AA9D9B2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/2273.image_5F00_thumb_5F00_7AA9D9B2.png" width="542" height="327" /></a></p>  <p>The reason that this occurs is that basket calculations are not done in the Commerce Foundation, but are done down in the legacy COM-based pipelines.&#160; The legacy pipelines actually query for product information directly to the database.&#160; It does not go through the Commerce Foundation.&#160; This means that are extension that we built never gets hit.</p>  <p>Lets open up the pipelin editor, which is in the tools folder and then navigate to the basket.pcf, which contains the sequence of components to run when the basket pipeline is run.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/5722.image_6788AD06.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/5722.image_5F00_6788AD06.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/5238.image_thumb_716D9E71.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/5238.image_5F00_thumb_5F00_716D9E71.png" width="344" height="582" /></a></p>  <p>Fortunately for us, we know that it is the “QueryCatalogInfo” pipeline component, which is the first component that runs, that retrieves the basic information for a product and pushes it into the context for later use by other pipeline components.</p>  <p>So it would be nice to know what this component does.&#160; The easiest way to do that is to turn on logging.&#160; Pipelines can log everything read or written to the context, so it’s relatively easy to turn on logging and look at what the various components do.&#160; To turn on logging, you go to the web.config and find the entry in the &lt;pipelines&gt; section and change logging to “true”.</p>  <p><font face="Courier New">pipeline name=&quot;basket&quot; path=&quot;pipelines\basket.pcf&quot; transacted=&quot;false&quot; type=&quot;OrderPipeline&quot; loggingEnabled=&quot;true&quot; /&gt;</font></p>  <p>The basket pipeline runs every time you load the basket page, so it’s easy to see what happens by refreshing the basket page.&#160; There should be a new folder underneath the Pipelines folder in your virtual directory which has file with an extension “.pipelog”&#160; Open the “basket.pipelog” up in notepad and you should see a log of everything that the pipeline read or wrote during it’s execution.&#160; The first pipeline component that executed is what we are interested in and so we can look at that:</p>  <table border="1" cellspacing="0" cellpadding="2" width="522"><tbody>     <tr>       <td valign="top" width="520">         <p>PIPELINE:++ component[0x0] about to be called ProgID: Commerce.QueryCatalogInfo            <br />RootObject:&#160;&#160;&#160; ReadValue&#160;&#160;&#160; _Basket_Errors&#160;&#160;&#160; VT_DISPATCH&#160;&#160;&#160; PV=[0xc20e9d8]&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; <br />RootObject:&#160;&#160;&#160; ReadValue&#160;&#160;&#160; Items&#160;&#160;&#160; VT_DISPATCH&#160;&#160;&#160; PV=[0xc20ead8]&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; <br />RootObject:&#160;&#160;&#160; ReadValue&#160;&#160;&#160; catalog_language&#160;&#160;&#160; VT_NULL&#160;&#160;&#160; __null__&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; <br />items:&#160;&#160;&#160; ReadItem&#160;&#160;&#160; 0&#160;&#160;&#160; VT_DISPATCH&#160;&#160;&#160; PV=[0xf27ce48]&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; <br />:&#160;&#160;&#160; ReadValue&#160;&#160;&#160; product_catalog&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; Adventure Works Catalog&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; <br />:&#160;&#160;&#160; ReadValue&#160;&#160;&#160; product_id&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; AW200-12&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; <br />:&#160;&#160;&#160; ReadValue&#160;&#160;&#160; product_variant_id&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; 3&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; <br />:&#160;&#160;&#160; ReadValue&#160;&#160;&#160; catalog_language&#160;&#160;&#160; VT_NULL&#160;&#160;&#160; __null__&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; <br />items:&#160;&#160;&#160; ReadItem&#160;&#160;&#160; 0&#160;&#160;&#160; VT_DISPATCH&#160;&#160;&#160; PV=[0xf27ce48]&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_#QCI_LineItem&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_I4&#160;&#160;&#160; 0&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_BaseCatalogName&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; Adventure Works Catalog&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_OrigProductID&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; AW200-12&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_OrigVariantID&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; 3&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_cy_list_price&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_CY&#160;&#160;&#160; 200&#160;&#160;&#160; <br />:&#160;&#160;&#160; ReadValue&#160;&#160;&#160; _product_cy_list_price&#160;&#160;&#160; VT_CY&#160;&#160;&#160; 200&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_UseCategoryPricing&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BOOL&#160;&#160;&#160; 0&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_OriginalPrice&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_CY&#160;&#160;&#160; 200&#160;&#160;&#160; <br />:&#160;&#160;&#160; ReadValue&#160;&#160;&#160; _product_OriginalPrice&#160;&#160;&#160; VT_CY&#160;&#160;&#160; 200&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_i_ClassType&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_I4&#160;&#160;&#160; 2&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_ParentOID&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_I4&#160;&#160;&#160; 127&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_ProductID&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; AW200-12&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_VariantID&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; 3&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_LastModified&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_DATE&#160;&#160;&#160; 5/11/2010 2:42:22 PM&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_CatalogName&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; Adventure Works Catalog&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_ExportReady&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BOOL&#160;&#160;&#160; -1&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_DefinitionName&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; SleepingBag&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_ProductCode&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; AW200-12&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_VariantCode&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_I4&#160;&#160;&#160; 3&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_Image_filename&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; sleepingbags03.png&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_Image_height&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_I4&#160;&#160;&#160; 120&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_Image_width&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_I4&#160;&#160;&#160; 120&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_IntroductionDate&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_DATE&#160;&#160;&#160; 4/19/2006 12:35:02 PM&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_OnSale&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BOOL&#160;&#160;&#160; 0&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_DisplayName&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; Big Sur (Blue)&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; Big Sur (Blue)&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_Description&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; Generously cut sleeping bag, goose down with polyster taffeta, cotton storage sack included.&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_Name&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; Big Sur&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_Rating&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; 3.5&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_ProductColor&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_BSTR&#160;&#160;&#160; Blue&#160;&#160;&#160; <br />:&#160;&#160;&#160; WriteValue&#160;&#160;&#160; _product_categories&#160;&#160;&#160; VT_EMPTY&#160;&#160;&#160; __empty__&#160;&#160;&#160; VT_VARIANT | VT_ARRAY&#160;&#160;&#160; </p>       </td>     </tr>   </tbody></table>  <p>This gives us a good idea of what this “QueryCatalogInfo” component does.&#160; Now we have a couple of choices here.</p>  <p>1) We can create another com-based pipeline component that we put right after the &quot;QueryCatalogInfo” component that adjusts the price per our business rules</p>  <p>2) We remove this legacy component and replace it with an OperationSequenceComponent that does the same thing.</p>  <p>If I want to simply stick another COM component in there then I end up having to run my rules-engine with any caching etc in two places.&#160; I would much rather simply change the way the pipeline works so that it retrieves the product information using the Commerce Foundation, executing my pricing extension in the same way it does when I retrieve a product for display. </p>  <p>The other thing that you might notice is that it writes a lot of stuff into the context that you really don’t need because no other pipeline component uses them.&#160; We can probably make something that is more simplified and only passes in information that we need.</p>  <p>What you might notice in looking at the above list of values read and written is that there are certain values that the pipeline assumes are already there.&#160; For example, it assumes that there is an “Items” entry and it assumes that for each item in the items dictionary there is a productid, variantid, catalog,, catalog-language.&#160; </p>  <p>So if those entries are already there, how did they get there?&#160; The answer is that there is certain information pushed into the context by the Commerce Foundation before a pipeline is even run.&#160; In our case the helper method for the basket pipeline knows that some elements of the orderform need to be in the pipeline context before it is run and it helpfully (hence the name…) copies them over for us.</p>  <p>Now if it loaded the orderform and directly copied the values into the context in the same OperationSequenceComponent, then we would have a very hard time extending it.&#160; Luckily for us, this was something that was considered and it was broken into several operations.</p>  <p>If you open up the “channelconfiguration.config” file and search for “QueryOperation_basket” you will see the following entries:</p>  <p><font face="Courier New">&lt;Component name=&quot;Basket Loader&quot; type=&quot;Microsoft.Commerce.Providers.Components.BasketQueryProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; …</font></p>  <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;Order Pipelines Processor&quot; type=&quot;Microsoft.Commerce.Providers.Components.OrderPipelinesProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Configuration customElementName=&quot;OrderPipelinesProcessorConfiguration&quot; customElementType=&quot;Microsoft.Commerce.Providers.Components.</font></p>  <p><font face="Courier New">OrderPipelinesProcessorConfiguration, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;OrderPipelinesProcessorConfiguration&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!--       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; The name attribute should contain one of the Order pipeline names defined in the pipelines section of the CommerceServer site configuration.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; The type attribute should contain one of the values of the Microsoft.CommerceServer.Runtime.Orders.OrderPipelineType enumeration:       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Custom&#160;&#160;&#160;&#160;&#160;&#160; Indicates a custom pipeline type.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Product&#160;&#160;&#160;&#160;&#160; Indicates a Product pipeline (e.g. Product.pcf).       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Basket&#160;&#160;&#160;&#160;&#160;&#160; Indicates a Basket pipeline (e.g. Basket.pcf).       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Total&#160;&#160;&#160;&#160;&#160;&#160;&#160; Indicates a Total pipeline (e.g. Total.pcf).       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Checkout&#160;&#160;&#160;&#160; Indicates a Checkout pipeline (e.g. Checkout.pcf).       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AcceptBasket Indicates an AcceptBasket pipeline (e.g. AcceptBasket.pcf).       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; --&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;OrderPipelines&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Pipeline name=&quot;basket&quot; type=&quot;Basket&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Pipeline name=&quot;total&quot; type=&quot;Total&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/OrderPipelines&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/OrderPipelinesProcessorConfiguration&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Configuration&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Component&gt;</font></p>  <p><font face="Courier New"></font></p>  <p><font face="Courier New"></font></p>  <p>You see that there is a “Basket Loader” component that runs first.&#160; This loads the basket and places it in the operationCache.&#160; Later the “Order PipelinesProcessor” runs and this takes that cached order and writes it into the context.</p>  <p>This is great because we have the ability to inject our own logic between those two entries that modifies the basket object in the operationCache and adds our additional information to the basket line items.</p>  <p>So we can write a new OperationSequenceComponent that looks like this:</p>  <table border="1" cellspacing="0" cellpadding="2" width="507"><tbody>     <tr>       <td valign="top" width="505">         <p><font face="Courier New">using System;              <br />using System.Collections.Generic;               <br />using System.Linq;               <br />using System.Text;               <br />using Microsoft.Commerce.Providers.Components;               <br />//using Microsoft.Commerce.Server;               <br />using Microsoft.CommerceServer.Runtime.Orders;</font></p>          <p><font face="Courier New">using Microsoft.Commerce.Contracts.Messages;              <br />using Microsoft.Commerce.Broker;               <br />using Microsoft.Commerce.Common.MessageBuilders;               <br />using Microsoft.Commerce.Contracts;</font></p>          <p><font face="Courier New">namespace Microsoft.Commerce.Samples.Pipelines              <br />{               <br />&#160;&#160;&#160; public class QueryCatalogInfo : OperationSequenceComponent               <br />&#160;&#160;&#160; {               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; private static void UpdateCatalogInfo(OperationCacheDictionary operationCache)               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var ordersGroup =              <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (Dictionary&lt;string, OrderGroup&gt;)operationCache[&quot;OrderGroup_071CA882-C773-4ca8-AF95-188D10492B85&quot;];</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; foreach (KeyValuePair&lt;string, OrderGroup&gt; orderGroup in ordersGroup)              <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var orderForm = orderGroup.Value.OrderForms[0];</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var lineItems = orderForm.LineItems;</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; foreach (LineItem lineItem in lineItems)              <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var productId = lineItem.ProductId;               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //string variantId = lineItem.ProductVariantId;               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var catalogId = lineItem.ProductCatalog;</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var productQuery = new CommerceQuery&lt;CommerceEntity&gt;(&quot;Product&quot;);</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Set the search criteria to get the product desired              <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; productQuery.SearchCriteria.Model.Properties[&quot;CatalogId&quot;] = catalogId;               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; productQuery.SearchCriteria.Model.Id = productId;</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Add Related Query Operation for Variants              <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var queryVariants = new CommerceQueryRelatedItem&lt;CommerceEntity&gt;(&quot;Variants&quot;);               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; productQuery.RelatedOperations.Add(queryVariants);               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var request = productQuery.ToRequest();              <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var response2 = OperationService.InternalProcessRequest(request);               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var commerceOperationResponse = (CommerceQueryOperationResponse)response2.OperationResponses[0];</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var commerceEntity = commerceOperationResponse.CommerceEntities[0];</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lineItem[&quot;_product_cy_list_price&quot;] = System.Convert.ToDecimal(commerceEntity.Properties[&quot;ListPrice&quot;]);              <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lineItem[&quot;_product_OriginalPrice&quot;] = System.Convert.ToDecimal(commerceEntity.Properties[&quot;ListPrice&quot;]);               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lineItem[&quot;_product_salePrice&quot;] = System.Convert.ToDecimal(commerceEntity.Properties[&quot;salePrice&quot;]);               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lineItem.DisplayName = commerceEntity.Properties[&quot;DisplayName&quot;] as string;               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (commerceEntity.Properties.Contains(&quot;ShippingCost&quot;))               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lineItem[&quot;_product_ShippingCost&quot;] = </font></p>          <p><font face="Courier New">System.Convert.ToDecimal(commerceEntity.Properties[&quot;ShippingCost&quot;])</font>&#160;<font face="Courier New">              <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lineItem[&quot;_product_Image_filename&quot;] = commerceEntity.Properties[&quot;Image_filename&quot;];</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }              <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; public override void ExecuteQuery(CommerceQueryOperation queryOperation, OperationCacheDictionary operationCache, CommerceQueryOperationResponse response)              <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; UpdateCatalogInfo(operationCache);               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</font></p>          <p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; public override void ExecuteUpdate(CommerceUpdateOperation updateOperation, OperationCacheDictionary operationCache, CommerceUpdateOperationResponse response)              <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; UpdateCatalogInfo(operationCache);               <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</font></p>          <p><font face="Courier New">&#160;&#160;&#160; }              <br />}               <br /></font></p>       </td>     </tr>   </tbody></table>  <p>What this component does is retrieve the basket from the operationCache, walk through each of it’s order forms and each line and calls out to the foundation to retrieve data for each item.&#160; This will then execute the “QueryOperation_Product” which will execute our custom pricing rule.&#160; The retrieved data is then copied into the order forms lineItem dictionary.</p>  <p>This means that when the basket is copied into the context later on in the component sequence, it will already have those values in place that the QueryCatalogInfo is supposed to put there.&#160; So we can remove that piepline component so that it will not run.</p>  <p>We strong-name, build and GAC the component above and we can go into the “channelconfiguration.config” file and add this new components into the list right above the “Order Pipelines Processor” component in the “QueryOperation_basket” message handler.&#160; Note that the “Order Pipeline Processor” component is called from a number of message handlers and we need to add this entry above each one:</p>  <p>&lt;Component name=&quot;QueryCatalogInfo&quot; type=&quot;Microsoft.Commerce.Samples.Pipelines.QueryCatalogInfo, Microsoft.Commerce.Samples.Pipelines, Version=1.0.0.0, Culture=neutral,PublicKeyToken=b23706c1d1011ab9&quot; /&gt;</p>  <p>It looks like we have everything configured now, so lets restart IIS (give it a clean slate) and refresh the basket again and see what we get.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/4657.image_5E4C71C5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/4657.image_5F00_5E4C71C5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/8054.image_thumb_4FA1C5E0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/8054.image_5F00_thumb_5F00_4FA1C5E0.png" width="501" height="338" /></a></p>  <p>Amazingly enough, my basket now contains the pricing generated by my pricing engine.&#160; I’ve also removed a legacy com-based component from a pipeline which is executed quite a lot, which gives me more control of the overall solution.</p>]]></content:encoded>
    </item>
    <item>
      <title>Commerce Server 2009 Operation Sequence Component Extensibility</title>
      <link>https://docs.microsoft.com/archive/blogs/khavas/commerce-server-2009-operation-sequence-component-extensibility</link>
      <pubDate>Sat, 10 Jul 2010 03:13:16 GMT</pubDate>
      <dc:creator><![CDATA[Kerry 'Darth Stewie' Havas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/khavas/2010/07/10/commerce-server-2009-operation-sequence-component-extensibility/</guid>
      <description><![CDATA[Commerce Server 2009’s Commerce Foundation added a great extensibility layer.&#160; Every call into...]]></description>
      <content:encoded><![CDATA[<p><font size="1">Commerce Server 2009’s Commerce Foundation added a great extensibility layer.&#160; Every call into the foundation flows through a series of components called Operation Sequence Components.</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/0511.image_47722B10.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/0511.image_5F00_47722B10.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/8358.image_thumb_3B703ADC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/8358.image_5F00_thumb_5F00_3B703ADC.png" width="591" height="434" /></a></p>  <p>&#160;<font size="1">All of the out-of-the-box functionality, which wraps the Commerce Core Services is implemented as Operation Sequence Components.</font></p>  <p><font size="1">The Operation Sequence Components that get called when a particular message comes through the foundation is defined in the ChannelConfiguration.config file.&#160; This file has an entry for every message and a list of components to call to build up a response to that message.</font></p>  <p><font face="Courier New">&lt;MessageHandler name=&quot;CommerceQueryOperation_Product&quot; responseType=&quot;Microsoft.Commerce.Contracts.Messages.CommerceQueryOperationResponse, Microsoft.Commerce.Contracts, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot;&gt;      <br />&#160; &lt;OperationSequence&gt;       <br />&#160;&#160;&#160; &lt;Component name=&quot;Product Query Processor&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductLoader, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;Cross-Sell Provider&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductCommerceServerRelationshipProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Configuration customElementName=&quot;CommerceServerRelationshipConfiguration&quot; customElementType=&quot;Microsoft.Commerce.Providers.Components.CommerceServerRelationshipConfiguration, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;CommerceServerRelationshipConfiguration commerceServerRelationshipName=&quot;CrossSell&quot; internalRelationshipName=&quot;CrossSells&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Configuration&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;/Component&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;Up-Sell Provider&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductCommerceServerRelationshipProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Configuration customElementName=&quot;CommerceServerRelationshipConfiguration&quot; customElementType=&quot;Microsoft.Commerce.Providers.Components.CommerceServerRelationshipConfiguration, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;CommerceServerRelationshipConfiguration commerceServerRelationshipName=&quot;UpSell&quot; internalRelationshipName=&quot;UpSells&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Configuration&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;/Component&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;Product Variant Provider&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductVariantProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;ProductAncestorCategoryProcessor&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductAncestorCategoryProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;ProductCanonicalCategoryProcessor&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductCanonicalCategoryProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;ProductParentCategoryProcessor&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductParentCategoryProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;ProductPrimaryCategoryProcessor&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductPrimaryCategoryProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;ProductRelatedCategoryProcessor&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductRelatedCategoryProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;ProductRelatedProductProcessor&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductRelatedProductProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;ProductInventoryItemsProcessor&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductInventoryItemsProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;Product catalog relationship&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductCatalogRelationshipProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;Product base catalog relationship&quot; type=&quot;Microsoft.Commerce.Providers.Components.ProductBaseCatalogRelationshipProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;Product Discounts Relationship&quot; type=&quot;Microsoft.Commerce.Providers.Components.CatalogEntityDiscountsProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot; /&gt;       <br />&#160;&#160;&#160; &lt;/Component&gt;       <br />&#160; &lt;/OperationSequence&gt;       <br />&lt;/MessageHandler&gt;       <br /></font></p>  <p><font size="1">This creates a great extensibility model because you can create your own custom Operation Sequence Component and insert it before, after or in between the out-of-the-box Operation Sequence Components.&#160; You can even replace the out-of-the-box components with your own if you want to connect to an LOB system or create your own customer data providers.</font></p>  <p><font size="1">If you create a component and insert it before the out-of-the-box components, then you have an opportunity to examine and/or modify the query.&#160; If you insert the component after, then you can examine and/or modify the results that will be returned.</font></p>  <p><font size="1">It’s possible, for example to implement a component that executes business logic to modify the price of a product based on certain conditions.</font></p>  <p><font size="1">As a simple, albeit ridiculous, example, suppose I wanted to lower the price of my products to $1 if it is Saturday.</font></p>  <p><font size="1">To start with I would create a new class in Visual Studio like this:</font></p>  <p><font face="Courier New">using Microsoft.Commerce.Providers.Components;      <br />using Microsoft.Commerce.Contracts;</font></p>  <p><font face="Courier New">namespace Microsoft.Commerce.Samples.PriceEngine      <br />{       <br />&#160;&#160;&#160; public class PriceEngine:OperationSequenceComponent       <br />&#160;&#160;&#160; {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; public override void ExecuteQuery(Microsoft.Commerce.Contracts.Messages.CommerceQueryOperation queryOperation, Microsoft.Commerce.Broker.OperationCacheDictionary operationCache, Microsoft.Commerce.Contracts.Messages.CommerceQueryOperationResponse response)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (System.DateTime.Now.DayOfWeek == System.DayOfWeek.Saturday)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; foreach (var commerceEntity in response.CommerceEntities.FindAll(c =&gt; c.ModelName == &quot;Product&quot;))       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; commerceEntity.Properties[&quot;ListPrice&quot;] = 1;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; foreach (var variant in commerceEntity.Properties[&quot;Variants&quot;] as CommerceRelationshipList)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; variant.Target.Properties[&quot;ListPrice&quot;] = 1;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }       <br />&#160;&#160;&#160; }       <br />}</font></p>  <p><font size="1">Now sign, build and copy this component to the GAC.</font></p>  <p><font size="1">Next open up the ChannelConfiguration.config file and add an entry to the end of the list of compoents to call when a product is retrieved.</font></p>  <p><font face="Courier New">&lt;MessageHandler name=&quot;CommerceQueryOperation_Product&quot; responseType=&quot;Microsoft.Commerce.Contracts.Messages.CommerceQueryOperationResponse, Microsoft.Commerce.Contracts, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;OperationSequence&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!—out-of-the-box components here—&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Component name=&quot;PriceEngine&quot; type=&quot;Microsoft.Commerce.Samples.PriceEngine.PriceEngine, Microsoft.Commerce.Samples.PriceEngine, Version=1.0.0.0, Culture=neutral,PublicKeyToken=c70c9a2d1f784c32&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/OperationSequence&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;/MessageHandler&gt;</font></p>  <p><font size="1">Now, when a product is retrieved, it will automatically execute your additional business logic and reduce the price to $1 when it is Saturday.</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/6886.image_33E4CB6F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/6886.image_5F00_33E4CB6F.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/1007.image_thumb_53277242.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/1007.image_5F00_thumb_5F00_53277242.png" width="523" height="382" /></a></p>  <p><font size="1">Obviously, you can execute much more complex logic or even call out to an external pricing service.</font></p>  <p><font size="1"></font></p>]]></content:encoded>
    </item>
    <item>
      <title>Creating Configuration Points in Operation Sequence Components</title>
      <link>https://docs.microsoft.com/archive/blogs/khavas/creating-configuration-points-in-operation-sequence-components</link>
      <pubDate>Tue, 29 Jun 2010 11:51:00 GMT</pubDate>
      <dc:creator><![CDATA[Kerry 'Darth Stewie' Havas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/khavas/2010/06/29/creating-configuration-points-in-operation-sequence-components/</guid>
      <description><![CDATA[In my last post, I showed how to create an OperationSequenceComponent (OSC) that allows you to alter...]]></description>
      <content:encoded><![CDATA[<p>In my last <a href="https://blogs.msdn.com/b/khavas/archive/2010/06/28/filtering-category-products-that-are-out-of-stock.aspx">post</a>, I showed how to create an OperationSequenceComponent (OSC) that allows you to alter the default behavior when a category is retrieved so that out of stock products are filtered out.</p>
<p>Unfortunately, I had to hard code the setting into the OSC like this:</p>
<p>categoryConfiguration.InventoryOptions.FilterOutOfStockSkus = true;</p>
<p>Now, if I ever want to change that setting, I have to go in and change the code, recompile and redeploy.&nbsp; It would be great if I could make that configurable so that I&nbsp; can change it through configuration whenever I want without having to alter the code.</p>
<p>Fortunately, Commerce Server Operation Sequence Components have a way to facilitate configuration quite easily.</p>
<p>To start with, we take the OSC that I created in my last post:</p>
<table cellpadding="2" cellspacing="0" border="1" style="width: 637px; height: 402px;">
<tbody>
<tr>
<td width="761" valign="top">
<p><span style="font-family: Courier New;">using System; <br />using System.Collections.Generic; <br />using System.Linq; <br />using System.Text; <br />using Microsoft.Commerce.Providers.Components;</span></p>
<p><span style="font-family: Courier New;">namespace Microsoft.Commerce.Samples <br />{ <br />&nbsp;&nbsp;&nbsp; public class OnHandFilter:OperationSequenceComponent <br />&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public override void ExecuteQuery(Microsoft.Commerce.Contracts.Messages.CommerceQueryOperation queryOperation, Microsoft.Commerce.Broker.OperationCacheDictionary operationCache, Microsoft.Commerce.Contracts.Messages.CommerceQueryOperationResponse response) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></p>
<p><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var categoryConfiguration = new Microsoft.CommerceServer.Catalog.CategoryConfiguration(); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; categoryConfiguration.InventoryOptions = new Microsoft.CommerceServer.Inventory.InventoryOptions(); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; categoryConfiguration.InventoryOptions.FilterOutOfStockSkus = true; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; operationCache.Add("CategoryContentSelectorKey_D6E2DE05-01E0-4a35-BF26-BCF95971B8D1", categoryConfiguration);</span></p>
<p><br /><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp; } <br />}</span></p>
</td>
</tr>
</tbody>
</table>
<p>Next, we need to create a class to store the configurable elements:</p>
<table cellpadding="2" cellspacing="0" border="1" style="width: 638px; height: 221px;">
<tbody>
<tr>
<td width="760" valign="top">
<p><span style="font-family: Courier New;">using System.Configuration;</span></p>
<p><span style="font-family: Courier New;">namespace Microsoft.Commerce.Samples <br />{ <br />&nbsp;&nbsp;&nbsp; public class Configuration : ConfigurationElement <br />&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private const string StrFilterOutOfStockSkus = "FilterOutOfStockSkus";</span></p>
<p><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ConfigurationProperty(StrFilterOutOfStockSkus)] <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public bool FilterOutOfStockSkus <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { return System.Convert.ToBoolean(this[StrFilterOutOfStockSkus]); } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp; } <br />}</span></p>
</td>
</tr>
</tbody>
</table>
<p>Next, we need to implement the IConfigurable interface into the OnHandFilter class:</p>
<table cellpadding="2" cellspacing="0" border="1" style="width: 639px; height: 159px;">
<tbody>
<tr>
<td width="750" valign="top">
<p><span style="font-family: Courier New;">protected Configuration ComponentConfiguration; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #region IConfigurable Members</span></p>
<p><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void Configure(System.Configuration.ConfigurationElement configuration) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ComponentConfiguration = configuration as Configuration;</span></p>
<p><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #endregion</span></p>
</td>
</tr>
</tbody>
</table>
<p>Now, we change our hard coded value to read from the configuration:</p>
<table cellpadding="2" cellspacing="0" border="1" style="width: 637px; height: 35px;">
<tbody>
<tr>
<td width="748" valign="top">
<p><span style="font-family: Courier New;">categoryConfiguration.InventoryOptions.FilterOutOfStockSkus = ComponentConfiguration.FilterOutOfStockSkus;</span></p>
</td>
</tr>
</tbody>
</table>
<p>You can now compile and deploy this component to the GAC.</p>
<p>Next, open up your ChannelConfiguration.config file and go find the &ldquo;QueryOperation_Category&rdquo; section that was modified in the previous blog post to add the new OnHandFilter OSC.&nbsp; Alter the entry to include the new configuration setting.</p>
<table cellpadding="2" cellspacing="0" border="1" style="width: 635px; height: 116px;">
<tbody>
<tr>
<td width="737" valign="top">
<p><span style="font-family: Courier New;">&lt;Component name="OnHandFilter" type="Microsoft.Commerce.Samples.OnHandFilter, OnHandFilter, Version=1.0.0.0, Culture=neutral,PublicKeyToken=62d299e5f36470e7"&gt; <br />&nbsp; &lt;Configuration customElementName="Configuration" customElementType="Microsoft.Commerce.Samples.Configuration, OnHandFilter, Version=1.0.0.0, Culture=neutral,PublicKeyToken=62d299e5f36470e7"&gt; <br />&nbsp;&nbsp;&nbsp; &lt;Configuration FilterOutOfStockSkus="True" /&gt; <br />&nbsp; &lt;/Configuration&gt;&nbsp; <br />&lt;/Component&gt;</span></p>
</td>
</tr>
</tbody>
</table>
<p>So we are ready to test this now.&nbsp; To test it, we take the Adventureworks, out of the box contemporary site and we modify the Polar Star sleeping bag to have an OnHandQuantity of 0.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/4118.image_42730579.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/4118.image_5F00_42730579.png"><img height="444" width="628" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/6746.image_thumb_15E9D593.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/6746.image_5F00_thumb_5F00_15E9D593.png" alt="image" border="0" title="image" class="wlDisabledImage" style="display: inline; border-width: 0px;" /></a></p>
<p>Now when go to the Sleeping Bags category, we should no longer see the Polar Star product returned:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/8231.image_6D6AF37E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/8231.image_5F00_6D6AF37E.png"><img height="388" width="626" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/08/96/metablogapi/1385.image_thumb_6B4DF4B5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-08-96-metablogapi/1385.image_5F00_thumb_5F00_6B4DF4B5.png" alt="image" border="0" title="image" class="wlDisabledImage" style="display: inline; border-width: 0px;" /></a></p>
<p>Now, if you go back and set the FilterOutOfStockSkus to False, the product should show back up again:</p>
<p>Now you can extend this concept to add configuration points for all of the settings available in the CategoryConfiguration object. </p>]]></content:encoded>
    </item>
    <item>
      <title>Filtering category products that are out of stock</title>
      <link>https://docs.microsoft.com/archive/blogs/khavas/filtering-category-products-that-are-out-of-stock</link>
      <pubDate>Mon, 28 Jun 2010 23:59:19 GMT</pubDate>
      <dc:creator><![CDATA[Kerry 'Darth Stewie' Havas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/khavas/2010/06/28/filtering-category-products-that-are-out-of-stock/</guid>
      <description><![CDATA[A question was asked how to configure Commerce Server 2009's default site to filter out products...]]></description>
      <content:encoded><![CDATA[<p><span style="color: #1f497d;"><span style="font-size: small;"><span style="font-family: Calibri;">A question was asked how to configure Commerce Server 2009's default site to filter out products where the OnHandQuantity=0.</span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-family: Calibri; font-size: small;">This filter setting is stored in the CategoryConfiguration object which Commerce Server passes into the core subsystems when retrieving a category.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-family: Calibri; font-size: small;"></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-size: small;"><span style="font-family: Calibri;">Although you cant change the out of the box component, you can change the CategoryConfiguration object that it uses.</span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-family: Calibri; font-size: small;"></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-size: small;"><span style="font-family: Calibri;">When Commerce Server retrieves a category it first checks the operationCache for a copy of the CategoryConfiguration and then creates a default one, if it is not found.<o:p></o:p></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-size: small;"><span style="font-family: Calibri;">If you want to override the default behavior, what you need to do is create an OperationSequenceComponent that executes right before the &ldquo;Category_Loader&rdquo; OSC in the QueryOperation_Category operation like this:<o:p></o:p></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-size: small;"><span style="font-family: Calibri;">This is your ChannelConfiguration.config:<o:p></o:p></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="font-family: 'Courier New'; color: #a31515; font-size: 10pt;">MessageHandler</span><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;"> </span><span style="font-family: 'Courier New'; color: red; font-size: 10pt;">name</span><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">=</span><span style="font-family: 'Courier New'; font-size: 10pt;">"<span style="color: blue;">CommerceQueryOperation_Category</span>"<span style="color: blue;"> </span><span style="color: red;">responseType</span><span style="color: blue;">=</span>"<span style="color: blue;">Microsoft.Commerce.Contracts.Messages.CommerceQueryOperationResponse, Microsoft.Commerce.Contracts, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35</span>"<span style="color: blue;">&gt;<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="font-family: 'Courier New'; color: #a31515; font-size: 10pt;">OperationSequence</span><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">&gt;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&mdash;This one is added </span><span style="font-family: Wingdings; color: blue; font-size: 10pt;">&agrave;</span><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="font-family: 'Courier New'; color: #a31515; font-size: 10pt;">Component</span><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;"> </span><span style="font-family: 'Courier New'; color: red; font-size: 10pt;">name</span><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">=</span><span style="font-family: 'Courier New'; font-size: 10pt;">"<span style="color: blue;">OnHandFilter</span>"<span style="color: blue;"> </span><span style="color: red;">type</span><span style="color: blue;">=</span>"<span style="color: blue;">Microsoft.Commerce.Samples.OnHandFilter, OnHandFilter, Version=1.0.0.0, Culture=neutral,PublicKeyToken=62d299e5f36470e7</span>"<span style="color: blue;">&gt;<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&mdash;This one is added </span><span style="font-family: Wingdings; color: blue; font-size: 10pt;">&agrave;</span><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="font-family: 'Courier New'; color: #a31515; font-size: 10pt;">Component</span><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;"> </span><span style="font-family: 'Courier New'; color: red; font-size: 10pt;">name</span><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">=</span><span style="font-family: 'Courier New'; font-size: 10pt;">"<span style="color: blue;">Category_Loader</span>"<span style="color: blue;"> </span><span style="color: red;">type</span><span style="color: blue;">=</span>"<span style="color: blue;">Microsoft.Commerce.Providers.Components.CategoryLoader, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35</span>"<span style="color: blue;"> /&gt;<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">&nbsp;&nbsp;&nbsp;</span><span style="color: #1f497d;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-size: small;"><span style="font-family: Calibri;">The component would look like this:<o:p></o:p></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">public</span><span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: blue;">class</span> <span style="color: #2b91af;">OnHandFilter</span>:<span style="color: #2b91af;">OperationSequenceComponent<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">public</span> <span style="color: blue;">override</span> <span style="color: blue;">void</span> ExecuteQuery(Microsoft.Commerce.Contracts.Messages.<span style="color: #2b91af;">CommerceQueryOperation</span> queryOperation, Microsoft.Commerce.Broker.<span style="color: #2b91af;">OperationCacheDictionary</span> operationCache, Microsoft.Commerce.Contracts.Messages.<span style="color: #2b91af;">CommerceQueryOperationResponse</span> response)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">var</span> categoryConfiguration = <span style="color: blue;">new</span> Microsoft.CommerceServer.Catalog.<span style="color: #2b91af;">CategoryConfiguration</span>();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; categoryConfiguration.InventoryOptions = <span style="color: blue;">new</span> Microsoft.CommerceServer.Inventory.<span style="color: #2b91af;">InventoryOptions</span>();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; categoryConfiguration.InventoryOptions.FilterOutOfStockSkus = <span style="color: blue;">true</span>;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; operationCache.Add(<span style="color: #a31515;">"CategoryContentSelectorKey_D6E2DE05-01E0-4a35-BF26-BCF95971B8D1"</span>, categoryConfiguration);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp; }</span><span style="color: #1f497d;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-size: small;"><span style="font-family: Calibri;">You can actually override any of the CategoryConfiguration properties this way.<o:p></o:p></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-size: small;"><span style="font-family: Calibri;">I tested the above on our out of the box site and it does what you are looking for.</span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-size: small;"><span style="font-family: Calibri;">You could further enhance this by making a single generic OperationSequenceComponent that exposes those configuration properties in the CategoryConfiguration object as configurable properties.</span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-family: Calibri; font-size: small;">I will explore that in&nbsp;my next blog entry.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><span style="font-family: Calibri; font-size: small;"></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: #1f497d;"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;">
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span></p>
</p>]]></content:encoded>
    </item>
    <item>
      <title>What's your computers CGF?</title>
      <link>https://docs.microsoft.com/archive/blogs/khavas/whats-your-computers-cgf</link>
      <pubDate>Mon, 16 Mar 2009 17:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Kerry 'Darth Stewie' Havas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/khavas/2009/03/16/whats-your-computers-cgf/</guid>
      <description><![CDATA[I've invented a new acronym (well Microsoft TLA, anyways...)
CGF - Computer Grog...]]></description>
      <content:encoded><![CDATA[<P>I've invented a new acronym (well Microsoft TLA, anyways...)</P>
<P><STRONG>CGF - Computer Grog Factor.</STRONG></P>
<P>&nbsp;This is the amount of time it takes from when you take your computer out of sleep mode until it becomes usable.&nbsp; </P>
<P>Right now this is top of mind because the CGF on my laptop has been getting a lot worse.&nbsp; It now takes 15 minutes after I come out of sleep mode for me to be able to use Outlook.&nbsp; Now, to be fair, I am running Server 2008 with SQL Server 2008, MOSS, IIS, etc running so there is a lot of stuff that has to spin back up.</P>
<P>Still, I would like to have access to my computer a lot faster.&nbsp; You constantly see people walking around with their laptops open.&nbsp; The reason they do this is because they dont want the expense of closing their laptop, having it go to sleep, and then reopening it again and waiting for their computer to awake and start listening for instructions.</P>
<P>What's your CGF?</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>PDC Session now available</title>
      <link>https://docs.microsoft.com/archive/blogs/khavas/pdc-session-now-available</link>
      <pubDate>Wed, 29 Oct 2008 01:45:00 GMT</pubDate>
      <dc:creator><![CDATA[Kerry 'Darth Stewie' Havas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/khavas/2008/10/29/pdc-session-now-available/</guid>
      <description><![CDATA[The PDC Session that we did on Commerce Server "Mojave" is now available online.
You can access it...]]></description>
      <content:encoded><![CDATA[<P>The PDC Session that we did on Commerce Server "Mojave" is now available online.</P>
<P>You can access it here: <A href="https://channel9.msdn.com/pdc2008/PC59/">https://channel9.msdn.com/pdc2008/PC59/</A></P>
<P>Tom does a great demo where he constructs a working E-Commerce site in about 5 minutes using the out of the box Commerce Server "Mojave" web parts.</P>
<P>It really shows how powerful this new release really is.</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Commerce Server "Mojave" October 2008 CTP is now available</title>
      <link>https://docs.microsoft.com/archive/blogs/khavas/commerce-server-mojave-october-2008-ctp-is-now-available</link>
      <pubDate>Mon, 20 Oct 2008 18:15:00 GMT</pubDate>
      <dc:creator><![CDATA[Kerry 'Darth Stewie' Havas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/khavas/2008/10/20/commerce-server-mojave-october-2008-ctp-is-now-available/</guid>
      <description><![CDATA[See our e-commerce blog post for more details:
https://blogs.msdn.com/commerce/default.aspx
&nbsp;]]></description>
      <content:encoded><![CDATA[<P>See our e-commerce blog post for more details:</P>
<P><A href="https://blogs.msdn.com/commerce/default.aspx">https://blogs.msdn.com/commerce/default.aspx</A></P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
  </channel>
</rss>