Migrate CartItem from Class::InsideOut to Moose.
This commit is contained in:
parent
679c4678d2
commit
be42b7118c
4 changed files with 166 additions and 136 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue