in

dashCommerce

An ASP.NET Open Source e-Commerce Application

Oops Error on Add to Cart Click After Attribute Added

Last post 07-16-2008 9:36 AM by techsage. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 07-13-2008 10:02 PM

    Oops Error on Add to Cart Click After Attribute Added

    I added an attribute to a product after it was active by creating an attribute and then changing the product to Enabled=false in the db, associating the attirbute with the product through dashCommerce Admin and then changing Enabled back to true.  This worked great (attribute shows on product page) EXCEPT that when you click on Add to Cart without specifiying an option from the attribute dropdown, you get an Oops error:

    System.NullReferenceException: Object reference not set to an instance of an object.
       at MettleSystems.dashCommerce.Web.product.btnAddToCart_Click(Object sender, EventArgs e) in C:\mettlesystems\code\open source\dashCommerce\Web\product.aspx.cs:line 162

    I worked around this by changing the attribute's isrequired field to True in the db (the Checkbox was unselectable in the UI) and now I don't get the error, but I don't really want this attribute to be required.

     Any suggestions? Bug, or just a product of how I applied the attribute after the fact? Thanks.

    Filed under: , ,
  • 07-14-2008 5:16 AM In reply to

    Re: Oops Error on Add to Cart Click After Attribute Added

     You can try deleting all the sku's for that item in the DB then it should let you regenerate the Sku's.

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!
  • 07-15-2008 8:08 PM In reply to

    Re: Oops Error on Add to Cart Click After Attribute Added

    When you say regenerate the SKUs, you mean manually, right? Thanks.

  • 07-15-2008 8:14 PM In reply to

    Re: Oops Error on Add to Cart Click After Attribute Added

     Nop I mean thru the Admin UI

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!
  • 07-15-2008 8:25 PM In reply to

    Re: Oops Error on Add to Cart Click After Attribute Added

    Whoops, by manually, I meant through the Admin UI, but not in an automated way where you would click a magic button called "Regenerate SKUs".  Sorry, I'm new to dC (obviously).

  • 07-15-2008 8:27 PM In reply to

    Re: Oops Error on Add to Cart Click After Attribute Added

    Although can't I delete the SKUs (products) through the Admin UI, too.  Or do I have to do it through the DB for your suggestion to work?

  • 07-15-2008 8:29 PM In reply to

    Re: Oops Error on Add to Cart Click After Attribute Added

    You will have to delete it through the DB (SSMS(E))
    You might have to set the product IsEnabled to false

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!
  • 07-15-2008 9:11 PM In reply to

    Re: Oops Error on Add to Cart Click After Attribute Added

    Well, that helped to a certain degree as it did generate the SKUs when I went to the SKUs tab, but now the Add to Cart button is grayed out until aSKU option is selected even though the attribute is marked "not required" in the Admin UI.

    Thank you for your help.

  • 07-16-2008 3:50 AM In reply to

    Re: Oops Error on Add to Cart Click After Attribute Added

     Did that work before? I think thats a BUG

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!
  • 07-16-2008 9:27 AM In reply to

    Re: Oops Error on Add to Cart Click After Attribute Added

    I don't know if it worked before; I just assumed it should since the option to uncheck "Is Required" was available.  Guess I'll switch back to required for now so people don't get confused as to why the Add to Cart button is disabled.

  • 07-16-2008 9:33 AM In reply to

    Re: Oops Error on Add to Cart Click After Attribute Added

    Setting IsRequired to True didn't change the button, so I'm kinda in a bind now.

  • 07-16-2008 9:36 AM In reply to

    Re: Oops Error on Add to Cart Click After Attribute Added

    Before all of this - when I had first added the attributes - I could click the Add to Cart, but nothing would happen.  Then I changed the attribute to IsRequired so that at least it would prompt the user to select an option before hitting Add to Cart.

Page 1 of 1 (12 items)