From cf2316f20489b2600a1f76ff85b815348d3e902f Mon Sep 17 00:00:00 2001 From: Matthew Wilson Date: Tue, 9 May 2006 13:08:46 +0000 Subject: [PATCH] backing out Roy's changes b/c there's no way it's going to be finished in the next 3 hours. --- .../Asset/Wobject/EventManagementSystem.pm | 39 ++----------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm index 7b7b84a23..3b103bdf8 100644 --- a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm +++ b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm @@ -2195,7 +2195,7 @@ sub www_saveRegistration { $details->{createdByUserId} = $self->session->var->get('userId') if ($addingNew && $userId ne '1'); $badgeId = $self->setCollateral("EventManagementSystem_badges", "badgeId",$details,0,0); - #my $shoppingCart = WebGUI::Commerce::ShoppingCart->new($self->session); + my $shoppingCart = WebGUI::Commerce::ShoppingCart->new($self->session); my @addingToPurchase = split("\n",$self->session->scratch->get('EMS_add_purchase_events')); # @addingToPurchase = () if ($self->session->scratch->get('EMS_add_purchase_badgeId') && !($self->session->scratch->get('EMS_add_purchase_badgeId') eq $badgeId)); @@ -2207,9 +2207,9 @@ sub www_saveRegistration { productId => $eventId, badgeId => $badgeId },0,0); - #$shoppingCart->add($eventId, 'Event'); + $shoppingCart->add($eventId, 'Event'); } - #$self->emptyScratchCart; + $self->emptyScratchCart; $self->session->scratch->delete('EMS_add_purchase_badgeId'); $self->session->scratch->delete('EMS_add_purchase_events'); @@ -2228,36 +2228,6 @@ sub www_saveRegistration { $u->profileField('email',$email); } #Our item plug-in needs to be able to associate these records with the result of the payment attempt - #my $counter = 0; - #while (1) { - # unless ($self->session->scratch->get("purchaseId".$counter)) { - # $self->session->scratch->set("purchaseId".$counter, $purchaseId); - # last; - # } - # $counter++; - #} - $self->session->scratch->set("purchaseId", $purchaseId); - - # Take them to the new badge edit screen - return $self->www_search; -} - -#------------------------------------------------------------------- -# -# This method will be called by www_search from it's badge edit mode to put the events making up the badge into their commerce cart. -# -sub addBadgeToCart { - my $self = shift; - my $purchaseId = $self->session->scratch->get("purchaseId"); - my $eventsInBadge = $self->getEventsInScratchCart; - my $shoppingCart = WebGUI::Commerce::ShoppingCart->new($self->session); - - foreach my $eventId (@$eventsInBadge) { - $shoppingCart->add($eventId, 'Event'); - } - - $self->emptyScratchCart; - my $counter = 0; while (1) { unless ($self->session->scratch->get("purchaseId".$counter)) { @@ -2265,8 +2235,7 @@ sub addBadgeToCart { last; } $counter++; - } - + } return $self->www_view; }