This commit is contained in:
Matthew Wilson 2006-05-13 10:28:17 +00:00
parent 29d71af553
commit a20429127f

View file

@ -1350,11 +1350,11 @@ sub addCartVars {
$var->{cart.purchaseLoop} = [];
for (my $i = 0;$i < 25;$i++) {
my $purchase = {};
$purchase->{'purchase.purchaseId'} = $self->session->scratch->get("purchaseId".$i);
$purchase->{purchaseId} = $self->session->scratch->get("purchaseId".$i);
next unless $purchase->{purchaseId};
# so we don't show the badge we're currently editing
next if ($i eq $self->session->scratch->get("currentPurchaseCounter"));
my $theseRegs = $self->session->db->buildArrayRefOfHashRefs("select r.*, p.price, q.passId, q.passType from EventManagementSystem_registrations as r, EventManagementSystem_products as q, products as p where r.purchaseId=? and p.productId=r.productId and q.productId=r.productId",[$purchaseId]);
my $theseRegs = $self->session->db->buildArrayRefOfHashRefs("select r.*, p.price, q.passId, q.passType from EventManagementSystem_registrations as r, EventManagementSystem_products as q, products as p where r.purchaseId=? and p.productId=r.productId and q.productId=r.productId",[$purchase->{purchaseId}]);
my @currentEvents;
foreach (@$theseRegs) {
my ($isChild) = $self->session->db->quickArray("select prerequisiteId from EventManagementSystem_products where productId = ?",[$_->{productId}]);