Commerce Server Blog

Build world class ecommerce applications using Microsoft Commerce Server
  •  
  • Home
  • Advertise
  • Copyright Policy
  • Disclaimer
  • About

Refresh cache throws HTTP status code 401 (Unauthorized) error

ravikanth | October 29, 2008

Whenever I press “Refresh Site Cache” link in commerce server marketing manager, I get HTTP status code 401 error as shown below. Marketing manager recorded errors in the event log but those details are not helpful to troubleshoot the issue.

I installed fiddler tool to monitor HTTP traffic and surprising I found there are no entries coming into the tool which I click on refresh site cache link. I checked IIS logs and found something strange. Commerce server web services on my box are running under “Network Service” account and this account is also added to the authorization manager. Surprisingly the user name is not getting populated in the log file. When I tried to open the link http://cerebro/OrdersWebService/SiteCacheRefresh.axd?CacheToRefresh=AllMarketingCaches in the browser, IIS is able to write the logged in user name into log file.

What exactly happens when you click on refresh site cache? I assume, when the business tools calls to a page (SiteCacheRefresh.axd) which it internal calls all other cache pages. Somehow the web service is not running under “Network Service” account (blank user name is going to IIS)  I changed and domain account to different domain user (“Administrator”) then the cache started working. I am able to see the user name coming in IIS logs.

Lately I realized that Microsoft has released a work around for this fix. Click below link to get more details about this error.
http://support.microsoft.com/kb/931290

Comments
1 Comment »
Categories
Troubleshoot
Comments rss Comments rss
Trackback Trackback

Commerce Server 2007 code name “Mojave” October 2008 CTP

ravikanth | October 25, 2008

Microsoft Commerce Server team announced the availability of the Microsoft Commerce Server 2007 code name “Mojave” October CTP.  This is the first public release of our next Commerce Server offering.

This CTP includes the first of two key additions to Commerce Server: the new multi-channel commerce foundation.  This new run-time API adds new out-of-box functionality, adds pervasive multi-channel awareness, and unifies the run-time calling model across all subsystems.

To receive the October CTP, Mojave October CTP, to review and accept the EULA. You will receive an email with the link to the download package. 

I will be reviewing CTP and will post my findings on this blog. So, stay connected to my blog.

Comments
No Comments »
Categories
Commerce Server 2009
Tags
commerce server, Mojave
Comments rss Comments rss
Trackback Trackback

Discounts on Shipping Methods

ravikanth | October 25, 2008

Out of box, commerce server provides six types of discounts. This will satisfy majority of business requirements to provide flexible discounts to their customers but in today’s dynamic world these discounts are not enough. What if the business wants to give shipping discounts based on shipping method selected. Many developers feels that this requirement cannot be achievable but here are the two workarounds to achieve this requirement.

  1. Using profile Targeting
  2. Using Custom Pipeline.

Using Profile Targeting:

This approach is similar to current approach but small changes.

  • Extend profile system to capture order shipping method. The value will be set/updated during checkout process.
  • Create different order level discounts for every shipping method. I.e., in the target expression we will target it on shipping method. Consider following table.
Shipping Method Minimum Order Amount Priority Amount Off
ByGround

20

4

10%

ByGround

100

3

15%

ByGround

200

2

50%

ByGround

300

1

100%

Here we will create four discounts and target to “By Ground” shipping method.

 

 

In this case commerce server decides which discount to apply to the basket. The administrator can set the priority to discounts so that when two are more discounts are eligible CS can apply top priority discount.

Advantages:

  • Easy to implement.
  • Business users can create new discounts using marketing manager.
  • Can do user targeting (applied only to users of California).

Disadvantages:

  • Mistakes in priorities may leads to problems.
  • If there are more rules, its end up creating multiple discounts (leads to confusion).

Using Custom Pipeline

In this approach, we are implementing shipping discounts based on business rules. We will create a small utility by which the users can capture all rules data. For example,

Shipping Method Minimum Order Amount Priority Amount Off
ByGround

20

4

10%

ByGround

100

3

15%

ByGround

200

2

50%

ByGround

300

1

100%

The application allows users to extract this data into XML

<Discounts>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 20 </MinimumOrder>
          <Priority>4</ Priority>
          <AmountOff>10</ AmountOff>
     </Discount>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 50 </MinimumOrder>
          <Priority>3</ Priority>
          <AmountOff>15</ AmountOff>
     </Discount>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 200 </MinimumOrder>
          <Priority>50</ Priority>
          <AmountOff>50</ AmountOff>
     </Discount>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 300 </MinimumOrder>
          <Priority>1</ Priority>
          <AmountOff>100</ AmountOff>
     </Discount>
</Discounts>

We will create a custom pipeline component which will take this value as input. This input can be provided by administrator through pipeline component editor as shown below.

 

This component will append business rule data to the dictionary so that the data can be available to rest of the components.

“Commerce.ShippingMethodRouter” will load corresponding shipping calculator based on shipping method. In current scenario, it will call shipping calculator component which interacts with third party web services to calculate shipping cost. Since we have business rules available to shipping cost calculator, it’s easy to get what discount we can provide. We will deduct cost from the actual shipping cost before assigning it back to dictionary.

Note: We can also implement this by using BizTalk rule engine instead of XML.

Advantages:

  • Can implement many rules?
  • No need to create different promotions.

Disadvantages:

  • Every time the business user has to reach to admin to amend latest changes.
  • We cannot implement user targeting (this discount is applicable to only California shipments)
Comments
No Comments »
Categories
commerce server 2007
Tags
marketing system, Shipping Methods
Comments rss Comments rss
Trackback Trackback

How to make multiple discounts work

ravikanth | October 19, 2008

By default only one discount will be applied to the basket. Commerce server is having its own algorithm to select the particular discount from the qualified discount list. The user can change selection behavior by prioritizing the discounts. What if you want to give multiple discounts to the customer.

For example, you have created 10% simple discount on the product "rockes" and another 10% simple discount on the product "polor stack" and the coupon code for both discounts is "kanth". Apart from this, you have defined 75% amount discount on shipping cost if the total basket cost is greater than > 100$.

Commerce server also provides us to apply same discounts in a basket through interaction policies. Check below  site for more details.
http://msdn.microsoft.com/en-us/library/ms959119.aspx

So, for the given two simple discounts, I have enabled few properties (select check box as per your requirement).

CS discount properties

Now when the user added two products into basket, he will get 10% discount on Rockes shoes and Polor Stack bags and as well as 75% discount on shipping cost. Check below diagram is the output of the above configuration changes.

discount property results

Comments
1 Comment »
Categories
commerce server 2007
Tags
commerce server, interaction policies, multiple discounts
Comments rss Comments rss
Trackback Trackback

Unrecognized configuration setting ‘mailSettings’

ravikanth | October 16, 2008

After installing starter site, when I open the application in the browser, I received an error – “Unrecognized configuration setting ‘mailSettings’.

MailSetting error 

If you start commenting mailSettings section in web.config, the error occurs in next section. The cause for this error is with the IIS settings. The problems may come on a machine where .NET 1.1 and .NET 2.0 are installed.

So, when starter site got installed, five virtual directories are created in IIS and all these virtual directories are using .NET 1.1 instead of 2.0. Follow these steps to enable .NET 2.0 on virtual directory.

  1. Open Internet Information Server (IIS) – Click start, select run. Type “Inetmgr” and press ok button.
  2. Right click on “StarterSite” directory and select properties.
  3. A dialog box appears. Click on ASP.NET tab.
  4. Select 2.0.50727 value from ASP.NET version drop down and press ok button.
    IIS Settings 
  5. Repeat step 2 to step 4 for orderwebservice, catalogwebservice, profilewebservice and marketingwebservice.
Comments
No Comments »
Categories
Troubleshoot
Tags
mailSettings error, Troubleshoot
Comments rss Comments rss
Trackback Trackback

Sign up for Newsletter


Categories

Quiz

  • Catalog Quiz for Beginners
  • Profile Quiz for Beginners
  • Quiz 1 for Advance Users
  • Quiz for Beginners

Recent Posts

  • Staging Deployment – Security Considerations
  • Pipeline Editor displays registered custom pipeline components as unknown in 64 Bit version.
  • How commerce server staging works
  • Steps to extend payments in Commerce Server 2009
  • Introduction to Commerce Server Staging
  • Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information
  • Commerce server staging throws Remote authorization failed to server. Ensure the service has access to this server.
  • Updated Commerce Server 2009 template pack for SharePoint 2007 released
  • RCXml2Resx.exe tool stops working
  • Commerce Server Profile Importer Tool

Archives

  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008

Tags

add discounts add images to profile Advantages of commerce server approve discounts authentication auto login process automatic user creation basket Brand Management business tools campaign management Catalog catalog import Category commerce server commerce server 2007 commerce server manager Commerce Server SP2 commerce server staging discounts ecommerce Estimation Installation inventory Kanth Koppala marketing system migration error Mojave operation components operation sequence Order subsystem Product profile profile subsystem property metadata purchase order quick checkout Ravi Ravi Kanth site cache refresh starter site tools transactions error Variant
(c) 2009 Commerce Server Blog. All rights Reserved. Articles cannot be reproduced without permission from the author.Write to me at kanth@ravikanth.net if you have any comments, questions, suggestions about this site or would like to send us a tip
About Us | Terms of Use | Disclaimer | Advertise .