Skip to content

Commit

Permalink
Display an error message anytime the cart is viewed if it has mixed i…
Browse files Browse the repository at this point in the history
…tems (recurring and non-recurring, or too many recurring). Fixes bug #12211.
  • Loading branch information
perlDreamer committed Sep 12, 2011
1 parent 1acc641 commit 1f9413e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog/7.x.x.txt
Expand Up @@ -11,6 +11,7 @@
- fixed #12246: added extra_www_add_properties as properties fix-up hook in child for www_add
- fixed #12231: Thingy reindex fails on upgrade
- fixed #12245: Encrypt Login and Display Message on Login conflict
- fixed #12211: Recurring Item error message in Cart

7.10.22
- rfe #12223: Add date type to content profiling (metadata)
Expand Down
5 changes: 4 additions & 1 deletion lib/WebGUI/Shop/Cart.pm
Expand Up @@ -1024,6 +1024,10 @@ sub www_view {
return $session->style->userStyle($template->process(\%var));
}

if ($self->hasMixedItems) {
$error{id $self} = $i18n->get('mixed items warning');
}

my %var = (
%{$self->get},
formHeader => WebGUI::Form::formHeader($session, { extras => q|id="wgCartId"|, })
Expand All @@ -1047,7 +1051,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->get('shippingAddressId')) {
Expand Down

0 comments on commit 1f9413e

Please sign in to comment.