When a Sku is purged, delete it from all carts. Better handling for cartItems whose assets have been deleted. Fixes bug #12213

This commit is contained in:
Colin Kuskie 2011-08-02 09:59:10 -07:00
parent 44f62c9884
commit 3b7dd524db
5 changed files with 32 additions and 4 deletions

View file

@ -175,7 +175,8 @@ sub getSku {
my ($self) = @_;
my $asset = '';
$asset = WebGUI::Asset->newByDynamicClass($self->cart->session, $self->get("assetId"));
$asset->applyOptions($self->get("options")) if $asset;
return undef if ! $asset;
$asset->applyOptions($self->get("options"));
return $asset;
}