Allow billingAddress to be set at the same time as the shippingAddress is set to it.
This commit is contained in:
parent
131d4cb041
commit
cf95ff6683
1 changed files with 4 additions and 1 deletions
|
|
@ -723,16 +723,19 @@ sub updateFromForm {
|
|||
$cartProperties->{billingAddressId} = $newAddress->get('addressId');
|
||||
}
|
||||
elsif ($billingAddressId eq 'update_address' && $self->get('billingAddressId') && ! @missingBillingFields) {
|
||||
##User changed the address selector
|
||||
##User updated the current address
|
||||
my $address = $self->getBillingAddress();
|
||||
$address->update(\%billingData);
|
||||
}
|
||||
elsif ($billingAddressId ne 'new_address' && $billingAddressId) {
|
||||
##User changed the address selector to another address field
|
||||
$cartProperties->{billingAddressId} = $billingAddressId;
|
||||
}
|
||||
else {
|
||||
$self->session->log->warn('billing address: something else: ');
|
||||
}
|
||||
##Update now, so that you can add an address AND set the shipping address to be the same at the same time.
|
||||
$self->update($cartProperties);
|
||||
|
||||
if ($self->requiresShipping) {
|
||||
my %shippingData = $book->processAddressForm('shipping_');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue