Migrate CartItem from Class::InsideOut to Moose.

This commit is contained in:
Colin Kuskie 2010-08-05 16:24:10 -07:00
parent 679c4678d2
commit be42b7118c
4 changed files with 166 additions and 136 deletions

View file

@ -211,7 +211,9 @@ sub addItem {
unless (defined $sku && $sku->isa("WebGUI::Asset::Sku")) {
WebGUI::Error::InvalidObject->throw(expected=>"WebGUI::Asset::Sku", got=>(ref $sku), error=>"Need a sku.");
}
my $item = WebGUI::Shop::CartItem->create( $self, $sku);
my $item = WebGUI::Shop::CartItem->new($self, $sku);
$item->write();
$sku->onAdjustQuantityInCart($item, 1);
return $item;
}