Name

ValuesDefault — define default user values

SYNOPSIS

name value...

DESCRIPTION

The directive sets default values in users' sessions. Values are otherwise kept in UserDB and they override the defaults, but when the user is not logged in (and hasn't set any of his preferences for the current session), those defaults will be used.

DIRECTIVE TYPE AND DEFAULT VALUE

Catalog directive

EXAMPLES

Example: Defining default values

Put the following in catalog.cfg:

ValuesDefault fname New lname User
ValuesDefault country HR

Create a test page:

Welcome!<br/>
Your first name is: [value fname]<br/>
Your last name is: [value lname]<br/>
Your country code is: [value country]

Example: Set default shipping mode

ValuesDefault mv_shipmode UPS

NOTES

AVAILABILITY

ValuesDefault is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 561

['ValuesDefault',   'hash',           ''],

Source: lib/Vend/Config.pm
Line 3188 (context shows lines 3188-3205)

sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
  return $HashDefaultBlank{$item} ? '' : {};
}

my $c;

if(defined $C) {
  $c = $C->{$item} || {};
}
else {
  no strict 'refs';
  $c = ${"Global::$item"} || {};
}

return hash_string($settings,$c);
}

AUTHORS

Interchange Development Group

SEE ALSO

ScratchDefault(7ic), value(7ic)

DocBook! Interchange!