Thursday, October 30, 2008

Inventory Computations

The quantity a customer requests may be available in full or in part, and can be fulfilled through back-ordering (if back-ordering is allowed) or preordering (if preordering is allowed).
This is an algorithm of Inventory Computations:
If the product catalog is not mapped to an inventory catalog:
BEGIN
If (Treat missing as OutofStock) = true
Inventory SKU condition = OutofStock
Else
Inventory SKU condition = InStock
END
Else
BEGIN
If Stock Handling = 0
BEGIN
If stock status = Disabled
Inventory SKU condition = OutofStock
Else If stock status = Ignored
Inventory SKU condition = InStock
Else If stock status = Enabled
BEGIN
If OnHand Quantity > Effective Stockout Threshold
Inventory SKU condition = InStock
Else
Inventory SKU condition = OutofStock
END
END
Else If Stock Handling = 1
BEGIN
If stock status = Disabled
Inventory SKU condition = OutofStock
Else If stock status = Ignored
Inventory SKU condition = InStock
Else If Stock status = Enabled
BEGIN
If OnHand Quantity > Effective Stockout Threshold
Inventory SKU condition = InStock
Else If (Product is Preorderable AND OnHand Quantity > (Effective Stockout
Threshold + PreorderLimit)
Inventory SKU condition = Preordered
Else If (Product is Backorderable AND OnHand Quantity > (Effective Stockout
Threshold + PreorderLimit + BackorderLimit)
Inventory SKU condition = BackOrdered
Else
Inventory SKU condition = OutofStock
END
END
END

Saturday, May 17, 2008

Commerce Server 2007: On-Demand Webcasts!

The Commerce Server team has put together three new on-demand webcasts to get everyone started developing their solutions. http://www.microsoft.com/technet/prodtechnol/comm/2007/webcasts.mspx

Commerce Server 2007: Technical Overview Whitepaper

Microsoft has recently released their Microsoft Commerce Server Technical Overview document packed full of excellent information for those of you evaluating Commerce Server 2007. http://www.microsoft.com/downloads/details.aspx?FamilyID=039be1c3-8590-4943-8d20-b605e4a61f11&DisplayLang=en

Commerce Server 2007: Partner SDK Now Available

The Commerce Server 2007 Partner Software Development Kit (SDK) is now available for download (registration required).
http://www.microsoft.com/downloads/details.aspx?FamilyID=ccbdad9a-ab38-46c3-9667-9bfceedbbe88&DisplayLang=en

Wednesday, May 14, 2008

Shipment by Weight

When you use commerce server 2007, you can calculate shipment by 3 ways:
1. Shipment by Total
2. Shipment by Quantity
3. Shipment by Weight.

If you tried to use shipment by weight you will face problem because weight is not default property of products.
You need to define weight property and add it to products needs shipment by weight.
if you run total pipeline against basket and you have item hasn't weight property and you assigned shaipment by weight to it, you will find error:
Not found: orderform.items (0). _product_weight. This shipping method requires that all products in the catalog define weight.

This error occurs if:
1. you didn't have weight property of product definition.
2. You didn't fill it's value(null).
3. you didn't add correct information about product (CatalogName, ProductId, VariantId).
4. You didn't run basket pipeline before run total pipeline.

Thursday, May 8, 2008

Commerce Server/IIS: File or assembly name Microsoft.CatalogServer, or one of its dependencies, was not found.

This typically means that you need to configure your site to use v2.0 of the .NET framework. aspnet_regiis -i is one way, another is to manually switch to 2.0 in the ASP.NET tab of the sites IIS property window.


Server Error in '/CatalogWebService' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: File or assembly name Microsoft.CatalogServer, or one of its dependencies, was not found.
Source Error:
Line 75: <compilation>
Line 76: <assemblies>
Line 77: <add assembly="Microsoft.CatalogServer, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 78: </assemblies>
Line 79: </compilation>


Source File: C:\WebSites\CSAdmin\CatalogWebService\web.config Line: 77

Monday, March 31, 2008

Commerce Server: Failed to get the connection string of the product catalog resource for the specified site.

If you get this exception when loading a CSAdmin web service it is likely that the AppPool's identity does not have access to the MSCS_Admin database. Give the identity access to the databases and you should be good.

System.Web.Services.Protocols.SoapException: An error occurred creating the configuration section handler for CommerceServer/catalogWebService: Failed to get the connection string of the product catalog resource for the specified site. (C:\WebSites\CSAdmin\CatalogWebService\web.config line 51) ---> Microsoft.CommerceServer.ServerFaultException: An error occurred creating the configuration section handler for CommerceServer/catalogWebService: Failed to get the connection string of the product catalog resource for the specified site. (C:\WebSites\CSAdmin\CatalogWebService\web.config line 51)
--- End of inner exception stack trace ---
at Microsoft.CommerceServer.Catalog.Internal.WebServiceUtility.PropagateOrLogException(Exception except)
at Microsoft.CommerceServer.Catalog.Internal.WebServiceUtility.Initialize()
at Microsoft.CommerceServer.Catalog.Internal.WebServiceUtility.get_CatalogExecutionContext()
at Microsoft.CommerceServer.Catalog.WebService.CatalogWebService..ctor()

Thursday, February 28, 2008

Configuration SiteCacheRefresh in Commerce Server 2007 and solve erros

Support for refreshing Commerce Server caches is provided by the SiteCacheRefresh HTTP Handler and is configured in the web.config:



<httpHandlers>
<add verb="*" path="SiteCacheRefresh.axd" type="Microsoft.CommerceServer.Runtime.SiteCacheRefresh,
Microsoft.CommerceServer.Runtime, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
"/>
</httpHandlers>



ASP.NET URL authorization is used to specify the users and groups allowed to refresh the cache.






<location path="SiteCacheRefresh.axd">



<system.web>



<authorization>




<allow roles="BUILTIN\Administrators"/>




<deny users="*"/>




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


ASP.NET site will use forms authentication.
The above ASP.NET URL authentication requires IIS to use Windows Authentication.
If you do not implement a mixed authentication
solution on your retail site, each request to SiteCacheRefresh.axd will be redirected
to the forms authentication login page as specified in the web.config.







<authentication mode="Forms">





<forms loginUrl="~/Login.aspx"/>




</authentication>







A mixed authentication model must be implemented
for SiteCacheRefresh.axd authorization. The Commerce Server Starter Site provides
such a solution.










Enable Mixed Authentication:



  • Make sure your ASP.NET site has Windows Integrated security checked in IIS Admin.


  • Copy the CommerceComponents.dll from the Starter Site bin directory to your retail
    ASP.NET web site’s bin directory.


  • Add the following entry to the configSections element of your web.config.










    <section name="commerceComponents" type="CommerceComponents.Configuration.ComponentConfiguration,
    CommerceComponents" />

    • Add the following entries to the configuration element of
      your web.config.






    <commerceComponents baseCurrencyCode="USD" baseCurrencyCulture="en-US">
    <mixedAuthenticationFiles>
    <add fileName="SiteCacheRefresh.axd" />
    </mixedAuthenticationFiles>
    </commerceComponents>




  • Add the following entries to the httpModules element of your
    web.config.




    <clear />
    <add name="OutputCache" type="System.Web.Caching.OutputCacheModule"
    />
    <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule"
    />
    <add name="MixedModeAuthentication" type="CommerceComponents.MixedAuthenticationModule"
    />
    <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule"
    />




    <add name="MixedModeAuthenticationFixUp" type="CommerceComponents.MixedAuthenticationModuleFixUp"
    />




    <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule"
    />




    <add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule"
    />




    <add name="AnonymousIdentification" type="System.Web.Security.AnonymousIdentificationModule"
    />




    <add name="Profile" type="System.Web.Profile.ProfileModule"
    />




    <!-- COMMERCE SERVER HTTP MODULES


    Place the Commerce Server HTTP module declarations below this line.


    -->



    Errors:

    You may have encountered an error when trying to run a
    Cache Refresh
    from within a Business Management Application
    such as the Catalog Manager
    or when trying to run a Commerce Server Staging
    Project
    with Refresh Cache enabled on one of the following resources
    (Catalog, Marketing or Orders).


    1. Many Errors with System.Web.Services.Protocols.SoapException have been solved by service Pack1

    • 404 File Not Found
      Solution:
    1. Validate you add key of SiteCacheRefresh to HTTPHandlers
      of Web.Config of the site.
    2. Validate Url in Web.Config
      http://<WebServerMachineName>/OrdersWebService/SiteCacheRefresh.axd?CacheToRefresh=CatalogCache
    3. You may already have another Site using the <WebServerMachineName> as
      a Host Header value.
      So, how do you change the <WebServerMachineName>

      You can change it from the database (PropertyName s_WebServerMachine) for site resource.
    • [Win32Exception (0x80004005): The handle is invalid]

      Solution:
      Validate Mixed Authentication is enabled from Steps above. Make sure you deny anonymous or everyone and allow users have access to the module. You can’t test mixed authentication from the site, you should use external application.




    • After Calling RefreshSiteCache.axd and checked the event
      Log I found message:
      The cache 'CatalogCache' has been refreshed for the site 'Contoso'(didn’t generate errors). But when I checked the site, I didn’t find data updated.
      Solution: Review HTTP Modules in Web.Config