Merge commit 'v7.10.23' into WebGUI8. Tests need fixing.

This commit is contained in:
Colin Kuskie 2011-11-02 11:12:18 -07:00
commit a2a821822d
72 changed files with 578 additions and 132 deletions

View file

@ -819,10 +819,6 @@ sub updateFromForm {
$item->update({shippingAddressId => $itemAddressId});
}
}
if ($self->hasMixedItems) {
my $i18n = WebGUI::International->new($self->session, "Shop");
$self->error($i18n->get('mixed items warning'));
}
my @cartItemIds = $form->process('remove_item', 'checkList');
foreach my $cartItemId (@cartItemIds) {
@ -830,6 +826,12 @@ sub updateFromForm {
$item->remove if ! Exception::Class->caught();
}
##Remove the items BEFORE we check to see if there are duplicates.
if ($self->hasMixedItems) {
my $i18n = WebGUI::International->new($self->session, "Shop");
$self->error($i18n->get('mixed items warning'));
}
##Visitor cannot have an address book, or set a payment gateway, so skip the rest of this.
return 1 if $session->user->isVisitor;
@ -1085,6 +1087,10 @@ sub www_view {
return $session->style->userStyle($template->process(\%var));
}
if ($self->hasMixedItems) {
$self->error($i18n->get('mixed items warning'));
}
my %var = (
%{$self->get},
formHeader => WebGUI::Form::formHeader($session, { extras => q|id="wgCartId"|, })
@ -1108,7 +1114,6 @@ sub www_view {
shippableItemsInCart => $self->requiresShipping,
);
# get the shipping address
my $address = eval { $self->getShippingAddress };
if (my $e = WebGUI::Error->caught("WebGUI::Error::ObjectNotFound") && $self->shippingAddressId) {