Unable to resolve database with sitecore SES when adding to shopping Cart

191 Views Asked by At

I am using SES with Sitecore. I got an issue when adding an item to the shopping cart. This is the trace I got:

[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

It must be that the price calculation is causing the issue. I modified the default price matrix items in Sitecore, that's just what I did. Can you give me ideas please?

1

There are 1 best solutions below

0
On

I received a response from Sitecore support that fixed the issue. In my site configuration below I was missing content="master". Not sure why I need it, but it fixes the problem.

<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"
        />