Welcome to MSDN Blogs Sign in | Join | Help

Moving my blog!!!

 

Just wanted to give you guys an update. I will be moving my blog to http://www.commerceservertraining.com. Please make a note of it. I will not be blogging here or answer comments and questions posted here.

 

Why the move?

I created this blog when I was working for Microsoft. Now I work for myself providing training and consulting for Commerce Server 200x. I would like to thank Microsoft for allowing me to continue to use this blog after leaving, but I need my own space to express the good, the bad and the ugly of Commerce Server :).

 

Please continue to monitor http://www.commerceservertraining.com for a new site that will host my blog.

 

I will not be moving\migrating any of this data. The new blog will be just that new and fresh.

 

Thank you everyone for your feedback and comments. If you have additional comments please drop me a line at max.akbar@commerceservertraining.com.

Posted by Max Akbar | 1 Comments

Another Commerce Server Training Event

Last October I hosted a Training Event here in LA and was very successful. People from all over the world came and were very happy with the results. Due to popular demand I am hosting another event. This will also be held in LA.

Training Event

Training event is scheduled for Mon 11/17/2008 and ends Fri 11/21/2008. This is 5 day deep dive into Commerce Server starting daily 9-5 PM. On Friday we may end early. Cost of the event is $2495.00 per student. There is how ever a group discount. To register please follow this link Commerce Server Training site.

Commerce Server Los Angeles Training Experience

What you will learn systems Catalog, Orders, Profile, Marketing and Data Warehouse. We will also do some short segments on the Partner SDK, CSS and BizTalk Adapters.

You'll learn Commerce Server from Max Akbar <-- me :). I was a Program Manger for Commerce Server 2007 and help develop many of the product's features before working with the Commerce Server Product Group I was with Microsoft Consulting Services (MCS) and worked with various enterprises implementing Commerce Server solutions. This training session will be hands on lots of demos and coding with labs.

What you will take back with you are several tools created by yours truly for Commerce Server. Two video tutorials Catalog and Orders featured at Commerce Server Training site.

Here is a rough outline of day to day activity.

Day one

In day one you will learn Installation, Configuration, Deployment a Commerce Site and Secure your deployment.

  • Commerce Server Overview
  • Hardware Requirements
  • Software requirements
  • Commerce Editions
  • Base Deployment
  • Enterprise Deployment
  • Installation
  • Configuration
  • Deployment
  • Securing your Deployment
  • Administration of Commerce Server

Day two

Catalog System

  • Catalog Overview
  • Catalog Architecture
  • Catalog Management Applications
  • Catalog APIs
  • Catalog Design
  • Catalog Database Overview
  • Catalog Resource
  • Catalog Security
  • Pipelines and Catalogs
  • Catalog Web Service
  • Catalog Adapters
  • Staging Catalogs
  • Catalog and the Data Warehouse System
  • Advanced Catalog topics
  • Best Practices with the Catalog System
  • Trouble Shooting The Catalog System

Inventory System

  • Inventory Catalog
  • Inventory Architecture
  • Inventory Management Applications
  • Inventory API
  • Inventory Resource

Day Three

Order System

  • Orders Overview
  • Orders Overview Part(II)
  • Orders Architecture
  • Orders Management Applications
  • Orders Runtime API
  • Orders Management API
  • Order Processing Pipeline
  • Orders Design
  • Orders Databases Overview
  • Orders Config Databases Overview
  • Orders Runtime Web.config
  • Orders Web Service
  • Orders Mapped Storage
  • Orders Resource
  • Orders Security
  • Orders Adapter
  • Staging Orders
  • Orders and the Data Warehouse System
  • Advanced Orders topics
  • Best Practices with the Orders System
  • Trouble Shooting The Orders System

Day four

Marketing

  • Advertisements
  • Discounts
  • Coupons
  • Expressions
  • Lists
  • Direct Mailer
  • Marketing System Architecture
  • Marketing System API

Profile System

  • What is Profile Management
  • Profile Features
  • Profile Architecture
  • Profile API
  • Profile Encryption

Day five

Data Warehouse, Partner SDK, BizTalk Adapters and Commerce Server Staging.

Posted by Max Akbar | 1 Comments
Filed under:

Transform a .NET OrderForm to COM OrderForm

Have you ever wanted to get the Commerce Server managed OrderForm transformed into the Dictionary key pair values? If the answer is yes then keep reading.

There are some scenarios where you just want the OrderForm in Dictionary format so you can call the pipeline components directly or execute the managed pipelines. Please be aware that you can execute the pipeline components outside ASP.NET. For more info please read the following link.

If you have read my pipeline posts then you know that when executing a pipeline, Commerce Server under the covers will transform your managed OrderForm(s) into Commerce Server Dictionary object(s). For whatever reason, the Commerce Server Product Group did not make the PipelineAdapter public. The PipelineAdapter object is responsible for transformation of the OrderForm. So how can you do this if the class is not public? Reflection.

The following code will show you how to transform the OrderForm. You will need to reference the Microsoft.CommerceServer.Runtime.dll and Microsoft.CommerceServer.Interop.dll. You will also need to make sure that you have an app.config with the order node.

// Get an order context to work with
OrderContext context = OrderContext.Create("CSharpSite");

// Get a user basket
Basket cart = context.GetBasket(new Guid(userId));

// Make sure that we have a OrderForm
if (cart.OrderForms.Count == 0)
{
    cart.OrderForms.Add(new OrderForm());
}

// Do magic with reflection
Type orderContext = context.GetType();

// PipelineAdapterMap is a property of the order context
PropertyInfo property = orderContext.GetProperty("PipelineAdapterMap", BindingFlags.Instance | BindingFlags.NonPublic);

// Get the value of the PipelineAdapterMap property
object obj = property.GetValue(context, null);
Type pipelineAdapter = obj.GetType();           
MethodInfo[] methods = pipelineAdapter.GetMethods(BindingFlags.Instance | BindingFlags.NonPublic);

object[] orderform = new object[1];
orderform[0] = cart.OrderForms[0];

 

// Method 15 has is what we want and pass it our managed OrderForm
object dict = methods[16].Invoke(obj, orderform);

 

// Do something with the Dictionary OrderForm
Dictionary dictionary = (Dictionary)dict;

Posted by Max Akbar | 1 Comments

Commerce Server Cache Refresh

I was teaching a Commerce Server Training this past week. One of the students asked that he has issues with his business users management applications. When the business users select to refresh the site cache an error is generated. I did some research and found that there is a KB article about how to fix such issues. The KB article can be found here.

When I first read the KB article I thought that there must be an error, because it asks to setup the orders web service. So during my class I tried to replicate his issue and sure enough I was able to do it. I looked at my Virtual PC systems and everything worked.

How come this worked on my Virtual PC systems? Well I had my systems setup with the administrator account as the application pool identity. In the orders web service and the front end servers by default the administrator account is configured in the authorization node of the web.config.

How does the Cache Refresh Work?

When the users selects to refresh the cache the call is made to the orders web service SiteCacheRefresh.axd (tested with Commerce Server Service Pack 2) then to the front end web server farm. I never really looked at the error message, if you pay attention you will notice that the error message clearly state that a calls was made to the orders web service's SiteCacheRefresh.axd and access was denied.

How to Fix Cache Refresh?

In a production environment each web service has it's own application pool and they in turn have their own identity, if you followed the 120 page setup documentation :). You need to write down the Marketing, Catalog and profile web service's application pool identity account and add it to the orders web service web.config.

<location path="SiteCacheRefresh.axd">
    <system.web>
        <authorization>
            <allow roles="BUILTIN\Administrators"/>
            <allow users="Domain\CatalogAppPoolIdentity"/>
            <allow users="Domain\MarketingAppPoolIdentity"/>
            <allow users="Domain\ProfileAppPoolIdentity"/>

            <deny users="*"/>
        </authorization>
    </system.web>
</location>

Next you will need to add the orders web service account to the front end web server farms as noted in the KB article.

 

Additional resource you should read "Understanding Caching in Commerce Server".

Posted by Max Akbar | 1 Comments

Updated version uploaded: Commerce Server 2007 Starter Site Release 2

Looks like there is an update to the Starter Site Release 2 you can still download it from MSDownload.

How to tell you have the right download?

I looked at the original release 2 and the file version for CommerceComponents.dll is 6.0.3863.0 and the update release 2 is 6.0.4109.0.

How to tell which files were updated?

Unfortunately, as far as I can tell there is no documentation on the bugs and which files were modified. You need to do a file diff on the code to identify changes :(.

Posted by Max Akbar | 4 Comments
Filed under:

The Commerce Server 2007 Install and Readme documentation has been updated

Now that we have the Commerce Server SP2 the following documentation has also been updated.

  • Commerce Server 2007 Readme
  • Commerce Server 2007 Install Guide
  • Commerce Server 2007 Mom Pack
  • Commerce Server 2007 SP2-readme-web
  • Commerce Server 2007 Quick Install Guide

The documentation was updated to include Windows 2003, 2008, XP and Vista as well as the .NET Framework 3.0 and 3.5 with Visual Studio 2008.

 

You can download you copy at Download details: Commerce Server 2007 Install and Readme documentation, happy readings.

 

I would highly recommend that you spend a few hours and read these documents (the Install Guide has even pictures :)).

Announcing Commerce Server 2007 SP2

The long awaited SP2 is now available on Microsoft's web site.

This service pack is for the English version of Commerce Server 2007 this include the binaries and the  business user application. This does not affect your ability to develop a multilingual Commerce Server Web site. Installing SP2 on non-English versions of Commerce Server 2007 is not supported.

 

Note: No new features are introduced in SP2.

 

Announcing Commerce Server 2007 SP2! - MSDN Forums

Posted by Max Akbar | 1 Comments

Commerce Server Training Event

A few weeks a go I mentioned that I would be hosting a Commerce Server Event here in beautiful Los Angeles. Well I am getting closer and closer to finalizing everything and if all goes well I will be doing anther event in London but that date is not yet set. So let's talk about this event :).

Currently the Training event is scheduled for August 4th through 8th. The Class will start 9:00 and end at 5:00 PM. The price for the 5 day training is set for $2495.00. I will discount if you book as a group. Payment must be made two weeks prior to the event. To register please send me an email with your contact information and I will confirm your seat. I will post more info on my site at Commerce Server Training site for location and hotel.

Commerce Server Los Angeles Training Experience

So what should you expect. 5 days of Commerce Server on the following systems Catalog, Orders, Profile, Marketing and Data Warehouse. We will also do some short segments on the Partner SDK, CSS and BizTalk Adapters.

You'll learn Commerce Server from Max Akbar <-- me :). I was a Program Manger for Commerce Server 2007 and help develop many of the product's features before working with the Commerce Server Product Group I was with Microsoft Consulting Services (MCS) and worked with various enterprises implementing Commerce Server solutions. This training session will be hands on lots of demos and coding with labs.

What you will take back with you are several tools created by yours truly for Commerce Server. Two video tutorials Catalog and Orders featured at Commerce Server Training site (by then I may have the third video released installation, configuration, deployment and securing Commerce Server).

Here is a rough outline of day to day activity.

Day one

In day one you will learn Installation, Configuration, Deployment a Commerce Site and Secure your deployment.

  • Commerce Server Overview
  • Hardware Requirements
  • Software requirements
  • Commerce Editions
  • Base Deployment
  • Enterprise Deployment
  • Installation
  • Configuration
  • Deployment
  • Securing your Deployment
  • Administration of Commerce Server

Day two

Catalog System

  • Catalog Overview
  • Catalog Architecture
  • Catalog Management Applications
  • Catalog APIs
  • Catalog Design
  • Catalog Database Overview
  • Catalog Resource
  • Catalog Security
  • Pipelines and Catalogs
  • Catalog Web Service
  • Catalog Adapters
  • Staging Catalogs
  • Catalog and the Data Warehouse System
  • Advanced Catalog topics
  • Best Practices with the Catalog System
  • Trouble Shooting The Catalog System

Inventory System

  • Inventory Catalog
  • Inventory Architecture
  • Inventory Management Applications
  • Inventory API
  • Inventory Resource

Day Three

Order System

  • Orders Overview
  • Orders Overview Part(II)
  • Orders Architecture
  • Orders Management Applications
  • Orders Runtime API
  • Orders Management API
  • Order Processing Pipeline
  • Orders Design
  • Orders Databases Overview
  • Orders Config Databases Overview
  • Orders Runtime Web.config
  • Orders Web Service
  • Orders Mapped Storage
  • Orders Resource
  • Orders Security
  • Orders Adapter
  • Staging Orders
  • Orders and the Data Warehouse System
  • Advanced Orders topics
  • Best Practices with the Orders System
  • Trouble Shooting The Orders System

Day four

Marketing

  • Advertisements
  • Discounts
  • Coupons
  • Expressions
  • Lists
  • Direct Mailer
  • Marketing System Architecture
  • Marketing System API

Profile System

  • What is Profile Management
  • Profile Features
  • Profile Architecture
  • Profile API
  • Profile Encryption

Day five

Data Warehouse, Partner SDK, BizTalk Adapters and Commerce Server Staging

Posted by Max Akbar | 1 Comments
Filed under:

Reach out and touch Messagemanager

If you are creating your own pipeline components and your site is international and you need more than the four languages that is out of the box German, French, Japanese and US English for Commerce Server then you need to create your own resource for other languages. How to create a new resource is what this post is all about.

What is Messagemanager?

Messagemanager is an object that handling the localization of messages inside your pipeline competents. When you unpack the CSharpSite you will get CommerceMessageManager.dll and four folders representing a language mentioned above.

What are these messages that Messagemanager use? The table below has the messages that Commerce Server uses internally. If you introducing a new language then you need to localize this table.

Message Key Message Value
pur_discount_changed One or more discounts have changed.
pur_badhandling Unable to complete order: cannot compute handling cost.
pur_badsku Please note that one or more items were removed from your order because the product is no longer sold.
pur_badtax Unable to complete order: cannot compute tax.
pur_badplacedprice Please note that prices of products in your order have been updated.
pur_badcc The credit-card number you provided is not valid. Please verify your payment information or use a different card.
pur_badshipping Unable to complete order: cannot compute shipping cost.
unknown_shipping_method The selected shipping method is not currently available.  Please choose another shipping method.
pur_badpayment There was a problem authorizing your credit. Please verify your payment information or use a different card.
pur_out_of_stock At least one item is out of stock.
pur_noitems An order must have at least one item.
pur_badverify Changes to the data require your review. Please review and re-submit.
pur_discount_removed One or more discounts no longer apply.
L_Language_DisplayName English (en-US)

OK I have localized the messages now what?

You need to take the localized messages and create an assembly. There are many methods the following help file link should help. Once you create an assembly then you need to add it into your bin folder, take care to create the language folder then add the assembly there.

Can I add my own messages?

Yes, but the help files do note that the messagemanager is obsolete (I wonder why then Commerce Server uses it? If you find the answer let me know :))?

How to use Messagemanager inside of Pipeline Components?

If you have created your own messages and want to use it inside your custom pipeline components the following code will accomplish that.

// using message manager inside pipeline component
IMessageManager messageManager = null;
IDictionary dict = (IDictionary) pContext;
messageManager = (IMessageManager) dic["MessageManager"];
object message = messageManager.GetMessage("your string key", language);

In order for the pipeline to use the specific language you must execute the Pipeline by passing the language code in the PipelineInfo object. If the language parameter is not specified, or is NULL, the message is returned for the message set identified by the DefaultLanguage property of the MessageManager object. This value is retrieved from the web.config under the messageManager element.

Are we there yet?

Once you have done all the above you will need to add the language in the web.config of your site. Why do I need to do this? We need to tell Commerce Server's Pipeline processor that we have a new language so when Commerce Server pipelines encounter an error they retrieve the message correctly.

        <messageManager>
            <cultures default="en-US" baseName="CommerceMessageManager" assembly="CommerceMessageManager">
                 <culture id="en-US"/>
                <culture id="fr-fr"/>
                <culture id="ja-JP"/>
                <culture id="de-DE"/>
                <culture id="your new language"/>
            </cultures>
            <resources>
                <resource id="pur_badsku"/>
                <resource id="pur_badplacedprice"/>
                <resource id="pur_discount_changed"/>
                <resource id="pur_discount_removed"/>
                <resource id="pur_noitems"/>
                <resource id="pur_badshipping"/>
                <resource id="pur_badhandling"/>
                <resource id="pur_badtax"/>
                <resource id="pur_badcc"/>
                <resource id="pur_badpayment"/>
                <resource id="pur_badverify"/>
                <resource id="pur_out_of_stock"/>
                <resource id="unknown_shipping_method"/>
            </resources>
        </messageManager>

Will my custom component also work automagically? No, see the code above about messagemanager and notice that we are passing the language and since you set this value in the PipelineInfo object it will be accessible through the pipeline via the context (pdispContext) parameter.

OK, I think we are done now.

Posted by Max Akbar | 1 Comments
Filed under:

OrderForm Visualizer

Have you developed a pipeline component and then started to debug it and found that you couldn't drill down the OrderForm, Dictionary and SimpleList objects? Well here is the solution. I created this Visualizer to help with the debugging process of pipeline components.

What is a Visualizer?

Visualizers allows the displays of a variable or object in a meaningful way. For example, if you have a DataSet visualizer interprets a DataSet object and displays the result in a DataGridview. So the OrderForm visualizer interprets Commerce Server OrderForm which inherits from Dictionary and SimpleList in a TreeView. After installing the OrderForm visualizer run your pipeline code and set a debug point bring your cursor on the object you wish you view noticed that now you have a Dictionary Visualizer.

After selecting the visualizer the data is rendered in a TreeView.

 

You can now visualize the data in a tree structure by viewing the key\pair value and the data type.


Note: The OrderForm visualizer does not allow modifying the underlying data.

What Version of Visual Studio 2005 does this support?

Edition

Visual Basic

C#

C++

Web Developer

Express

X X

Managed only

X

Standard

X X

Managed only

X

Pro and Team

X X

Managed only

X

I haven't tested Visual Studio 2008 but I don't see any issues with using it.

Where do I get the OrderForm Visualizer?

Commerce Server Training, Inc.

Posted by Max Akbar | 3 Comments
Filed under: ,

News about the Commerce Server Book!

I am sure you all have been waiting for the Commerce Server 2007 Book that was listed at Amazon and blogged about. If you perform a search now, you will notice that it is no longer available at Amazon. The reason for this is that book will not be published.

I talked with Wade (the author) and he is trying to find another publisher and I may even put a few word in a couple of chapters but that's not solidified yet. As I gather more news I will be sure to let you know.

In the mean time here is my shameful plug :/

So how do I learn Commerce Server?

I have two video tutorials that you can start with and more to come later. Currently I am trying to put together a training session something like the bootcamp sessions I did for Microsoft but more in-depth with lots of samples and labs. The duration of this training will be five days and held in sunny California. Time frame is going to be sometime in June\July. The cost is going to be somewhere around $2,225.00. Of course this will depend on interest and number of participants :).

A rough outline of what is covered:

Day one
Installation\Configuration and Deployment

Day two
Catalog System

Day Three
Order System

Day four
Marketing and Profile System

Day five
Data Warehouse and Partner SDK

What you will take back with you:

Lab samples, code and power points of the training session. I will also provide the two training videos as part of this session.

So stay tuned as I get more news on the book and the Training Session here in LA.

Virtual Catalog Limitation

I was working with a client and they run into an error that they had reached their Virtual Catalog limit. This was an issue with the previous versions of the product (Catalog Name and Size Restrictions and the interop API IProductCatalog3::AddVirtualCatalogRule Method throws an exception E_CAT_VC_TOO_MANY_BASECATALOGS) but I thought that we had removed this limitation when I was with Microsoft for Commerce Server 2007. In fact I can't find this limitation anywhere documented in Commerce Server 2007 help files. It seems that this was not addressed and the stored procedure that enforces this limitation was not modified :(.

Why the limitation?

For whatever reason the limit is set for 84??? Why 84 not 80 as it is documented in the previous version? I don't think anyone will know but having this large amount of base catalogs per virtual catalog has a performance impact. You will have to do some testing to fully understand the consequences. If this proves to be an issue try materializing the Virtual Catalog. For more details see Vinayak's blog Virtual Catalogs : To materialize or not to materialize.

What stored procedure enforces this?

The stored procedure is in the <sitename>_productcatalog.dbo.ctlg_VC_AddVCRule. Line 161 has this rule:

if (@NumCatalogsInVc_tmp > 84)

What do I do if I hit this limitation?

Call PSS and ask for a hotfix.

Posted by Max Akbar | (Comments Off)
Filed under:

Orders Video Tutorial Released!

I just completed my second video tutorial for Commerce Server Order System. I cover the following topics:

 

  • An Orders Overview of the order system
  • Orders Architecture
  • Different Applications that interact with the Order System
  • Orders Runtime API (code sample of add to basket, basket page, adding shipping and billing and finally converting the basket into an order)
  • Orders Management API (Sample app to show how to interact with the management APIs of Order System)
  • Order Processing Pipeline (Go over how to create a custom pipeline component)
  • Orders Design (Go over the different pages in the buy path)
  • Orders Databases Overview (review of the tables in the Order System)
  • Orders Runtime Web.config
  • Orders Web Service
  • Orders Mapped Storage (Review of the xml files and how they work in the Order System)
  • Orders Resource
  • Orders Security
  • Orders Adapter (display how to create ports in BizTalk and send a order update to Commerce Server)
  • Staging Orders Config
  • Orders and the Data Warehouse System
  • Advanced Orders topics (how to create a payment method)
  • Best Practices with the Orders System
  • Trouble Shooting The Orders System
  •  

    You can find more info at Commerce Server 2007 Training

    Posted by Max Akbar | (Comments Off)
    Filed under:

    PayPal is looking for a few good customers :)

     

    PayPal has just announced that they are looking for a few early adopters. If you want to test their component developed for Commerce Server then follow the instruction on their blog site. 

     

    Do you use Microsoft Commerce Server 2007? - PayPal Developer Blog - PayPal Developer Community

    Posted by Max Akbar | (Comments Off)
    Filed under:

    Will Commerce Server Run on Windows Server 2008?

     

    So the question of the year is "will Commerce Server run on Windows 2008"? The answer is "YES" with a big BUT you have to wait for Commerce Server SP2 targeted second half of 2008.

     

    To confirm I sent an email to csid@microsoft.com and they can't comment as they are in the planing phase so we just have to wait and see :(.

    I am pretty sure that .NET 3.5 falls on the same bucket.

     

     

    » What will run on Windows Server 2008 — and when | All about Microsoft | ZDNet.com

    Posted by Max Akbar | 1 Comments
    More Posts Next page »
     
    Page view tracker