Fixed a problem where getShippingAddress was not throwing an error but still returning undef in some situations causing the cart to fail.
This commit is contained in:
parent
8e069753c2
commit
d6b69e789c
1 changed files with 4 additions and 3 deletions
|
|
@ -805,14 +805,15 @@ sub www_view {
|
|||
);
|
||||
|
||||
# get the shipping address
|
||||
my $address = eval { $self->getShippingAddress };
|
||||
if (WebGUI::Error->caught("WebGUI::Error::ObjectNotFound")) {
|
||||
my $address = eval { $self->getShippingAddress };
|
||||
if (my $e = WebGUI::Error->caught("WebGUI::Error::ObjectNotFound")) {
|
||||
# choose another address cuz we've got a problem
|
||||
$self->update({shippingAddressId=>''});
|
||||
|
||||
}
|
||||
|
||||
# if there is no shipping address we can't check out
|
||||
if (WebGUI::Error->caught) {
|
||||
if (WebGUI::Error->caught || not defined $address) {
|
||||
$var{shippingPrice} = $var{tax} = $self->formatCurrency(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue