[interchange-cvs] interchange - kwalsh modified lib/Vend/Cart.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Sun Feb 10 20:09:04 EST 2008


User:      kwalsh
Date:      2008-02-11 01:09:04 GMT
Modified:  lib/Vend Cart.pm
Log:
    * I posted an incomplete patch, which has been completed now.  The
      cache was not being written, so the lookups were being performed
      anyway.  Oops.

Revision  Changes    Path
2.22      +4 -4      interchange/lib/Vend/Cart.pm


rev 2.22, prev_rev 2.21
Index: Cart.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Cart.pm,v
retrieving revision 2.21
retrieving revision 2.22
diff -u -r2.21 -r2.22
--- Cart.pm	11 Feb 2008 01:04:12 -0000	2.21
+++ Cart.pm	11 Feb 2008 01:09:04 -0000	2.22
@@ -1,6 +1,6 @@
 # Vend::Cart - Interchange shopping cart management routines
 #
-# $Id: Cart.pm,v 2.21 2008/02/11 01:04:12 kwalsh Exp $
+# $Id: Cart.pm,v 2.22 2008/02/11 01:09:04 kwalsh Exp $
 #
 # Copyright (C) 2002-2007 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -25,7 +25,7 @@
 
 package Vend::Cart;
 
-$VERSION = substr(q$Revision: 2.21 $, 10);
+$VERSION = substr(q$Revision: 2.22 $, 10);
 
 use strict;
 
@@ -225,7 +225,7 @@
 						$col = $tab;
 						$tab = $item->{mv_ib} || $Vend::Cfg->{ProductFiles}[0];
 					}
-					$item->{mv_min_quantity} = $quantity_cache{"$tab.$col.$item->{code}"} || ::tag_data($tab, $col, $item->{code})
+					$item->{mv_min_quantity} = $quantity_cache{"$tab.$col.$item->{code}"} || ($quantity_cache{"$tab.$col.$item->{code}"} = ::tag_data($tab, $col, $item->{code}))
 											 || '';
 				}
 
@@ -258,7 +258,7 @@
 						$col = $tab;
 						$tab = $item->{mv_ib} || $Vend::Cfg->{ProductFiles}[0];
 					}
-					$item->{mv_max_quantity} += $quantity_cache{"$tab.$col.$item->{code}"} || ::tag_data($tab, $col, $item->{code});
+					$item->{mv_max_quantity} += $quantity_cache{"$tab.$col.$item->{code}"} || ($quantity_cache{"$tab.$col.$item->{code}"} = ::tag_data($tab, $col, $item->{code}));
 				}
 				$item->{mv_max_quantity} -= $total_quantity{$item->{code}};
 				$item->{mv_max_quantity} = 0 if $item->{mv_max_quantity} < 0;








More information about the interchange-cvs mailing list