[ic] Inconsistent order numbers - SOLVED

Dan Browning interchange-users@icdevgroup.org
Tue Apr 8 13:10:03 2003


At 09:14 AM 4/8/2003 -0400, you wrote:
>On Mon, 2003-04-07 at 22:04, Kevin Old wrote:
> > On Mon, 2003-04-07 at 17:45, Dan Browning wrote:
> > > At 05:06 PM 4/7/2003 -0400, you wrote:
> > > >Hello everyone,
> > > >
> > > >I am using the iTransact module in 4.9.7 and setting the following in
> > > >iTransact.pm
> > > >
> > > >my $company = $opt->{company} || "$::Variable->{COMPANY} Order
> > > >$opt->{order_id}";
> > > >         $Session->{mv_order_number} = $opt->{order_id};
> > > >
> > > >so that my order numbers in IC will match the ID that iTransact uses.
> > > >This was all working in 4.9.6 without any problems.  I have not changed
> > > >any routes or code.
> > > >
> > > >The 2 emails that are sent from IC have the iTransact order_id in the
> > > >mv_order_number field.  However the receipt.html page (calling for
> > > >[value mv_order_number] ) and everything printed in the
> > > >catalogdirectory/logs/log file and everything in the database is the
> > > >TEST000* number.
> > > >
> > > >I have already checked and turned off test mode.
> > > >
> > > >Can someone please shed some light on any changes made from 4.9.6 to
> > > >4.9.7 that would cause this?
> > > >
> > > >Thanks,
> > > >Kevin
> > >
> > > What version of 4.9.7?  If you are using CVS, a date would be handy 
> (like
> > > "03-04", etc.).  A change that Mike recently made in CVS was the 
> following
> > > (on Mar 29)...
> > >
> > > User:      heins
> > > Date:      2003-03-29 22:11:08 GMT
> > > Modified:  lib/Vend Order.pm
> > > Log:
> > > * Allow $Session->{mv_order_number} to be set anywhere.
> > >
> > > Revision  Changes    Path
> > > 2.47      +8 -2      interchange/lib/Vend/Order.pm
> > >
> > >
> > > rev 2.47, prev_rev 2.46
> > > Index: Order.pm
> > > ===================================================================
> > > RCS file: /var/cvs/interchange/lib/Vend/Order.pm,v
> > > retrieving revision 2.46
> > > retrieving revision 2.47
> > > diff -u -r2.46 -r2.47
> > > --- Order.pm    29 Mar 2003 20:19:20 -0000      2.46
> > > +++ Order.pm    29 Mar 2003 22:11:08 -0000      2.47
> > > @@ -1,6 +1,6 @@
> > >   # Vend::Order - Interchange order routing routines
> > >   #
> > > -# $Id: Order.pm,v 2.46 2003/03/29 20:19:20 mheins Exp $
> > > +# $Id: Order.pm,v 2.47 2003/03/29 22:11:08 mheins Exp $
> > >   #
> > >   # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
> > >   #
> > > @@ -28,7 +28,7 @@
> > >   package Vend::Order;
> > >   require Exporter;
> > >
> > > -$VERSION = substr(q$Revision: 2.46 $, 10);
> > > +$VERSION = substr(q$Revision: 2.47 $, 10);
> > >
> > >   @ISA = qw(Exporter);
> > >
> > > @@ -1581,6 +1581,12 @@
> > >                                  $shelf->{$_} = [ @$cart ];
> > >                                  push @main, $_;
> > >                          }
> > > +               }
> > > +
> > > +               if($Vend::Session->{mv_order_number}) {
> > > +                       $value_save->{mv_order_number} =
> > > +                               $::Values->{mv_order_number} =
> > > 
> +                                       $Vend::Session->{mv_order_number};
> > >                  }
> > >
> > >                  $Vend::Interpolate::Values = $::Values = { 
> %$value_save };
> > >
> >
> > Dan,
> >
> > Yes, I'm aware of those changes.  This is very weird though.  All of the
> > emails that have the mv_order_number in them are correct.  But the order
> > creation and receipt page show whatever the next number is in
> > order.number.
> >
> > I'll try to get the previous version of Order.pm and see if the problem
> > still happens.
> >
> > Is there a better place for me to set the order number so that I get the
> > order-id returned from iTransact?
> >
> > Any help is appreciated.
> >
> > Thanks,
> > Kevin
>
>Dan,
>
>Well, I was aware of those change and went and checked the version of
>the file in the CVS source directory I downloaded and it was 2.47 - the
>version Mike added the code so that mv_order_number could be set
>anywhere.  I got to thinking about it and just wanted to make sure I had
>the right version and I went to /usr/lib/interchange/lib/Vend and looked
>at the version of Order.pm in there and it was 2.45.  I copied the newer
>version over the old one and it works like a charm.  But, that doesn't
>explain why 2.45 was installed.  This was a fresh installation from the
>CVS source.
>
>Any ideas?
>
>
>Thanks,
>Kevin

Well, this is obviously the result of a stray gamma particle during your 
installation.  Remember to shield your computer with aluminum next time.

;-)

-Dan
--
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| Dan Browning, Kavod Technologies,      <dan.browning@kavod.com> |
| 6700 NE 162nd Ave, Suite 210, Vancouver, WA (360) 843-4074 x217 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
Put no trust in cryptic comments.