[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Unwanted session value shows in subsequent orders


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.

Regards
	Racke

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

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.