Finally, we can add an event to the WebGUI Shopping Cart =)

This commit is contained in:
Roy Johnson 2006-02-03 23:16:57 +00:00
parent 86cd6179ab
commit 268ff54c30
3 changed files with 6 additions and 11 deletions

View file

@ -168,8 +168,7 @@ sub new {
$load = "use $cmd";
eval($load);
$session->errorHandler->warn("Item plugin failed to compile: $cmd.".$@) if($@);
#$plugin = eval($cmd."->new('$session', '$id', '$namespace')");
$plugin = eval($cmd->new($session, $id, $namespace));
$plugin = eval($cmd.'->new($session, "$id", "$namespace")');
$session->errorHandler->warn("Couldn't instantiate Item plugin: $cmd.".$@) if($@);
return $plugin;
}

View file

@ -6,17 +6,17 @@ our @ISA = qw(WebGUI::Commerce::Item);
#-------------------------------------------------------------------
sub available {
return $_[0]->{_event}->{available};
return $_[0]->{_event}->{approved};
}
#-------------------------------------------------------------------
sub description {
return $_[0]->{_event}{description};
return $_[0]->{_event}->{description};
}
#-------------------------------------------------------------------
sub id {
return $_[0]->{_event}{productId};
return $_[0]->{_event}->{productId};
}
#-------------------------------------------------------------------
@ -36,7 +36,7 @@ sub new {
$session = shift;
$eventId = shift;
my $eventData = $session->db->quickHashRef("select p.productId, p.title, p.description, p.price, e.available
my $eventData = $session->db->quickHashRef("select p.productId, p.title, p.description, p.price, e.approved
from EventManagementSystem_products as e, products as p
where p.productId = e.productId and p.productId=".$session->db->quote($eventId));