From a76fc98f197dfa6d8522b6678eadb9ae09870b1b Mon Sep 17 00:00:00 2001 From: Matthew Wilson Date: Tue, 9 May 2006 15:00:22 +0000 Subject: [PATCH] make a copy of normal --- lib/WebGUI/Operation/Commerce.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Operation/Commerce.pm b/lib/WebGUI/Operation/Commerce.pm index f2d314212..4161ebc09 100644 --- a/lib/WebGUI/Operation/Commerce.pm +++ b/lib/WebGUI/Operation/Commerce.pm @@ -359,7 +359,7 @@ sub www_checkoutSubmit { $plugin = WebGUI::Commerce::Payment->load($session, $session->scratch->get('paymentGateway')); $shoppingCart = WebGUI::Commerce::ShoppingCart->new($session); ($normal, $recurring) = $shoppingCart->getItems; - + my @copyOfNormal = @$normal; # Check if shoppingcart contains any items. If not the user probably clicked reload, so we redirect to the current page. unless (@$normal || @$recurring) { $session->http->setRedirect($session->url->page); @@ -394,7 +394,7 @@ sub www_checkoutSubmit { # situations. $amount += ($_->{item}->{priceLineItem}) # pass in the quantity and the normal items in the cart. - ?($_->{item}->priceLineItem($_->{quantity},$normal)) + ?($_->{item}->priceLineItem($_->{quantity},\@copyOfNormal)) :($_->{item}->price * $_->{quantity}); $var->{purchaseDescription} .= $_->{quantity}.' x '.$_->{item}->name.'
'; }