<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Cristiano WebLog : Commerce Server</title><link>http://blogs.msdn.com/crisag/archive/tags/Commerce+Server/default.aspx</link><description>Tags: Commerce Server</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Product Relationship Names: Easier for Business Users</title><link>http://blogs.msdn.com/crisag/archive/2008/05/06/product-relationship-names-easier-for-business-users.aspx</link><pubDate>Tue, 06 May 2008 19:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8463350</guid><dc:creator>crisag</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/crisag/comments/8463350.aspx</comments><wfw:commentRss>http://blogs.msdn.com/crisag/commentrss.aspx?PostID=8463350</wfw:commentRss><wfw:comment>http://blogs.msdn.com/crisag/rsscomments.aspx?PostID=8463350</wfw:comment><description>If you are following my posts you probably have noticed the one showing how to create bundles for Commerce Server 2007. Bundles are created using product relationships with a specific name. Some of my customers believe it is too complicated for business...(&lt;a href="http://blogs.msdn.com/crisag/archive/2008/05/06/product-relationship-names-easier-for-business-users.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8463350" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/crisag/archive/tags/Commerce+Server/default.aspx">Commerce Server</category></item><item><title>Unit testing and Commerce Server 2007 Contexts</title><link>http://blogs.msdn.com/crisag/archive/2008/03/13/unit-testing-and-commerce-server-2007-contexts.aspx</link><pubDate>Thu, 13 Mar 2008 15:40:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8180244</guid><dc:creator>crisag</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/crisag/comments/8180244.aspx</comments><wfw:commentRss>http://blogs.msdn.com/crisag/commentrss.aspx?PostID=8180244</wfw:commentRss><wfw:comment>http://blogs.msdn.com/crisag/rsscomments.aspx?PostID=8180244</wfw:comment><description>Hi there... after a long time, I'm back. Let's talk a little about unit testing and commerce server... I've been helping one of our parters with a CS2007 website development and they were facing problems with unit testing and commerce server contexts...(&lt;a href="http://blogs.msdn.com/crisag/archive/2008/03/13/unit-testing-and-commerce-server-2007-contexts.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8180244" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/crisag/archive/tags/Commerce+Server/default.aspx">Commerce Server</category></item><item><title>Commerce Server Catalog Manager and SOAP Limits</title><link>http://blogs.msdn.com/crisag/archive/2007/06/26/commerce-server-catalog-manager-and-soap-limits.aspx</link><pubDate>Tue, 26 Jun 2007 15:14:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3544675</guid><dc:creator>crisag</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/crisag/comments/3544675.aspx</comments><wfw:commentRss>http://blogs.msdn.com/crisag/commentrss.aspx?PostID=3544675</wfw:commentRss><wfw:comment>http://blogs.msdn.com/crisag/rsscomments.aspx?PostID=3544675</wfw:comment><description>If your customer has a lot of categories or products and when using the Catalog Manager to change the sequence you are getting the following error message (I got it today! :)): "There was an exception running the extensions specified in the config file....(&lt;a href="http://blogs.msdn.com/crisag/archive/2007/06/26/commerce-server-catalog-manager-and-soap-limits.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3544675" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/crisag/archive/tags/Commerce+Server/default.aspx">Commerce Server</category></item><item><title>Subscribing to the refresh cache event in Commerce Server 2007</title><link>http://blogs.msdn.com/crisag/archive/2006/11/30/subscribing-to-the-refresh-cache-event-in-commerce-server-2007.aspx</link><pubDate>Thu, 30 Nov 2006 16:21:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1178135</guid><dc:creator>crisag</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/crisag/comments/1178135.aspx</comments><wfw:commentRss>http://blogs.msdn.com/crisag/commentrss.aspx?PostID=1178135</wfw:commentRss><wfw:comment>http://blogs.msdn.com/crisag/rsscomments.aspx?PostID=1178135</wfw:comment><description>&lt;p&gt;Are you looking a way to extend the refresh cache webservice method to refresh ASP .Net cache on your Commerce Server 2007 website? If you are using ASP .Net output cache extensively and need to refresh the cache together with CS caches you can subscribe to the CacheRefresh event using the following code. &lt;p&gt;&lt;u&gt;Subscription&lt;/u&gt;&lt;/p&gt; &lt;p&gt;SiteCacheRefresh.CacheRefresh += new System.EventHandler&amp;lt;SiteCacheRefreshEventArgs&amp;gt;(SiteCacheRefresh_CacheRefresh);&lt;/p&gt; &lt;p&gt;&lt;u&gt;Event Handler&lt;/u&gt; &lt;p&gt;public void SiteCacheRefresh_CacheRefresh(object sender, SiteCacheRefreshEventArgs e) &lt;p&gt;{ &lt;p&gt;} &lt;p&gt;As a recommendation, use Global.Asax to subscribe to the event. ASP.NET compiles&amp;nbsp;global.asax&amp;nbsp;into a class derived from the HttpApplication class, and then uses the derived class to represent the application.  &lt;p&gt;If you are using a CS farm the event is triggered at all servers! &lt;p&gt;Regards! Cris. &lt;p&gt;&lt;font size="4"&gt;This posting is provided "AS IS" with no warranties, and confers no rights.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1178135" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/crisag/archive/tags/Commerce+Server/default.aspx">Commerce Server</category></item><item><title>Using SQL Server 2005 CLR SPs to create Commerce Server 2007 User Profile Password Hashes</title><link>http://blogs.msdn.com/crisag/archive/2006/09/19/Using-SQL-Server-2005-CLR-SPs-to-create-Commerce-Server-2007-User-Profile-Password-Hashes.aspx</link><pubDate>Tue, 19 Sep 2006 17:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:762094</guid><dc:creator>crisag</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/crisag/comments/762094.aspx</comments><wfw:commentRss>http://blogs.msdn.com/crisag/commentrss.aspx?PostID=762094</wfw:commentRss><wfw:comment>http://blogs.msdn.com/crisag/rsscomments.aspx?PostID=762094</wfw:comment><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Do you&amp;nbsp;need convert passwords stored originally using plain-text on databases to the one-way hash format used by the new version of the Commerce Server?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Don’t think that Commerce Server never used hashes to store passwords. It has always implemented this kind of functionality. Sometimes developers simple opt do not use hashes and decide store passwords using plain-text… :( &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;On the previous versions of CS the algorithm used was MD5 but one of the new features implemented by the last version was the use of the SHA256 hash algorithm to store passwords and other one-way pieces of information.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Would you like a SQL 2005 stored procedure to generate CS2007 compatible hashes using the plain-text stored sources?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;It can be used only passing the plain-text password as a parameter; the result of the procedure is a Commerce Server 2007 compatible hash already formatted using little-endian.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The procedure was developed using the new .Net compatible stored procedures implemented by the last version of Microsoft SQL Server. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The code:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;using System;&lt;BR&gt;using System.Data;&lt;BR&gt;using System.Data.SqlClient;&lt;BR&gt;using System.Data.SqlTypes;&lt;BR&gt;using Microsoft.SqlServer.Server;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;using System.Text;&lt;BR&gt;using System.Security.Cryptography;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;public partial class StoredProcedures&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Microsoft.SqlServer.Server.SqlProcedure]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void Hash( string inputPassword )&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlContext.Pipe.Send(ComputeHash(inputPassword));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlContext.Pipe.Send("Um erro ocorreu: " + e.Message);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static string ComputeHash( string inputPassword )&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] saltBytes;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Random random = new Random(); // gera um numero randomico para o tamanho da semente.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int saltSize = random.Next(4, 4);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; saltBytes = new byte[saltSize]; // aloca o vetor que armazenará o salt&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // inicializa o gerador de números randomicos&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rng.GetNonZeroBytes(saltBytes); // preenche a semente&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Text.UnicodeEncoding encode = new System.Text.UnicodeEncoding();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // encoding format is little endian&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] dataBuffer = new byte[encode.GetByteCount(inputPassword) + 4]; // get number of bytes and create buffer&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // copia os bytes to texto para o vetor&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; saltBytes.CopyTo(dataBuffer, 0);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] inputPasswordBytes = encode.GetBytes(inputPassword);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // copia os bytes da senha após os 4 destinados a semente&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inputPasswordBytes.CopyTo(dataBuffer, 4);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HashAlgorithm SHA256 = new SHA256Managed();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] hash = SHA256.ComputeHash(dataBuffer);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Text.StringBuilder sb = new System.Text.StringBuilder();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (byte outputByte in saltBytes) sb.Append(outputByte.ToString("x2").ToUpper());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (byte outputByte in hash) sb.Append(outputByte.ToString("x2").ToUpper());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return sb.ToString();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;} &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;You can use the Deploy command of the Microsoft Visual Studio 2005 to install the procedure on your SQL Server 2005 or you can use the following procedure to have it working on your environment:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;1.&amp;nbsp;Make sure that CLR Integration is enabled on the SQL server.&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;EXEC sp_configure 'clr enabled', 1&lt;BR&gt;RECONFIGURE&lt;BR&gt;GO&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;2.&amp;nbsp;Compile the code to generate the HashProcedure.dll file.&lt;BR&gt;3.&amp;nbsp;Execute the following T-SQL code against the SQL Server to add the CLR stored procedure:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;CREATE ASSEMBLY HashProcedure &lt;BR&gt;FROM 'C:\Work\Projetos\HashProcedure\bin\Debug\HashProcedure.dll'&lt;BR&gt;WITH PERMISSION_SET = SAFE &lt;BR&gt;GO&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;4.&amp;nbsp;Execute the following T-SQL code against the SQL Server do create a SQL Server 2005 stored procedure that Consumes the CLR code:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;CREATE PROC Hash&lt;BR&gt;@inputPassword NVARCHAR(4000)&lt;BR&gt;AS&lt;BR&gt;EXTERNAL NAME HashProcedure.StoredProcedures.Hash&lt;BR&gt;GO&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;[]’s.&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN deactivatedstyle="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: 'MS Mincho'; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Verdana size=3&gt;This posting is provided "AS IS" with no warranties, and confers no rights.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=762094" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/crisag/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://blogs.msdn.com/crisag/archive/tags/Commerce+Server/default.aspx">Commerce Server</category></item><item><title>Playing with Direct Mailer!</title><link>http://blogs.msdn.com/crisag/archive/2006/09/14/Playing-with-Direct-Mailer_2100_.aspx</link><pubDate>Thu, 14 Sep 2006 23:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:754698</guid><dc:creator>crisag</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/crisag/comments/754698.aspx</comments><wfw:commentRss>http://blogs.msdn.com/crisag/commentrss.aspx?PostID=754698</wfw:commentRss><wfw:comment>http://blogs.msdn.com/crisag/rsscomments.aspx?PostID=754698</wfw:comment><description>&lt;p&gt;&lt;font face="Verdana" size="2"&gt;Hey! I’m back with more Commerce Server 2007. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;Now the subject is Direct Mailing. Commerce Server 2007 is great on direct mailing. This feature allows the use of a ASPX template to generate e-mail marketing campaigns with same personalization resources that we have with normal commerce server websites.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;Before let’s check some of the direct mailing concepts:&lt;/font&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Direct mail is a marketing campaign item (as an advertisement or discount) that you can target toward specific users by using mailing lists. &lt;/font&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;You can create new direct mail items, personalize messages, add attachments to direct mail messages, and modify properties of direct mails. Also you can choose the e-mail format (MHTML, HTML, TEXT only, etc)&lt;/font&gt;  &lt;li&gt;&lt;font face="Verdana" size="2"&gt;For sure, you can also test direct mails before sending them to the real website users.&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;The necessary steps to create e-mail marketing campaigns are pretty straightforward:&lt;/font&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Create an ASP .Net template page containing the personalized discount. This is a normal ASP .Net page with custom code based on the Commerce Server 2007 server API used to generate the HTML content that will be sent on the e-mails.&lt;/font&gt;  &lt;li&gt;&lt;font face="Verdana" size="2"&gt;The second step is generating a mailing list (for example, a list of top users, a list of female users living in São Paulo, etc). &lt;/font&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Now you can create a direct mail item targeting the mailing list generated. &lt;/font&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Enter the name of the template page containing personalized content. &lt;/font&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;If needed, you can also add an attachment to the direct mail campaign. &lt;/font&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Schedule the start times and end times for the direct mail item, and specify how often the direct mail job is to be sent. &lt;/font&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Test the direct mail you sent against a test list, and view your personalization pages.&lt;/font&gt;  &lt;li&gt;&lt;font face="Verdana" size="2"&gt;If the e-mail was sent correctly to the test list, approve it and let the server work running your marketing campaign. &lt;/font&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Tell your customer to start counting dollars. :)&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;Now I know you are thinking something similar to: “What did he say with straightforward?” “I don’t know how to generate the template page and I don’t have a minimal idea on how to setup the direct mailing environment”. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;Ok… sorry…&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;You should start with a sample ASP .Net template for direct mail personalization available on the /Microsoft Commerce Server 2007/SDK/Marketing folder of your Commerce Server installation.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;&amp;lt;%@ Page language="c#" Inherits="DirectMailPage.DirectMailPage" CodeFile="DirectMailPage.aspx.cs" %&amp;gt;&lt;br&gt;&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" &amp;gt; &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;&amp;lt;html&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;body&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; Dear &amp;lt;%=GetName()%&amp;gt;,&amp;lt;br /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; Thank you for signing up at our site on &amp;lt;%=GetRegisteredDate()%&amp;gt; .&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; As per your request, we will use the email address &lt;/font&gt;&lt;a href="mailto:&amp;lt;%=GetEmailAddress()%"&gt;&lt;font face="Courier New" size="2"&gt;mailto:&amp;lt;%=GetEmailAddress()%&lt;/font&gt;&lt;/a&gt;&lt;font face="Courier New" size="2"&gt;&amp;gt; for future communications.&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; We look forward to your business.&lt;br&gt;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;br&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;As you can see, that page is very simple and the personalization code is implemented with two code behind (or beside? :)) functions. The GetName function returns the name of the user and the GetEmailAddress gets the smtp address filled on the user profile.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;For each user on the generated list of the direct mailing campaign item, the Commerce Server 2007 direct mail engine will authenticate and run the template page in behalf of the user. The resulted HTML will be included on the e-mail body and sent to the user using his e-mail address.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;The sample page is a very simple page. As the Commerce Server 2007 authenticates the user and run the ASP .Net template using his context, any feature of the commerce website can be used on the direct mail campaigns. This includes advertisements, discounts and even more sophisticated implementations.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;But how commerce server direct mailer module authenticates the user? The direct mailing system generates a commerce server AuthTicket as a specific user. So, the value of UserId is encrypted and set as the AuthTicket value, the ticker is added as a cookie to the HTTP Request that direct mailer issues to the URL of the template page.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;Therefore, the Commerce Server 2007 website that hosts the template page should have the profiles and CommerceDirectMailerAuthenticationModule sections of the web.config configured correctly in order to allow the decryption of the AuthTicket.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;Below is a working sample of the web.config sections:&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;&amp;lt;profiles&amp;gt;&lt;br&gt;&amp;nbsp;&amp;lt;userProfile profileDefinition="UserObject" userIdProperty="GeneralInfo.user_id" organizationIdProperty="AccountInfo.org_id" catalogSetIdProperty="AccountInfo.user_catalog_set" userIdSource="ASP.NET" userIdKey="GeneralInfo.email_address" userIdTarget="GeneralInfo.user_id"/&amp;gt;&lt;br&gt;&amp;lt;/profiles&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;&amp;lt;httpModules&amp;gt;&lt;br&gt;...&lt;br&gt;&amp;lt;add name="CommerceDirectMailerAuthenticationModule" type="Microsoft.CommerceServer.Runtime.CommerceDirectMailerAuthenticationModule, Microsoft.CommerceServer.Runtime, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&amp;gt;&lt;br&gt;...&lt;br&gt;&amp;lt;/httpModules&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;Finally a small tip. When I first ran a direct mailing campaign on my test system, I used a static test list generated manually (including the user e-mail addresses on the Add User to List windows form). &lt;/font&gt;&lt;/p&gt; &lt;div style="padding-left: 5px"&gt;&lt;img title="http://blogs.msdn.com/photos/crisag/images/754674/original.aspx" height="289" src="http://blogs.msdn.com/photos/crisag/images/754674/original.aspx" width="491"&gt;&lt;/div&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;The manual generation of the list creates a file like the following one:&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;user1@test.local&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;,,,,,&lt;br&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;user2@test.local&lt;/strong&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;,,,,,&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;When you run the test execution of the direct mailing campaign, the Commerce Server is unable to create the correct AuthTicket because the list doesn’t have the user-id inside it. When you generate a dynamic list and use it on the test, the ticket is correctly created and the test works.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;After checking the text file (exported from a dynamic generated list) you can see that the used ID is correctly filled.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&lt;font size="2"&gt;user1@test.local,{7059a3be-b7c5-403a-b8c0-7e66cb43e76d&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size="2"&gt;},,,,&lt;br&gt;user2@test.local,{3a48fb87-2cfe-4567-9739-df521398021f},,,,&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;So, if you want to use static lists, remember to fill the userID and import the file before run the campaign. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;[]'s.&lt;/font&gt;&lt;/p&gt;&lt;font face="Verdana"&gt; &lt;div&gt;&lt;span deactivatedstyle="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: 'MS Mincho'; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA"&gt;&lt;font face="Verdana" size="3"&gt;This posting is provided "AS IS" with no warranties, and confers no rights.&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=754698" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/crisag/archive/tags/Commerce+Server/default.aspx">Commerce Server</category></item><item><title>An Approach to Implement Combos with Commerce Server 2007</title><link>http://blogs.msdn.com/crisag/archive/2006/09/13/An-Approach-to-Implement-Combos-with-Commerce-Server-2007.aspx</link><pubDate>Wed, 13 Sep 2006 20:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:752398</guid><dc:creator>crisag</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/crisag/comments/752398.aspx</comments><wfw:commentRss>http://blogs.msdn.com/crisag/commentrss.aspx?PostID=752398</wfw:commentRss><wfw:comment>http://blogs.msdn.com/crisag/rsscomments.aspx?PostID=752398</wfw:comment><description>&lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;When I was introduced to Commerce Server back in 2001 I initially thought that the product was a little box with a complete online store inside it. After a couple of days playing with the product and reading the documentation I figured out that I was wrong, the product was much more than a simple ready online store. &lt;/font&gt;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;It was a complete framework and a set of tools to enable websites to the e-commerce world!&lt;/font&gt;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;Since then, the product evolved a lot. Today we have the brand new Commerce Server 2007 version with a lot of improvements and also some “baby born” features.&lt;/font&gt;&lt;/div&gt;&lt;font face="Verdana" size="2"&gt; &lt;div align="left"&gt;&lt;br&gt;Let’s deep on a subject and get out of this blah blah blah… let’s talk about discounts. The discount engine implemented with Commerce Server 2007 allows the use of catalog selection and profile based rules to apply discounts on a product set and using the context of the user navigation.&lt;/div&gt; &lt;div align="left"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;That’s great. Without much effort we can have a store selling products and applying discounts based on the profile of the customer navigating on the website. One of the great things about our customers is that are always claiming for new types of discount campaigns and our development groups simple cannot implement all possible ways to apply a discount (they need to keep their scope manageable) :).&lt;/font&gt;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;I’m my current project I’m helping one of our partners on a store development with Commerce Server 2007 and guess what? We have a very effusive and creative customer!&amp;nbsp;:) It’s only a joke, I guess I understand the customer need, they claim for differentiation to overcome their competitors and we are proud to help them using our platform and creative technical ideas.&lt;/font&gt;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;Ok Cris. I’ve got your challenge so what’s the problem?&lt;/font&gt;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;Commerce Server 2007 offers the following discounts types by default:&lt;/font&gt;&lt;/div&gt; &lt;div align="left"&gt;&amp;nbsp;&lt;/div&gt; &lt;ul style="margin-top: 0px; margin-bottom: 0px"&gt; &lt;li&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;Sample Discount: Buy a product at a reduced price. (Example: Buy two backpacks and get 25% off the price of each)&lt;/font&gt;&lt;/div&gt; &lt;li&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;Minimum Purchase Discount: Buy a minimum quantity of a product, get a reduced price. (Example: Buy at least three CDs and get $1 off the price of each)&lt;/font&gt;&lt;/div&gt; &lt;li&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;Buy N, Get 1 More Free: Buy a minimum number of an item; get one more of the same item free. (Example:&amp;nbsp; Buy 5 ties, get the 6th one free)&lt;/font&gt;&lt;/div&gt; &lt;li&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;Paired Discount: Buy one product and get a price reduction on another product. (Example: Buy a bicycle, get a helmet at 15% off)&lt;/font&gt;&lt;/div&gt; &lt;li&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;Paired Set Discount: Buy a specified quantity of a product, get a price reduction on another product. (Example: Buy 6 bottles of wine, get a wine rack at $10 off)&lt;/font&gt;&lt;/div&gt; &lt;li&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;Order Discount: Buy a specified total amount; get a price reduction on the order total or on the shipping cost. (Example:&amp;nbsp; Buy at least $500 worth of services, and get 20% off)&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;As I said, customers are very creative and real world stores need a kind of “bundles discount type”. What’s a bundle discount type? These kinds of discounts apply when the store wants that you buy the products X and Y and get the Z product as a free gift.&lt;/font&gt;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;For example, the store wants to have the following sales campaign: Buy a XBOX 360 console together with an additional controller and get the Halo 3 for free.&lt;/font&gt;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;How to implement this kind of discounts using Commerce Server 2007?&lt;/font&gt;&lt;/div&gt; &lt;div align="left"&gt;&amp;nbsp;&lt;/div&gt; &lt;ul style="margin-top: 0px; margin-bottom: 0px" type="disc"&gt; &lt;li&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;Create an additional product definition called BUNDLE and associate relevant properties to it. You can also create additional properties if needed.&lt;/font&gt;&lt;/div&gt; &lt;li&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;Create a new product based on the definition created (with the bundle description, price, and other properties values). Example: Xbox 360 Super Combo.&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;div align="left"&gt;&lt;span style="font-size: 10pt"&gt;&lt;/span&gt;&lt;span style="font-size: 12pt"&gt;&lt;font face="Times New Roman"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt; &lt;div style="padding-left: 50px"&gt;&lt;img title="http://blogs.msdn.com/photos/crisag/images/752161/original.aspx" height="346" src="http://blogs.msdn.com/photos/crisag/images/752161/original.aspx" width="479"&gt;&lt;/div&gt; &lt;div style="padding-left: 50px" align="left"&gt;&lt;span style="font-size: 12pt"&gt;&lt;/span&gt;&lt;span style="font-size: 10pt"&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt; &lt;ul style="margin-top: 0px; margin-bottom: 0px" type="disc"&gt; &lt;li&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span style="font-size: 10pt"&gt;Create two relationships called CONSTITUENT pointing to the Xbox 360 console and to the Xbox controller. With this procedure you are relating the dummy product (which is the bundle) to its constituents (use to be real products).&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span style="font-size: 10pt"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div style="padding-left: 50px"&gt;&lt;img title="http://blogs.msdn.com/photos/crisag/images/752160/original.aspx" height="350" src="http://blogs.msdn.com/photos/crisag/images/752160/original.aspx" width="483"&gt;&lt;/div&gt; &lt;div style="padding-left: 50px" align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 12pt"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Verdana" size="2"&gt;&lt;span style="font-size: 10pt"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;ul style="margin-top: 0px; margin-bottom: 0px" type="disc"&gt; &lt;li&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;Create another relationship called AWARD pointing to the Halo 3 game. This is the free prize relation.&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div style="padding-left: 50px"&gt;&lt;img title="http://blogs.msdn.com/photos/crisag/images/752162/original.aspx" height="350" src="http://blogs.msdn.com/photos/crisag/images/752162/original.aspx" width="483"&gt;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;ul style="margin-top: 0px; margin-bottom: 0px" type="disc"&gt; &lt;li&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;Create a paired discount saying that if the customer buys the dummy product (the combo) she will get 100% discount on the Halo 3 game.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div style="padding-left: 50px"&gt;&lt;img title="http://blogs.msdn.com/photos/crisag/images/752163/original.aspx" style="width: 485px; height: 322px" src="http://blogs.msdn.com/photos/crisag/images/752163/original.aspx"&gt;&lt;/div&gt; &lt;div align="left"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;ul style="margin-top: 0px; margin-bottom: 0px" type="disc"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt; &lt;li class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 0cm; margin-bottom: 0pt" align="justify"&gt; &lt;div align="left"&gt;&lt;span style="font-size: 10pt"&gt;Change the “Add Basket” code to include the constituent products when the combo on the basket is included. So when the buyer includes the Xbox 360 super combo (dummy product) on her basket, she will be including the console and the controller (the real constituents).&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;blockquote dir="ltr" style="margin-right: 0px"&gt; &lt;p align="left"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9pt"&gt;&lt;font face="Courier New"&gt;foreach (CatalogRelationshipsDataSet.CatalogRelationship relatedProduct in relatedProducts.CatalogRelationships)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;div class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 36pt; margin-bottom: 0pt" align="left"&gt;&lt;span style="font-size: 9pt"&gt;&lt;font face="Courier New"&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 36pt; margin-bottom: 0pt; text-indent: 36pt" align="left"&gt;&lt;span style="font-size: 9pt"&gt;&lt;font face="Courier New"&gt;if (relatedProduct.RelationshipName == "CONSTITUENT")&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 36pt; margin-bottom: 0pt; text-indent: 36pt" align="left"&gt;&lt;span style="font-size: 9pt"&gt;&lt;font face="Courier New"&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 72pt; margin-bottom: 0pt; text-indent: 36pt" align="left"&gt;&lt;span style="font-size: 9pt"&gt;&lt;font face="Courier New"&gt;LineItem lineItemBrinde =&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 72pt; margin-bottom: 0pt; text-indent: 36pt" align="left"&gt;&lt;span style="font-size: 9pt"&gt;&lt;font face="Courier New"&gt;new LineItem(catalogId, relatedProduct.TargetProductId, null, 1);&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 72pt; margin-bottom: 0pt; text-indent: 36pt" align="left"&gt;&lt;span style="font-size: 9pt"&gt;&lt;font face="Courier New"&gt;orderForm.LineItems.Add(lineItemBrinde, false); &lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 36pt; margin-bottom: 0pt; text-indent: 36pt" align="left"&gt;&lt;span style="font-size: 9pt"&gt;&lt;font face="Courier New"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 36pt; margin-bottom: 0pt" align="left"&gt;&lt;span style="font-size: 9pt"&gt;&lt;font face="Courier New"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 36pt; margin-bottom: 0pt" align="left"&gt;&lt;span style="font-size: 9pt"&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;/span&gt; &lt;ul style="margin-top: 0px; margin-bottom: 0px"&gt; &lt;li class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 0cm; margin-bottom: 0pt" align="justify"&gt; &lt;div align="left"&gt;&lt;span style="font-size: 10pt"&gt;&lt;font face="Verdana"&gt;&lt;span style="font-size: 10pt"&gt;Change the Add Basket code to always check if the product has the AWARD relationship. When including any product with this relationship also include the product pointed by the relation&lt;/span&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;li class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 0cm; margin-bottom: 0pt" align="justify"&gt; &lt;div align="left"&gt;&lt;span style="font-size: 10pt"&gt;&lt;font face="Verdana"&gt;&lt;span style="font-size: 10pt"&gt;When the basket pipeline runs, the paired discount is applied giving 100% discount on the Halo 3 game&lt;/span&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;div class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 0cm; margin-bottom: 0pt" align="left"&gt;&lt;span style="font-size: 10pt"&gt;&lt;font face="Verdana"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="MsoNormal" style="padding-right: 0cm; margin-top: 0cm; padding-left: 0cm; margin-bottom: 0pt" align="left"&gt;&lt;span style="font-size: 10pt"&gt;&lt;/span&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 10pt"&gt;&lt;font face="Verdana"&gt;With this strategy, the Commerce Server 2007 inventory system will get the bundle constituents as individual line items. Therefore, during the add basket phase the inventory positions will be checked against the stock numbers and during the checkout process the individual constituents will be updated with new inventory values.&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt"&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt; &lt;div id="CSBloggerSig"&gt; &lt;div&gt;&lt;span deactivatedstyle="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: 'MS Mincho'; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA"&gt;&lt;font face="Verdana"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;&lt;span deactivatedstyle="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: 'MS Mincho'; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA"&gt;&lt;font face="Verdana" size="3"&gt;&lt;strong&gt;This posting is provided "AS IS" with no warranties, and confers no rights.&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=752398" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/crisag/archive/tags/Commerce+Server/default.aspx">Commerce Server</category></item></channel></rss>