in

dashCommerce

An ASP.NET Open Source e-Commerce Application

Error: ((!ThisPage.Product.AllowNegativeInventories) && (sku.Inventory > 0))

Last post 06-25-2008 8:36 PM by theonlylawislove. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-24-2008 12:37 AM

    • dar
    • Top 50 Contributor
    • Joined on 06-03-2008
    • Posts 17

    Error: ((!ThisPage.Product.AllowNegativeInventories) && (sku.Inventory > 0))

    when i click on a product to view it on Product page, following error is displayed: 

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:

    Line 256:      Sku sku = new Sku("Sku", skuId);
    Line 257: if(sku.SkuId > 0) {
    Line 258: if ((!ThisPage.Product.AllowNegativeInventories) && (sku.Inventory > 0)) {
    Line 259: string previouslySelectedValue = ThisPage.Quantity.SelectedValue;
    Line 260: ThisPage.Quantity.Enabled = true;

    Source File: e:\dc_3.0_Source_B\Web\controls\attributeSelector.ascx.cs    Line: 258 

    please tell , how to solve it 

     

    waqar dar
    Filed under:
  • 06-25-2008 8:36 PM In reply to

    Re: Error: ((!ThisPage.Product.AllowNegativeInventories) && (sku.Inventory > 0))

    Debug the product.aspx Page_Load.

    Verify that the _product is being set.

    ~Paul
Page 1 of 1 (2 items)