Archive for October 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
If you like this post, please click on our sponsor advertisement.
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.
If you like this post, please click on our sponsor advertisement.
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.
- Using profile Targeting
- 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)
If you like this post, please click on our sponsor advertisement.
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).
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.
If you like this post, please click on our sponsor advertisement.
After installing starter site, when I open the application in the browser, I received an error – “Unrecognized configuration setting ‘mailSettings’.
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.
- Open Internet Information Server (IIS) – Click start, select run. Type “Inetmgr” and press ok button.
- Right click on “StarterSite” directory and select properties.
- A dialog box appears. Click on ASP.NET tab.
- Select 2.0.50727 value from ASP.NET version drop down and press ok button.
- Repeat step 2 to step 4 for orderwebservice, catalogwebservice, profilewebservice and marketingwebservice.
If you like this post, please click on our sponsor advertisement.
