2

我将 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 中的默认价格矩阵项目,这正是我所做的。你能给我一些想法吗?

4

1 回答 1

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"
        />
于 2014-04-29T19:30:28.810 回答