Bug reports
Version 3.x > Bug reports > FIX: SKUPriceDetailControl not checking for nulls View modes: 
User avatar
Member
Member
Mufasa - 1/27/2009 10:25:12 AM
   
FIX: SKUPriceDetailControl not checking for nulls
~/CMSEcommerce/ShoppingCart/ShoppingCartSKUPriceDetail.ascx.cs does not check for a null ShoppingCart (in the case the page is directly accessed without the customer going to the shopping cart first, in the case of bots/crawlers mainly) in some places. If it isn't checked, it throws a NullReferenceException.

It is checked in most places, but in Kentico 3.1a still needs checked in the RoundedTotalPrice and GetFormattedSubtotalValue properties.

I just used changed the code for those properties from the use of:
this.ShoppingCartInfoObj.CurrencyInfoObj
to:
this.ShoppingCartInfoObj == null ? CurrencyInfoProvider.GetMainCurrency() : this.ShoppingCartInfoObj.CurrencyInfoObj


User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 2/2/2009 9:20:26 AM
   
RE:FIX: SKUPriceDetailControl not checking for nulls
Hi,

thank you for your information. We will review the described issue and fix it in the new version.

Regards,
Zdenek Cetkovsky, Kentico.