added basic quantity checking for inventory management, and a dateAdded field to the cart in case we need to monitor how long items have been in the cart

This commit is contained in:
JT Smith 2008-03-17 17:33:54 +00:00
parent 537824fdc9
commit c61890392c
4 changed files with 74 additions and 10 deletions

View file

@ -238,7 +238,7 @@ Returns an array reference of WebGUI::Asset::Sku objects that are in the cart.
sub getItems {
my ($self) = @_;
my @itemsObjects = ();
my $items = $self->session->db->read("select itemId from cartItems where cartId=?",[$self->getId]);
my $items = $self->session->db->read("select itemId from cartItem where cartId=?",[$self->getId]);
while (my ($itemId) = $items->array) {
push(@itemsObjects, $self->getItem($itemId));
}