shipping system integrated with cart, but need admin interface to test if it works

This commit is contained in:
JT Smith 2008-03-06 17:06:59 +00:00
parent 56407bdc8f
commit 8a04f5911f
6 changed files with 62 additions and 35 deletions

View file

@ -232,16 +232,9 @@ The address book that this address belongs to.
sub update {
my ($self, $newProperties) = @_;
my $id = id $self;
$properties{$id}{address2} = (exists $newProperties->{address2}) ? $newProperties->{address2} : $properties{$id}{address2};
$properties{$id}{address3} = (exists $newProperties->{address3}) ? $newProperties->{address3} : $properties{$id}{address3};
$properties{$id}{state} = (exists $newProperties->{state}) ? $newProperties->{state} : $properties{$id}{state};
$properties{$id}{code} = $newProperties->{code} || $properties{$id}{code};
$properties{$id}{city} = $newProperties->{city} || $properties{$id}{city};
$properties{$id}{label} = $newProperties->{label} || $properties{$id}{label};
$properties{$id}{name} = $newProperties->{name} || $properties{$id}{name};
$properties{$id}{country} = $newProperties->{country} || $properties{$id}{country};
$properties{$id}{address1} = $newProperties->{address1} || $properties{$id}{address1};
$properties{$id}{phoneNumber} = $newProperties->{phoneNumber} || $properties{$id}{phoneNumber};
foreach my $field (qw(address1 address2 address3 state code city label name country phoneNumber)) {
$properties{$id}{$field} = (exists $newProperties->{$field}) ? $newProperties->{$field} : $properties{$id}{$field};
}
$properties{$id}{addressBookId} = $self->addressBook->getId;
$self->addressBook->session->db->setRow("address","addressId",$properties{$id});
}