Remove an extra my from Shop::Cart.

Add the getTaxRates method to Tax, with tests.
Add some calculate code to Tax, with tests, which don't pass yet.
This commit is contained in:
Colin Kuskie 2008-03-05 00:22:40 +00:00
parent 52d2c63271
commit 2bc6cd49a7
4 changed files with 138 additions and 3 deletions

View file

@ -72,7 +72,7 @@ sub create {
}
my $cartId = $session->db->quickScalar("select cartId from cart where sessionId=?",[$session->getId]);
return $class->new($session, $cartId) if (defined $cartId);
my $cartId = $session->id->generate;
$cartId = $session->id->generate;
$session->db->write('insert into cart (cartId, sessionId) values (?,?)', [$cartId, $session->getId]);
return $class->new($session, $cartId);
}