This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
/
catalog.cfg
464 lines (405 loc) · 14.3 KB
/
catalog.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
# Define the site-specific information
#
Variable SERVER_NAME __MVC_SERVERNAME__
Variable CGI_URL __MVC_CGIURL__
Variable SECURE_SERVER http://__MVC_SERVERNAME__
Variable ORDERS_TO __MVC_MAILORDERTO__
Variable IMAGE_DIR __MVC_IMAGEURL__
Variable DOCROOT __MVC_DOCUMENTROOT__
Variable SAMPLEHTML __MVC_SAMPLEHTML__
Variable SAMPLEURL __MVC_SAMPLEURL__
Variable TEMPLATE __MVC_TEMPLATE__
Variable COMPANY __MVC_COMPANY__
Variable ADDRESS __MVC_ADDRESS__
Variable CITY __MVC_CITY__
Variable PHONE __MVC_PHONE__
Variable TOLLFREE __MVC_TOLLFREE__
Variable FAX __MVC_FAX__
Variable LOGO __MVC_LOGO__
Variable SMLOGO __MVC_SMLOGO__
Variable ENCRYPTOR __MVC_ENCRYPTOR__
Variable TAXAREA __MVC_TAXAREA__
Variable TAXRATE __MVC_TAXRATE__
Variable TAXSHIPPING __MVC_TAXSHIPPING__
Variable MULTIORDER __MVC_MULTIORDER__
# Set single-page order style
Variable ORDER_STYLE ord
# Set multi-page order style if MULTIORDER variable set
#ifdef MULTIORDER
Variable ORDER_STYLE multi
#endif
## END SITE CONFIGURATION
## Whether to encrypt passwords in UserDB
UserDB default crypt __MVC_CRYPTPW__0
## Change a field to something that doesn't conflict in MySQL
UserDB default time_field mod_time
#ifdef TEMPLATE eq 'brown1'
Variable BARBG MAROON
Variable BARTEXT #FFFFFF
Variable BODY BGCOLOR=WHITE LINK=BLACK
Variable CONTRAST RED
Variable HEADERBG BGCOLOR=#C6A563
Variable HEADERTEXT MAROON
Variable LINECOLOR #000000
Variable TABLEFG BGCOLOR=#E3D5B5
Variable TITLEBG NAVY
Variable TITLETEXT #FFFFFF
Variable TOPCOLOR #F22B34
Variable TOPTEXT YELLOW
#endif
#ifdef TEMPLATE eq 'blue1'
Variable BARBG #FF6701
Variable BARTEXT #FFFFFF
Variable BODY BGCOLOR=WHITE LINK=BLACK
Variable CONTRAST RED
Variable HEADERBG BGCOLOR=#4F87CB
Variable HEADERTEXT #CCFF99
Variable LINECOLOR #000000
Variable TABLEFG BGCOLOR=LIGHTBLUE
Variable TITLEBG NAVY
Variable TITLETEXT #FFFFFF
Variable TOPCOLOR #F22B34
Variable TOPTEXT YELLOW
#endif
#ifdef TEMPLATE eq 'yellow1'
Variable BARBG #000000
Variable BARTEXT #FFFFFF
Variable BODY BGCOLOR=WHITE LINK=BLACK
Variable CONTRAST RED
Variable HEADERBG BGCOLOR=#FFE88D
Variable HEADERTEXT #000000
Variable LINECOLOR #000000
Variable TABLEFG BGCOLOR=MOCCASIN
Variable TITLEBG #000000
Variable TITLETEXT #FFFFFF
Variable TOPCOLOR #F22B34
Variable TOPTEXT YELLOW
#endif
## Set some menubars and headers
## Use [include ...] with low traffic settings (from minivend.cfg)
## Put in memory with high traffic settings (from minivend.cfg)
ParseVariables Yes
# Better performance this way
#ifdef @TRAFFIC =~ /high/i
ConfigDir config/__TEMPLATE__
Variable TIMED_CATOPT [timed-build minutes=10 file=tmp/catoptions]
Variable TIMED_CATLIST [timed-build minutes=10 file=tmp/catlist]
Variable END_TIMED [/timed-build]
Variable LEFTSIDE <leftside
Variable RIGHTSIDE <rightside
Variable NO_RIGHT <no_right
Variable MENUBAR <menubar
Variable MENUBOTTOM <menubottom
Variable ONLYLOGO <only_logo
Variable LOGOBAR <logobar
Variable COPYRIGHT <copyright
ConfigDir config
#endif
# template changes show up immediately this way
#ifdef @TRAFFIC =~ /low/i
Variable LEFTSIDE [include config/__TEMPLATE__/leftside]
Variable RIGHTSIDE [include config/__TEMPLATE__/rightside]
Variable NO_RIGHT [include config/__TEMPLATE__/no_right]
Variable MENUBAR [include config/__TEMPLATE__/menubar]
Variable MENUBOTTOM [include config/__TEMPLATE__/menubottom]
Variable ONLYLOGO [include config/__TEMPLATE__/only_logo]
Variable LOGOBAR [include config/__TEMPLATE__/logobar]
Variable COPYRIGHT [include config/__TEMPLATE__/copyright]
#endif
ScratchDefault mv_add_dot_html 1
ScratchDefault mv_no_session_id 1
ScratchDefault mv_no_count 1
ScratchDefault order_style 1
ValuesDefault mv_shipmode upsg
ParseVariables Yes
# Sets Minivend to not parse <BODY MV="body 1"> and other tags within
# HTML tags, use [pragma no_html_parse 0] to enable on a page
Pragma no_html_parse
MailOrderTo __ORDERS_TO__
VendURL http://__SERVER_NAME____CGI_URL__
SecureURL __SECURE_SERVER____CGI_URL__
Variable SOMESQL __MVC_MYSQL____MVC_PGSQL__
Variable MYSQL __MVC_MYSQL__
Variable PGSQL __MVC_PGSQL__
#ifndef SOMESQL
Database area area.txt TAB
Database area AUTO_NUMBER 1
Database cat cat.txt TAB
Database country country.txt TAB
Database inventory inventory.txt TAB
Database products products.txt TAB
Database pricing pricing.txt TAB
Database pricing KEY sku
Database pricing NUMERIC q2
Database products HOT 1
Database products INDEX category:c
Database shipping shipping.txt TAB
Database shipping AUTO_NUMBER 1
Database orderline orderline.txt TAB
Database transactions transactions.txt TAB
Database userdb userdb.txt TAB
#endif
#ifdef MYSQL
Variable SQLDSN dbi:mysql:test_minivend
Message <<EOF
Using MySQL for databases, DSN=__SQLDSN__.
EOF
# Uncomment if needed
#Variable SQLUSER foo
#Variable SQLPASS bar
# The tables are in separate files in the mysql directory
#include mysql/*
#endif
#ifdef PGSQL
Variable SQLDSN dbi:Pg:dbname=test_minivend
Message <<EOF
Using PostgreSQL for databases, DSN=__SQLDSN__.
EOF
# Uncomment if needed
#Variable SQLPASS foo
#Variable SQLUSER bar
# The tables are in separate files in the mysql directory
#include pgsql/*
#endif
# We are always keeping these in DBM, can be in SQL if you wish
Variable MINIMATE_META mv_metadata
Variable MINIMATE_TABLE minimate
Database minimate minimate.asc TAB
Database mv_metadata mv_metadata.asc TAB
Database banner banner.txt TAB
Database banner NUMERIC weight
Database locale locale.txt TAB
Database 2ndDayAir 2ndDayAir.csv CSV
Database Ground Ground.csv CSV
Database NextDayAir NextDayAir.csv CSV
ProductFiles products
AlwaysSecure ord/checkout multi/checkout
AsciiTrack etc/tracking.asc
CommonAdjust pricing:q2,q5,q10,q25,q100, ;products:price, ;$ ==color:pricing, ==size:pricing
# Here is one that sets up "Mix and match" based upon the price_group field
# in the "pricing" database.
#CommonAdjust pricing:price_group,q2,q5,q10,q25,q100, ;products:price, ;$ ==color:pricing, ==size:pricing
CookieLogin Yes
# This sets up the new payment charge mode in MiniVend 4
# You set it to "custom name", where name is the name of a GlobalSub
# that performs the charge operation. If it is not "custom", then
# it will use the CyberCash routines.
#
# "minivend_test" is special, and the demo order profile
# works with the demo order form to test
#
#Variable MV_PAYMENT_MODE minivend_test
# Uncomment to use creditCardAuto if you want, now handled better in
# order profiles with "&credit_card=standard".
#CreditCardAuto Yes
# These are usually all you need for CyberCash 3
# Uncomment and edit to suit; make sure you remove CreditCardAuto somehow
#
#Variable CYBER_CONFIGFILE /home/you/yourid75/mck-cgi/merchant_conf
#Variable CYBER_VERSION 3.2
#Variable CYBER_MODE mauthonly
#ifdef CYBER_MODE
Variable MV_PAYMENT_MODE mauthonly
CreditCardAuto No
#endif
# The old CyberCash stuff still should work, but use the above
#CyberCash Yes
EncryptProgram __ENCRYPTOR__
ImageAlias __IMAGE_DIR__/template/ __IMAGE_DIR__/__TEMPLATE__/
ImageDir __IMAGE_DIR__/
ImageDirInternal http://__SERVER_NAME____IMAGE_DIR__/
# Uncomment only if you have these locales on your system
#Locale de_DE
#Locale de_DE LC_CTYPE de_DE
#Locale fr_FR
#Locale en_US
Locale en_US LC_CTYPE C
LocaleDatabase locale
Onfly onfly
OrderCounter etc/order.number
OrderLineLimit 25
OrderProfile etc/profiles.order etc/profiles.login etc/profiles.misc
Password __MVC_SUPASSWD__
# This makes CommonAdjust effective, since no_price doesn't exist
PriceField no_price
ReadPermission group
RemoteUser __MVC_SUPERUSER__
RobotLimit 50
ActionMap deliver <<EOR
sub {
my $deliverable = shift;
$Scratch->{deliverable} = $CGI->{mv_arg};
$CGI->{mv_nextpage} = 'deliver';
return 1;
}
EOR
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;
}
EOR
ParseVariables Yes
Route log attach 0
Route log cybermode ""
Route log empty 1
Route log encrypt 0
Route log increment 0
Route log report etc/log_transaction
Route log supplant 0
Route log track etc/log
Route copy_user attach 0
Route copy_user cybermode ""
Route copy_user empty 1
Route copy_user encrypt 0
Route copy_user increment 0
Route copy_user report etc/mail_receipt
Route copy_user supplant 0
Route copy_user track etc/log
# Main route must be last to make default
Route main attach 0
#Route main counter etc/some.other.order.number
Route main credit_card 0
Route main cybermode ""
Route main default 1
Route main email __ORDERS_TO__
Route main encrypt 0
Route main encrypt_program __ENCRYPTOR__
Route main errors_to __ORDERS_TO__
Route main increment 0
Route main pgp_cc_key ""
Route main pgp_key ""
Route main receipt etc/receipt.html
Route main report etc/report
Route main supplant 1
Route main individual_track orders
Route main track etc/tracking.asc
SalesTax state
SeparateItems Yes
SpecialPage flypage flypage
SpecialPage catalog index
SpecialPage checkout __ORDER_STYLE__/checkout
SpecialPage order __ORDER_STYLE__/basket
SpecialPage search results
SpecialPage results results
SpecialPage report ../etc/report
SpecialPage receipt ../etc/receipt
NoCache reconfig special config query ord multi
Static No
StaticAll Yes
StaticDBM static
StaticDepth 2
StaticDir __SAMPLEHTML__/pages
StaticFly Yes
StaticPath __SAMPLEURL__/pages
TaxShipping __TAXSHIPPING__
UpsZoneFile products/450.csv
UseModifier size color
AutoModifier pricing:price_group
UserTag quick-table HasEndTag
UserTag quick_table Interpolate
UserTag quick-table Order border
UserTag quick_table Routine <<EOF
sub {
my ($border,$input) = @_;
$border = " BORDER=$border" if $border;
my $out = "<TABLE ALIGN=LEFT$border>";
my @rows = split /\n+/, $input;
my ($left, $right);
for(@rows) {
$out .= '<TR><TD ALIGN=RIGHT VALIGN=TOP>';
($left, $right) = split /\s*:\s*/, $_, 2;
$out .= '<B>' unless $left =~ /</;
$out .= $left;
$out .= '</B>' unless $left =~ /</;
$out .= '</TD><TD VALIGN=TOP>';
$out .= $right;
$out .= '</TD></TR>';
$out .= "\n";
}
$out .= '</TABLE>';
}
EOF
# This UserTag sets a default font face, size, color
# or more in a table without having to type it in every
# time.
#
# Usage:
# [table-font face="arial, helvetica" size="-1"]
# <TABLE><TR><TD>Test.</TD></TR></TABLE>
# Will do multiple tables.
# <TABLE><TR><TD>Test.</TD></TR></TABLE>
# [/table-font]
#
UserTag table-font Order face
UserTag table-font PosNumber 1
UserTag table-font addAttr 1
UserTag table-font hasEndTag
UserTag table-font Routine <<EOR
sub {
my ($face, $opt, $table) = @_;
my @parms;
push(@parms, qq{FACE="$face"})
if $face;
for(qw/size color/) {
push(@parms, qq{\U$_\E="} . $opt->{$_} . '"')
if $opt->{$_};
}
push(@parms, $opt->{extra})
if $opt->{extra};
my $front = "<FONT " . join(" ", @parms) . '>';
$table =~ s:(<T[HD][^>]*>):$1$front:ig;
$table =~ s:(</T[HD]\s*>):</FONT>$1:ig;
return $table;
}
EOR
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");
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} );
}
EOR
WritePermission group
# Here you can set up fatal errors if a necessary sub or usertag
# doesn't exist, uncomment one of next lines to test
#Require globalsub nevairbe
#Require usertag nevairbe
Require usertag email
Require usertag email_raw
Require usertag var
Require usertag loc
Require usertag summary
Require usertag reconfig