Looking for the v10 manual? Visit our new user's guide!
 
Search Descriptions Version
 
 
This article applies to: MultiStore

NULL Value Error thrown on cart page after upgrading to MSx 9300 when adding a promo


Symptoms
Any cart that at some point has been on version 5.9 or earlier and has upgraded to 9.3 (MSx 9300) is going to get this error the first time a promo is added to the cart:

    Page URL: /shoppingcart.aspx
    Source: System.Data.Linq
    Message: The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type.

Cause
Database issue on dbo.ShoppingCart

Solution
The fix is to run the query below on the DB which you can do in your admin console - Configuration - Advanced - Run SQL:

    ALTER TABLE dbo.ShoppingCart
    ADD CONSTRAINT DF_ShoppingCart_RecurringIndex DEFAULT(0) FOR RecurringIndex