Found an obscure bug this week in AC7.  If you have an existing product configured as a kit, changing it to a regular product (removing all kit components) could break your checkout.  Here’s why:

When Able writes a kit product to the basket, it also writes a value to the KitList field on the basket line item record.  This value tells Able to expect the basket line item to be a Kit product.  Same thing when an item is written to a wishlist.

However, when removing components from a kit product in the catalog, Able doesn’t update any existing basket items for the same ProductId.  So any abandoned baskets still have the a value in the KitList field.

If a shopper adds the product (when it was a kit) to their basket and then returns to purchase it AFTER the ProductId is changed to a regular product, Checkout doesn’t know how to handle this.  the KitList field still has a value, but the original product no longer has any components.  Checkout blows up.

A second way to make this happen is the Reorder button.  Often a shopper will log into their My Account page, view their previous order and click the Reorder button.  However, Able code doesn’t validate the previous order products against the current catalog.  It just assumes if the ProductId still exists, it must be configured the same as it was on the previous order.

So the shopper again winds up with a basket item having a KitList value for a product that no longer has components.  Checkout crashes and shoppers cannot complete the purchase.

The solution for the client was two-fold.  First, we had to clear all records from the ac_BasketItems table.  Second, we had to modify the Reorder button to simply redirect to the store catalog instead of repopulating the basket with items.