From 5c175c42d926f0fd03bf4ba9131d28fd2d5cf140 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 31 Mar 2011 16:54:44 -0700 Subject: [PATCH] If there is a problem with the user's billing address, still let them get into the Cart. Fixes bug #12081. --- docs/changelog/7.x.x.txt | 4 ++-- lib/WebGUI/Shop/Cart.pm | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index ecd75edf1..7bb3ab8fb 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -4,8 +4,8 @@ - fixed #12084: Greenportal links are sometimes white on white - rfe #618: Syndicated Content Asset: Make images in the downloaded RSS-feeds available in the template. - fixed #12086: Shop Billing Address Unpopulated - - Snippets can now select a template parser (instead of being restricted to - the configured default) + - Snippets can now select a template parser (instead of being restricted to the configured default) + - fixed #12081: addrees not in addressbook after user change in session 7.10.12 - fixed #12072: Product, related and accessory assets diff --git a/lib/WebGUI/Shop/Cart.pm b/lib/WebGUI/Shop/Cart.pm index 96325d327..9a16ae3ef 100644 --- a/lib/WebGUI/Shop/Cart.pm +++ b/lib/WebGUI/Shop/Cart.pm @@ -1178,6 +1178,9 @@ sub www_view { if ( defined $billingAddress ) { $billingAddressOptions{'update_address'} = sprintf $i18n->get('Update %s'), $billingAddress->get('label'); } + elsif (my $e = WebGUI::Error->caught("WebGUI::Error::ObjectNotFound") && $self->get('billingAddressId')) { + $self->update({billingAddressId=>''}); + } } %billingAddressOptions = (%billingAddressOptions, %addressOptions);