added some helper methods for addressing, and got the cart closer to working

This commit is contained in:
JT Smith 2008-03-05 16:32:08 +00:00
parent 8c862439f9
commit 112834a9b7
4 changed files with 112 additions and 8 deletions

View file

@ -103,6 +103,25 @@ sub get {
#-------------------------------------------------------------------
=head2 getHtmlFormatted ()
Returns an HTML formatted address for display.
=cut
sub getHtmlFormatted {
my $self = shift;
my $address = $self->get("name") . "<br />" . $self->get("address1") . "<br />";
$address .= $self->get("address2") . "<br />" if ($self->get("address2") ne "");
$address .= $self->get("address3") . "<br />" if ($self->get("address3") ne "");
$address .= $self->get("city") . ",";
$address .= $self->get("state") . " " if ($self->get("state") ne "");
$address .= $self->get("code") if ($self->get("code") ne "");
$address .= '<br />' . $self->get("country");
}
#-------------------------------------------------------------------
=head2 getId ()
Returns the unique id of this item.