[ic] impossible problem in receipt.html

Jon Jensen jon at endpoint.com
Thu Nov 8 18:35:16 EST 2007

On Thu, 8 Nov 2007, Tom wrote:

> I am seeing something I just can't explain in receipt.html
> [either][value city][or][value b_city][/either]
> is null, but but the correct value gets written to database via
> log_transaction (also [value city])
> other variables like state are working fine.  [cgi city] also null. 
> Sounds like a typo somewhere, but you would not believe how much time I 
> have spent looking for it.


In &Vend::Order::route_order, the main routine for processing the order 
routes, you'll find this happens before each route is run:

     my $value_save = { %{$::Values} };

and then after each route runs, this:

     $Vend::Interpolate::Values = $::Values = { %$value_save };

That keeps any order route from changing values space in a way that 
affects the rest of Interchange. It's also usually not what you'd expect.

My guess is that something in your log_transaction order route is setting 
values, which are put in the database, but then reset before you use them 
in your receipt page.

You could test this theory by storing your city in a scratch variable 
(since scratch isn't reset in routes like values are), and using that 
scratch variable on the receipt page.


Jon Jensen
End Point Corporation

More information about the interchange-users mailing list