Profile
Specify local configuration directive values
to be used by logged-in users who have a profile name set in their
"userdb.price_level" column.
Synopsis
|
Profile label Directive value
|
You can override multiple directives at once,
all attached to the same profile label,
by using the Perl-style "here document" and hash syntax,
as follows:
Profile label <<EOP
Directive => 'value',
AnotherDirective => 'another_value',
EOP
|
The label specifies the profile name that will be matched
against the value in the logged-in user's "userdb.price_level" column.
Scope
This directive is only available for use in the local
(catalog.cfg) configuration file.
It will not affect any other website in any way.
This directive will not work in the global
(interchange.cfg) configuration file.
Description
This facility allows the administrator to override configuration directives
for logged-in users,
depending upon the profile name set in the user's "userdb.price_level" column.
The "userdb" table name and "price_level" column names
are defaults that can be overridden using the UserDB
directive.
See the UserDB directive's "database" and
"pricing_field" parameters,
respectively.
This directive was designed to allow different users,
or classes of user,
to use different pricing schemes for products.
A simple setup for dealers versus ordinary customers
could look like the following in your website's "catalog.cfg" configuration file:
Profile dealer CommonAdjust <<EOP
pricing:w2,w5,w10,w25,w100:,
;:wholesale,
;:wholesale:mv_sku,
;$,
==:options
EOP
Profile default CommonAdjust <<EOP
pricing:q2,q5,q10,q25,q100:,
;:sale_price,
;:price,
;$,
:related,
==:options
EOP
CommonAdjust <<EOC
pricing:q2,q5,q10,q25,q100:,
;:sale_price,
;:price,
;$,
:related,
==:options
EOC
|
The above configuration sets up the following:
- Logged-in users who have "dealer" in their
"userdb.price_level" (or equivilent) column will make use of
the CommonAdjust directive set in the
"dealer" Profile.
- Users who have "default" in their
"userdb.price_level" (or equivilent) column will make use of
the CommonAdjust directive set in the
"default" Profile.
- Other users will not use either of the above Profiles,
and will therefore use the non-profile CommonAdjust
directive shown at the end of the example.
Note that the "default" profile uses the same
CommonAdjust settings as the non-profile version
of that directive.