Add the organization part of an address into the transaction and transactionitem. Fixes bug #12088.

This commit is contained in:
Colin Kuskie 2011-04-05 15:10:23 -07:00
parent f8021c3d3d
commit d5ba73fac7
5 changed files with 184 additions and 107 deletions

View file

@ -254,8 +254,8 @@ A hash reference that contains one of the following:
A reference to a WebGUI::Shop::CartItem. Alternatively you can manually pass in any of the following
fields that would be created automatically by this object: assetId configuredTitle options shippingAddressId
shippingName shippingAddress1 shippingAddress2 shippingAddress3 shippingCity shippingState shippingCountry
shippingCode shippingPhoneNumber quantity price vendorId
shippingName shippingAddress1 shippingOrganization shippingAddress2 shippingAddress3 shippingCity shippingState
shippingCountry shippingCode shippingPhoneNumber quantity price vendorId
=head4 shippingTrackingNumber
@ -288,6 +288,7 @@ sub update {
my $address = $item->getShippingAddress;
$newProperties->{ shippingAddressId } = $address->getId;
$newProperties->{ shippingAddressName } = join ' ', $address->get('firstName'), $address->get('lastName');
$newProperties->{ shippingOrganization } = $address->get('organization');
$newProperties->{ shippingAddress1 } = $address->get('address1');
$newProperties->{ shippingAddress2 } = $address->get('address2');
$newProperties->{ shippingAddress3 } = $address->get('address3');
@ -309,7 +310,7 @@ sub update {
my @fields = (qw(assetId configuredTitle options shippingAddressId shippingTrackingNumber orderStatus
shippingName shippingAddress1 shippingAddress2 shippingAddress3 shippingCity shippingState
shippingCountry shippingCode shippingPhoneNumber quantity price vendorId
vendorPayoutStatus vendorPayoutAmount taxRate taxConfiguration));
vendorPayoutStatus vendorPayoutAmount taxRate taxConfiguration shippingOrganization));
foreach my $field (@fields) {
$properties{$id}{$field} = (exists $newProperties->{$field}) ? $newProperties->{$field} : $properties{$id}{$field};
}