[ic] HELP !! Problem with "[history-scan%20exclude=nothing]"

Jonathan Clark interchange-users@interchange.redhat.com
Mon Mar 18 12:45:01 2002


> Ic 4.8.3
> Catalog URL      http://ferranferrer.com/~ferranfe/cgi-bin/cart.cgi
> Secure URL      http://ferranferrer.com/~ferranfe/cgi-bin/cart.cgi
> Location of Error Logs      Global:
> /usr/local/cpanel/3rdparty/interchange/error.log
> Local: error.log
> Active sessions      Show active sessions
> (last 60 minutes)
> Last order number      TEST0000

ok. 4.8.3

Please can you check for the history-scan tag definition in catalog.cfg.

I have included it below for your reference. It should be almost at the
bottom of the file.

Please also look in the error.log file at around 4:41am when the server
daemon was restarted.

Jonathan
Webmaint.

====

# Deal with customer click history. For example, after adding an item to
# the cart, the user can return to a specific search results page.
History 10
UserTag history-scan Order find exclude default
UserTag history-scan addAttr
UserTag history-scan Routine <<EOR
my %var_exclude = ( qw/
	mv_credit_card_number 1
	mv_pc                 1
	mv_session_id         1
/);
sub {
	my ($find, $exclude, $default) = @_;
	my $ref = $Vend::Session->{History}
		or return $Tag->area($default || $Config->{SpecialPage}{catalog});
	my ($hist, $href, $cgi);
	$exclude = qr/$exclude/ if $exclude;
	for(my $i = $#$ref; $i >= 0; $i--) {
		#Log("checking $ref->[$i][0] for $exclude");
		next if $ref->[$i][0] eq 'expired';
		if ($exclude and $ref->[$i][0] =~ $exclude) {
			next;
		}
		if($find) {
			next unless $ref->[$i][0] =~ /$find/;
		}
		($href, $cgi) = @{$ref->[$i]};
		last;
	}
	return $Tag->area($default || $Config->{SpecialPage}{catalog})
		if ! $href;
	my $form = '';
	for(grep !$var_exclude{$_}, keys %$cgi) {
		$form .= "\n$_=";
		$form .= join("\n$_=", split /\0/, $cgi->{$_});
	}
	return $Tag->area( { href => $href, form => $form} );
}
EOR7