bleroy / Nwazet.Commerce

Idiomatic commerce module for Orchard CMS.
BSD 3-Clause "New" or "Revised" License
26 stars 21 forks source link

Product add button fails to render when associated attribute is deleted #58

Closed bleroy closed 7 years ago

bleroy commented 9 years ago

Originally reported by: Josh Berry (Bitbucket: joshberry, GitHub: joshberry)


When an attribute that was previously associated with a product is deleted, the add button for that product no longer displays. This is caused by an exception thrown from the GetAttributes method in ProductAttributeService.

This is not intuitive and cumbersome for users as they have to go into each product the deleted attribute was associated with and re-save it to resolve the issue.

Steps to repro:

  1. Create a new attribute
  2. Associate the attribute with a product
  3. Delete the attribute created in step 1
  4. View the product - the add button is missing

MatteoPiovanelli-Laser commented 7 years ago

Hi. Adding to this, there is a further issue with removing attributes.

  1. Create 2 attributes.
  2. Associate them both with a product.
  3. Delete one attribute.
  4. View the product: both the "add to cart" button and the dropdown for the second attribute are missing.