添加到购物车时无法使用sitecore SES解析数据库

时间:2014-04-21 08:45:53

标签: asp.net sitecore sitecore-ecommerce

我正在使用SES和Sitecore。 将商品添加到购物车时出现问题。 这是我得到的痕迹:

[InvalidOperationException: Unable to resolve database.]
    Sitecore.Ecommerce.Prices.ProductPriceManager.get_Database() +244
    Sitecore.Ecommerce.Prices.ProductPriceManager.GetPriceMatrixPrice(TProduct product, String priceMatrixName) +129
    Sitecore.Ecommerce.Prices.ProductPriceManager.GetProductTotals(TProduct product, TCurrency currency, UInt32 quantity) +391
    Sitecore.Ecommerce.Carts.ShoppingCartManager.AddProduct(String productCode, UInt32 quantity) +552
    Neo.Business.OrderServices.AddToShoppingCart(String productCode, String quantity) in c:\Projets\NeoSiteCore\Neo.Business\PaymentServices.cs:92
    Neo.WebSites.Layouts.NeoSublayouts.OnlineCourses.AddToCartForm.AddToCartButton_Click(Object sender, EventArgs e) in  c:\Projets\NeoSiteCore\Neo.WebSites\Layouts\NeoSublayouts\OnlineCourses\AddToCartForm.ascx.cs:70
    System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +153
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804

必须是价格计算导致问题。 我修改了Sitecore中的默认价格矩阵项,这就是我所做的。 你能给我一些想法吗?

1 个答案:

答案 0 :(得分:0)

我收到了Sitecore支持的回复,修复了该问题。在我的网站配置中,我遗漏了 content =" master" 。不知道为什么我需要它,但它解决了这个问题。

<site name="website" 
        virtualFolder="/" 
        physicalFolder="/" 
        rootPath="/sitecore/content" 
        startItem="/home" 
        database="web" 
        domain="extranet" 
        allowDebug="true" 
        cacheHtml="true" 
        htmlCacheSize="10MB" 
        registryCacheSize="0" 
        viewStateCacheSize="0" 
        xslCacheSize="5MB" 
        filteredItemsCacheSize="2MB" 
        enablePreview="true" 
        enableWebEdit="true" 
        enableDebugger="true" 
        disableClientData="false"
        EcommerceSiteSettings="/Ecommerce/Site Settings"
        ordersDatabase="orders" 
        actionLogDatabase="logging"
        content="master"
        />