[interchange-cvs] interchange - jon modified 25 files

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Fri Sep 7 01:55:02 2001


User:      jon
Date:      2001-09-07 05:54:55 GMT
Added:     dist/foundation/config/init.d default_db.cfg
Added:              downloadable_goods.cfg foundation_style.cfg
Added:              get_password.cfg local.cfg locale.cfg logging.cfg
Added:              mysql.cfg oracle.cfg order_route.cfg page.cfg
Added:              paths.cfg payroute.cfg pgsql.cfg pricing.cfg
Added:              productfiles.cfg secperm.cfg shipping.cfg
Added:              static.cfg taxing.cfg taxing_simple.cfg
Added:              taxing_vat.cfg userdefaults.cfg variabledb.cfg
Added:              version.cfg
Log:
Add new SysV-style configuration files.

Revision  Changes    Path
1.1                  interchange/dist/foundation/config/init.d/default_db.cfg


rev 1.1, prev_rev 1.0
Index: default_db.cfg
===================================================================
#
# position: 10
# description: All-DBM definitions for Interchange standard DB
# provides: database
# conflicts: database
#

Message -i -n Using default DBM database...

include dbconf/default_db/*.dbm



1.1                  interchange/dist/foundation/config/init.d/downloadable_goods.cfg


rev 1.1, prev_rev 1.0
Index: downloadable_goods.cfg
===================================================================
#
# position: 92
# description: Allow delivery of soft goods (downloadable files)
#

ActionMap  deliver   <<EOR
sub {
	my $deliverable = shift;
	$Scratch->{deliverable} = $CGI->{mv_arg};
	$CGI->{mv_nextpage} = 'deliver';
	if(! $Session->{username} and $CGI->{mv_username}) {
		$Tag->userdb('login');
	}
	return 1;
}
EOR



1.1                  interchange/dist/foundation/config/init.d/foundation_style.cfg


rev 1.1, prev_rev 1.0
Index: foundation_style.cfg
===================================================================
#
# position: 60
# description: Foundation catalog style includes
#

ifndef STYLE
Variable STYLE default
endif

include templates/__STYLE__/theme.cfg



1.1                  interchange/dist/foundation/config/init.d/get_password.cfg


rev 1.1, prev_rev 1.0
Index: get_password.cfg
===================================================================
#
# position: 83
# description: ActionMap to have passwords mailed to customers
#

ActionMap  get_password   <<EOR
sub {
	$Config->{NoSearch} = '';
	$CGI->{mv_nextpage} = $CGI->{mv_search_page} = 'action/get_password';
	$CGI->{mv_todo} = 'search';
	$Tag->update('process');
	return 1;
}
EOR



1.1                  interchange/dist/foundation/config/init.d/local.cfg


rev 1.1, prev_rev 1.0
Index: local.cfg
===================================================================
#
# position: 99
# description: User additions after all others (except catalog_after.cfg)
#

# Pricing setup
#
# If the user is logged in and is marked as a "dealer" (1 in the dealer
# field in the userdb database) then they are given quantity discounts
# based on price groups. (All products except gift_cert are in price group
# 1 as distributed.) If the quantity is 1, then pricing comes from the
# "wholesale" field in the products database.

AutoModifier pricing:price_group

# If the user is not a dealer (or not logged in) then pricing just comes
# from "price". Any quantity discounts will be set in the qN fields in the
# database, and are separate from dealer quantity discounts.
# 
# The "gift_cert" AutoModifier allows special receipt, basket, and checkout
# display handling for items defined as a gift_cert. FractionalItems is
# required if you want to have non-even-dollar prices.

AutoModifier gift_cert
FractionalItems Yes

Profile dealer <<EOR
{ 
	CommonAdjust => <<EOF,

		pricing:w5,w10:,
		;:wholesale,
		;:wholesale:mv_sku,
		;$,
		==:options
EOF
	NonTaxableField => 'nontaxable',
}
EOR

Profile distributor <<EOR
{ 
	CommonAdjust => <<EOF,

		pricing:w5,w10:,
		;:wholesale,
		;:wholesale:mv_sku,
		;$,
		==:options,
		-10%
EOF
	NonTaxableField => 'nontaxable',
}
EOR

Profile default CommonAdjust   "pricing:price_group,q5,q10 :sale_price, ;:price, ;$, ==:options"
Profile default NonTaxableField 
Profile default PriceField 0

CommonAdjust   :sale_price, ;:price, ;$, ==:options
PriceField     0


Replace ProductFiles
ProductFiles   products options



1.1                  interchange/dist/foundation/config/init.d/locale.cfg


rev 1.1, prev_rev 1.0
Index: locale.cfg
===================================================================
#
# position: 25
# description: Locale call-outs and database
#

# Last locale specified is the default.
Locale          en_US LC_CTYPE C
LocaleDatabase  locale



1.1                  interchange/dist/foundation/config/init.d/logging.cfg


rev 1.1, prev_rev 1.0
Index: logging.cfg
===================================================================
#
# position: 05
# description: Set up log files/directories
#
# These settings allow finer control over where logs, session, and
# temporary files go. Many people want them on another partition so
# that if they fill up, it won't adversely affect the rest of the
# system.

ParseVariables  Yes

ifdef LOGDIR
ErrorFile       __LOGDIR__/error.log
AsciiTrack      __LOGDIR__/tracking.asc
TrackFile       __LOGDIR__/usertrack
endif

ifndef LOGDIR
AsciiTrack      logs/tracking.asc
TrackFile       logs/usertrack
endif

ifdef CACHEDIR
SessionDatabase __CACHEDIR__/session
ScratchDir      __CACHEDIR__/tmp
endif

ifndef CACHEDIR
SessionDatabase session
ScratchDir      tmp
endif

ifdef UI_TRAFFIC_STATS
TrackFile __UI_TRAFFIC_STATS__
endif



1.1                  interchange/dist/foundation/config/init.d/mysql.cfg


rev 1.1, prev_rev 1.0
Index: mysql.cfg
===================================================================
#
# position: 10
# description: MySQL and DBM definitions for Interchange standard DB
# provides: database
# conflicts: database
#

Require module DBI
Require module DBD::mysql

Message -i -n Using MySQL, DSN=__SQLDSN__...
 
# These variables are usually set in variable.txt now, but
# you can uncomment these lines and set them here if needed.
#Variable  SQLUSER  foo
#Variable  SQLPASS  bar
 
# Include each table definition from its separate file.
include dbconf/mysql/*.mysql

# We still use DBM for certain small tables.
include dbconf/mysql/*.dbm

# Tell the default DBM we are using something else.
Variable SOME_DATABASE 1



1.1                  interchange/dist/foundation/config/init.d/oracle.cfg


rev 1.1, prev_rev 1.0
Index: oracle.cfg
===================================================================
#
# position: 10
# description: Oracle and DBM definitions for Interchange standard DB
# provides: database
# conflicts: database
#

Require module DBI
Require module DBD::Oracle

Message -i -n Using Oracle, DSN=__SQLDSN__...
 
# These variables are usually set in variable.txt now, but
# you can uncomment these lines and set them here if needed.
#Variable  SQLUSER  foo
#Variable  SQLPASS  bar
 
# Oracle considers 'session', 'size', and 'comment' to be reserved
# words. Since we use those as column names, attach this arbitrary
# string to the end of each word to make it acceptable to Oracle.
# Note that this must be defined before the include below.
Variable  FIELDMUNGE  __MVC_FIELDMUNGE__

# Include each table definition from its separate file.
include dbconf/oracle/*.ora

# We still use DBM for certain small tables.
include dbconf/oracle/*.dbm

# Tell the default DBM we are using something else.
Variable SOME_DATABASE 1



1.1                  interchange/dist/foundation/config/init.d/order_route.cfg


rev 1.1, prev_rev 1.0
Index: order_route.cfg
===================================================================
#
# position: 88
# description: Order routing information
# url: http://interchange.redhat.com/cgi-bin/ic/dev/icdatabase_57.html
#

ParseVariables Yes

# Default PGP/GPG key ID for encryption.
# Can be email address (if unique on keyring) or the key ID.
#
# Examples:
# 
# EncryptKey   milton@minivend.com
#   or
# EncryptKey   0x7862F42D
#EncryptKey   NOT_SET

# This prevents a user from setting this value, you may want to unset
# this if you have user-selectable handling charges like insurance.
FormIgnore   mv_handling

# Along these lines further, for better integrity and less chance of a 
# user screwing up your order routes:
# Note that __ORDER_ROUTES__ is empty by default, default Route "default"
# is used with cascades.
FormIgnore   mv_order_route 

# This is the default, but the real destination is usually set in the order
# route....
MailOrderTo  __ORDERS_TO__

# This route places the order entry in the database. If you don't
# have an inventory table (or a userdb table for that matter) make
# sure you remove it from the list of "transactions" tables.
Route log  <<EOF
	empty        1
	encrypt      0
	increment    0
	report       etc/log_transaction
	supplant     0
	track        logs/log
EOF

# This route places the order entry in the database when you are
# entering an order from the admin. See above.
Route log_entry  <<EOF
	empty        1
	encrypt      0
	report       etc/log_entry
	supplant     0
	track        logs/log
EOF

Variable TRANSACTION_TABLES userdb orderline transactions
ifdef TRANSACTION_TABLES
Route log       transactions '__TRANSACTION_TABLES__'
Route log_entry transactions '__TRANSACTION_TABLES__'
endif

# This route copies the user if they requested that. We don't
# care (much) if it fails, so error_ok is set and failure will
# not cause the order to fail.
Route copy_user  <<EOF
	empty        1
	error_ok     1
	encrypt      0
	increment    0
	report       etc/mail_receipt
	supplant     0
	track        logs/log
EOF

# This route emails the order to you unless email is set to "",
# and failsafe-logs the order report a couple of places.
Route main  <<EOF
	attach            0
	credit_card       1
	default           1
	email             '__ORDERS_TO__'
	encrypt           0
	errors_to         '__ORDERS_TO__'
	receipt           etc/receipt.html
	report            etc/report
	supplant          1
	individual_track  orders
	track             logs/tracking.asc
EOF

# Order routes can be maintained in a database
# CHANGES TO THIS WILL OVERRIDE THE ROUTES ABOVE.
RouteDatabase   route

# Default route is run if no routes set, this should be last Route
# always
Route   default   master          1
Route   default   cascade         "log main copy_user"
Route   default   empty           1
Route   default   supplant        1
Route   default   email           '__ORDERS_TO__'

## Uncomment this if you want Routes read dynamically from DB
#Route   default   dynamic_routes  1
## Uncomment this if you want ITL allowed in routes
#Route   default   expandable      1


# Determines default for cart placement, can be overridden by form param
SeparateItems   Yes

# Default counter file for order number
OrderCounter    etc/order.number


# Where order and login profiles go
OrderProfile    etc/profiles.order etc/profiles.login etc/profiles.misc



1.1                  interchange/dist/foundation/config/init.d/page.cfg


rev 1.1, prev_rev 1.0
Index: page.cfg
===================================================================
#
# position: 18
# description: Various page settings and pragmas
#

SpecialPage  catalog  index
SpecialPage  report   ../etc/report
SpecialPage  receipt  ../etc/receipt

# Sets Interchange to not parse <BODY MV="body 1"> and other tags within
# HTML tags. Use [pragma no_html_parse 0] to enable on an individual page.
Pragma  no_html_parse

# Strip whitespace from top of pages so you don't have to scroll down
# before the HTML starts when doing 'view source' in a browser.
Pragma  strip_white

# Number of past URLs to store for history
History 10



1.1                  interchange/dist/foundation/config/init.d/paths.cfg


rev 1.1, prev_rev 1.0
Index: paths.cfg
===================================================================
# 
# position: 20
# description: Set up catalog URLs (cgi and image)
#

ParseVariables  Yes

# The URLs which are written to refer back to our catalog.
VendURL    http://__SERVER_NAME____CGI_URL__
SecureURL  __SECURE_SERVER____CGI_URL__

ifndef SECURE_ENABLE
SecureURL  http://__SERVER_NAME____CGI_URL__
endif

# Set the image path for relative images
ImageDir          __IMAGE_DIR__/
ImageDirInternal  http://__SERVER_NAME____IMAGE_DIR__/



1.1                  interchange/dist/foundation/config/init.d/payroute.cfg


rev 1.1, prev_rev 1.0
Index: payroute.cfg
===================================================================
#
# position: 44
# description: Payment route information (real-time processors)
#

# These routes are not order routes, but payment routes
Route  authorizenet  id           "__AUTHNET_ID__"
Route  authorizenet  secret       "__AUTHNET_SECRET__"
Route  authorizenet  host         "__AUTHNET_HOST__"
Route  authorizenet  referer      "__AUTHNET_REFERER__"

Route  cybercash     configfile   "__CYBER_CONFIGFILE__"

Route  itransact     id           "__ITRANSACT_ID__"

Route  signio        id           "__SIGNIO_ID__"
Route  signio        secret       "__SIGNIO_SECRET__"
Route  signio        partner      "__SIGNIO_PARTNER__"
Route  signio        vendor       "__SIGNIO_VENDOR__"
Route  signio        host         "__SIGNIO_SERVER__"

Route  skipjack      id           "__SKIPJACK_ID__"
Route  skipjack      partner      "__SKIPJACK_PARTNER__"



1.1                  interchange/dist/foundation/config/init.d/pgsql.cfg


rev 1.1, prev_rev 1.0
Index: pgsql.cfg
===================================================================
#
# position: 10
# description: PostgreSQL and DBM definitions for Interchange standard DB
# provides: database
# conflicts: database
#

Require module DBI
Require module DBD::Pg

Message -i -n Using PostgreSQL, DSN=__SQLDSN__...
 
# These variables are usually set in variable.txt now, but
# you can uncomment these lines and set them here if needed.
#Variable  SQLUSER  foo
#Variable  SQLPASS  bar
 
# Include each table definition from its separate file.
include dbconf/pgsql/*.pgsql

# We still use DBM for certain small tables.
include dbconf/pgsql/*.dbm

# Tell the default DBM we are using something else.
Variable SOME_DATABASE 1



1.1                  interchange/dist/foundation/config/init.d/pricing.cfg


rev 1.1, prev_rev 1.0
Index: pricing.cfg
===================================================================
# 
# position: 80
# description: Simple pricing with sale price and simple option adjustment
# provides: pricing
# 

PriceField      0
CommonAdjust    :sale_price, ;:price, ;$, ==:options



1.1                  interchange/dist/foundation/config/init.d/productfiles.cfg


rev 1.1, prev_rev 1.0
Index: productfiles.cfg
===================================================================
#
# position: 12
# description: Set ProductFiles and other DB metainformation
# provides: productfiles
#

ProductFiles  products



1.1                  interchange/dist/foundation/config/init.d/secperm.cfg


rev 1.1, prev_rev 1.0
Index: secperm.cfg
===================================================================
#
# position: 22
# description: Various security/permission settings
#

AlwaysSecure    ord/checkout login change_password

# Set this if you have a different secure server
#AlwaysSecure   order ord/checkout ord/basket login change_password process

# Allow others in our group to read/write files by default
ReadPermission  group
WritePermission group

# If a specific user session accesses our catalog more than this many times
# in a 30-second time period. If the limit is exceeded, the LockoutCommand
# (if set) is executed. Set this to 0 if you're getting links to 127.0.0.1
# during your testing.
RobotLimit  100

# Limit the number of items in the cart, usually robots are the only
# things that order this many line items
OrderLineLimit  200



1.1                  interchange/dist/foundation/config/init.d/shipping.cfg


rev 1.1, prev_rev 1.0
Index: shipping.cfg
===================================================================
# 
# position: 81
# description: Shipping really defined in products/shipping.asc
# 

ValuesDefault   mv_shipmode   __SHIP_DEFAULT_MODE__



1.1                  interchange/dist/foundation/config/init.d/static.cfg


rev 1.1, prev_rev 1.0
Index: static.cfg
===================================================================
#
# position: 19
# description: Static page build settings
#

NoCache  <<EOF
	admin
	login
	account
	logout
	config
	multi
	ord/basket
	ord/checkout
	query
	reconfig
	special
EOF

Static        __CATALOG_STATIC__
StaticLogged  __LOGGED_STATIC__
StaticAll     Yes
StaticDBM     static
StaticDepth   2
StaticDir     __SAMPLEHTML__/pages
StaticFly     Yes
StaticPath    __SAMPLEURL__/pages



1.1                  interchange/dist/foundation/config/init.d/taxing.cfg


rev 1.1, prev_rev 1.0
Index: taxing.cfg
===================================================================
#
# position: 82
# description: Taxing mode for US, simple one/two state
# provides: tax
#

SalesTax        __TAXFIELD__
TaxShipping     __TAXSHIPPING__



1.1                  interchange/dist/foundation/config/init.d/taxing_simple.cfg


rev 1.1, prev_rev 1.0
Index: taxing_simple.cfg
===================================================================
#
# position: 82
# description: Taxing mode for US, simple one/two state
# provides: tax
#

SalesTax        __TAXFIELD__
TaxShipping     __TAXSHIPPING__



1.1                  interchange/dist/foundation/config/init.d/taxing_vat.cfg


rev 1.1, prev_rev 1.0
Index: taxing_vat.cfg
===================================================================
#
# position: 82
# description: Taxing mode for Europe, VAT derived from country database
# provides: tax
#

SalesTax        multi



1.1                  interchange/dist/foundation/config/init.d/userdefaults.cfg


rev 1.1, prev_rev 1.0
Index: userdefaults.cfg
===================================================================
#
# position: 32
# description: User defaults -- session and userdb
#

# User session related settings.

ScratchDefault  mv_add_dot_html   1
ScratchDefault  mv_no_session_id  1
ScratchDefault  mv_no_count       1
ValuesDefault   country           __SHIP_DEFAULT_COUNTRY__

# Whether to encrypt passwords in UserDB
# We usually don't for users, so we can mail them their password
# We DO in admin, that is set in catalog_after.cfg
UserDB    default    crypt         0

# Change a field to something that doesn't conflict in MySQL
UserDB    default    time_field    mod_time

# Don't want people setting their credit limit or dealer status directly
UserDB    default    scratch       "dealer price_level credit_limit"

# minimal login stuff for affiliate
UserDB    affiliate  user_field    affiliate
UserDB    affiliate  database      affiliate
UserDB    affiliate  time_field    none
UserDB    affiliate  crypt         0

# Set this to No if you don't want auto-login capability for users
CookieLogin  Yes



1.1                  interchange/dist/foundation/config/init.d/variabledb.cfg


rev 1.1, prev_rev 1.0
Index: variabledb.cfg
===================================================================
#
# position: 02
# description: Bring in variables for init
#

VariableDatabase variable



1.1                  interchange/dist/foundation/config/init.d/version.cfg


rev 1.1, prev_rev 1.0
Index: version.cfg
===================================================================
#
# position: 00
# description: Determine catalog skeleton version and type
#

Require module Digest::MD5    "Need %s %s for better cache keys."
Require module Safe::Hole
Require module SQL::Statement

Require UserTag   email email_raw var loc table_editor button

Variable  IC_SKELETON_TYPE       foundation
Variable  IC_FOUNDATION_VERSION  0.01