Change the order of deleting the item from the cache and calling

clean up code, since deleting the item causes the Session var
to get nuked.
This commit is contained in:
Colin Kuskie 2008-07-21 21:27:31 +00:00
parent dafe7304c2
commit 1031883fbf
2 changed files with 2 additions and 1 deletions

View file

@ -633,8 +633,8 @@ Remove an item from the cart and then display the cart again.
sub www_removeItem {
my $self = shift;
my $item = $self->getItem($self->session->form->get("itemId"));
delete $itemCache{ref $self}{$item->getId};
$item->remove;
delete $itemCache{ref $self}{$item->getId};
return $self->www_view;
}