[ic] Unwanted session value shows in subsequent orders

Stefan Hornburg (Racke) racke at linuxia.de
Mon Aug 13 14:34:47 EDT 2007

Brian Hefferan wrote:
> I'm setting up a customer comments/notes field in a shopping cart
> based on the IC 5.4.2 foundation demo. The field does work after
> adding a textarea box named "gift_notes" to finalize.html. The data
> gets stored in the comments field in the transactions database and
> shows up correctly in the receipts and reports.
> The problem is that if the same customer starts another order before
> the session expires, his/her previous order's comments show up again
> in the the the new order's comments texarea tbox.
> What's a good way to make sure the comment/notes field defaults to
> blank for subsequent orders? I tried [calc
> $Vend::Session->{'values'}{'gift_note'} = '';[/calc] in
> /etc/mail_receipt and a few other places, but I haven't managed to get
> the value cleared in the session file.

The correct code to delete is:

[calc] $Values->{gift_note} = ''; [/calc]

Also you cannot clear the variable in mail_receipt, as the Values hash
is restored after route processing.

I usually check some CGI variable before the form and clear the Value
entry if the CGI variable is missing.


LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team

More information about the interchange-users mailing list