This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
/
minivend.html
15513 lines (12595 loc) · 600 KB
/
minivend.html
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
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- $Id$ -->
<HTML><HEAD>
<CENTER><TITLE>minivend</TITLE>
</HEAD>
<BODY BGCOLOR=WHITE></CENTER><p><hr>
<CENTER> <H1>
<A NAME="minivend_name_0">
MiniVend -- multi-catalog shopping cart and mall
</A>
</CENTER> </H1>
<p>
<H2>
<A NAME="minivend_version_0">
Version</A>
</H2>
This document describes MiniVend 3.14-4, based originally on Andrew Wilcox's
1995 <I>Vend</I>.
<p><p><hr>
<!-- INDEX BEGIN -->
<!--
<UL>
<LI><A HREF="#NAME">NAME</A>
<UL>
<LI><A HREF="#Version">Version</A>
</UL>
<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
<LI><A HREF="#OVERVIEW_OF_MINIVEND">OVERVIEW OF MINIVEND</A>
<UL>
<LI><A HREF="#The_Vend_Concept">The Vend Concept</A>
<LI><A HREF="#A_typical_user_session">A typical user session</A>
<LI><A HREF="#How_MiniVend_Manages_Sessions">How MiniVend Manages Sessions</A>
<LI><A HREF="#Page_Delivery">Page Delivery</A>
</UL>
<LI><A HREF="#DISTRIBUTION_AND_SUPPORT_INFORMA">DISTRIBUTION AND SUPPORT INFORMATION</A>
<UL>
<LI><A HREF="#Where_to_Download_MiniVend">Where to Download MiniVend</A>
<LI><A HREF="#Perl">Perl</A>
<LI><A HREF="#Setup_for_HTTP_Servers">Setup for HTTP Servers</A>
<LI><A HREF="#UNIX_domain_sockets">UNIX-domain sockets</A>
<LI><A HREF="#INET_domain_sockets">INET-domain sockets</A>
<LI><A HREF="#Internal_HTTP_server">Internal HTTP server</A>
</UL>
<LI><A HREF="#QUICK_START">QUICK START</A>
<UL>
<LI><A HREF="#The_Catalog">The Catalog</A>
<LI><A HREF="#makecat_set_up_a_catalog_from">makecat - set up a catalog from a template</A>
<LI><A HREF="#Setting_up_multiple_catalogs">Setting up multiple catalogs</A>
<LI><A HREF="#If_something_goes_wrong">If something goes wrong</A>
</UL>
<LI><A HREF="#SETTING_UP_YOUR_CATALOG">SETTING UP YOUR CATALOG</A>
<UL>
<LI><A HREF="#Start_with_a_database">Start with a database</A>
<LI><A HREF="#On_the_fly_pages_static_or_bot">On-the-fly pages, static, or both?</A>
<LI><A HREF="#Use_the_demo_catalogs">Use the demo catalogs</A>
<LI><A HREF="#Tree_design">Tree design</A>
<LI><A HREF="#The_Essentials">The Essentials</A>
<LI><A HREF="#Catalog_Pages_MiniVend_tags">Catalog Pages - MiniVend tags</A>
<LI><A HREF="#Cookies">Cookies</A>
<LI><A HREF="#Basic_MiniVend_Tags">Basic MiniVend Tags</A>
<LI><A HREF="#_area_">[area ...]</A>
<LI><A HREF="#How_to_order_an_item">How to order an item</A>
<LI><A HREF="#Where_do_I_go_from_here_">Where do I go from here?</A>
</UL>
<LI><A HREF="#DATABASES">DATABASES</A>
<UL>
<LI><A HREF="#The_Product_Database">The Product Database</A>
<LI><A HREF="#Arbitrary_Databases">Arbitrary Databases</A>
<LI><A HREF="#MiniVend_built_in_database_suppo">MiniVend built-in database support</A>
<LI><A HREF="#Character_usage_restrictions">Character usage restrictions</A>
<LI><A HREF="#Import_Attributes">Import Attributes</A>
<LI><A HREF="#Dictionary_indexing_with_INDEX">Dictionary indexing with INDEX</A>
<LI><A HREF="#MEMORY_for_memory_only_databases">MEMORY for memory-only databases</A>
<LI><A HREF="#IMPORT_ONCE">IMPORT_ONCE</A>
<LI><A HREF="#Importing_in_a_page">Importing in a page</A>
<LI><A HREF="#Exporting_from_a_database">Exporting from a database</A>
<LI><A HREF="#Write_Control">Write Control</A>
<LI><A HREF="#Global_Databases">Global Databases</A>
</UL>
<LI><A HREF="#SQL_SUPPORT">SQL SUPPORT</A>
<UL>
<LI><A HREF="#Msql_support">Msql support</A>
<LI><A HREF="#SQL_support_via_DBI">SQL support via DBI</A>
<LI><A HREF="#SQL_Access_Methods">SQL Access Methods</A>
<LI><A HREF="#Importing_from_an_ASCII_file">Importing from an ASCII file</A>
</UL>
<LI><A HREF="#MINIVEND_TAG_REFERENCE">MINIVEND TAG REFERENCE</A>
<UL>
<LI><A HREF="#New_and_Old_Style_tags">New and Old Style tags</A>
<LI><A HREF="#DATA_and_FIELD">DATA and FIELD</A>
<LI><A HREF="#SET_and_SCRATCH">SET and SCRATCH</A>
<LI><A HREF="#DEFAULT_and_LOOKUP">DEFAULT and LOOKUP</A>
<LI><A HREF="#LOOP_and_TAG_EACH">LOOP and TAG EACH</A>
<LI><A HREF="#IF">IF</A>
<LI><A HREF="#TAG_the_catch_all">TAG - the catch all</A>
<LI><A HREF="#User_defined_Tags">User-defined Tags</A>
<LI><A HREF="#PRICE_DESCRIPTION_ACCESSORIES">PRICE, DESCRIPTION, ACCESSORIES</A>
<LI><A HREF="#FILE_and_INCLUDE">FILE and INCLUDE</A>
<LI><A HREF="#BODY_BUTTONBAR_RANDOM_ROTATE">BODY, BUTTONBAR, RANDOM, ROTATE</A>
<LI><A HREF="#Tags_for_summarizing_shopping_ba">Tags for summarizing shopping basket/cart</A>
<LI><A HREF="#Item_Lists">Item Lists</A>
<LI><A HREF="#Embedded_Perl_Code">Embedded Perl Code</A>
<LI><A HREF="#On_the_fly_Catalog_Pages">On-the-fly Catalog Pages</A>
<LI><A HREF="#Tags_for_controlling_old_syntax_">Tags for controlling old syntax interpolation order</A>
<LI><A HREF="#Required_Pages">Required Pages</A>
<LI><A HREF="#Checking_Page_HTML">Checking Page HTML</A>
</UL>
<LI><A HREF="#FORMS_AND_MINIVEND">FORMS AND MINIVEND</A>
<UL>
<LI><A HREF="#Special_Form_Fields">Special Form Fields</A>
<LI><A HREF="#Form_Actions">Form Actions</A>
<LI><A HREF="#One_click_Multiple_Variables">One-click Multiple Variables</A>
<LI><A HREF="#Checks_and_Selections">Checks and Selections</A>
<LI><A HREF="#Integrated_Image_Maps">Integrated Image Maps</A>
<LI><A HREF="#Setting_Form_Security">Setting Form Security</A>
<LI><A HREF="#Stacking_Variables_on_the_Form">Stacking Variables on the Form</A>
<LI><A HREF="#Extended_Value_Access_and_File_U">Extended Value Access and File Upload</A>
<LI><A HREF="#Updating_MiniVend_database_table">Updating MiniVend database tables with a form</A>
</UL>
<LI><A HREF="#THE_SEARCH_ENGINE">THE SEARCH ENGINE</A>
<UL>
<LI><A HREF="#The_Search_Form">The Search Form</A>
<LI><A HREF="#Glimpse">Glimpse</A>
<LI><A HREF="#Fast_Binary_Search">Fast Binary Search</A>
<LI><A HREF="#Coordinated_and_joined_searching">Coordinated and joined searching</A>
<LI><A HREF="#Specifying_a_text_based_search_w">Specifying a text-based search with SQL-like syntax</A>
<LI><A HREF="#Range_Searching">Range Searching</A>
<LI><A HREF="#SQL_searches">SQL searches</A>
<LI><A HREF="#One_click_searches">One-click searches</A>
<LI><A HREF="#Setting_display_options_with_mv_">Setting display options with mv_value</A>
<LI><A HREF="#In_page_searches">In-page searches</A>
<LI><A HREF="#Search_Profiles">Search Profiles</A>
<LI><A HREF="#Search_Reference">Search Reference</A>
<LI><A HREF="#The_Results_Page">The Results Page</A>
<LI><A HREF="#Updating_session_variables_after">Updating session variables after a search</A>
<LI><A HREF="#Using_a_Search_Cache">Using a Search Cache</A>
</UL>
<LI><A HREF="#THE_ORDER_PROCESS">THE ORDER PROCESS</A>
<UL>
<LI><A HREF="#How_to_set_up_an_order_link">How to set up an order link</A>
<LI><A HREF="#How_to_set_up_an_order_button">How to set up an order button</A>
<LI><A HREF="#Order_Groups">Order Groups</A>
<LI><A HREF="#Basket_display">Basket display</A>
<LI><A HREF="#Multiple_Shopping_Carts">Multiple Shopping Carts</A>
<LI><A HREF="#Advanced_Multi_level_Order_Pages">Advanced Multi-level Order Pages</A>
<LI><A HREF="#Simple_Order_Report_File">Simple Order Report File</A>
<LI><A HREF="#Fully_configurable_Order_Reports">Fully-configurable Order Reports</A>
<LI><A HREF="#Order_Receipts">Order Receipts</A>
<LI><A HREF="#The_Order_Counter">The Order Counter</A>
<LI><A HREF="#Customer_Input_Fields">Customer Input Fields</A>
</UL>
<LI><A HREF="#PRODUCT_PRICING">PRODUCT PRICING</A>
<UL>
<LI><A HREF="#Simple_pricing">Simple pricing</A>
<LI><A HREF="#Price_Maintenance_with_CommonAdj">Price Maintenance with CommonAdjust</A>
<LI><A HREF="#CommonAdjust_Examples">CommonAdjust Examples</A>
<LI><A HREF="#PriceBreaks_discounts_and_Pric">PriceBreaks, discounts, and PriceAdjustment</A>
<LI><A HREF="#Item_Attributes">Item Attributes</A>
<LI><A HREF="#Product_Discounts">Product Discounts</A>
<LI><A HREF="#Sales_Tax">Sales Tax</A>
<LI><A HREF="#Using_CyberCash">Using CyberCash</A>
<LI><A HREF="#CyberCash_3_2">CyberCash 3.2</A>
</UL>
<LI><A HREF="#SORTING">SORTING</A>
<LI><A HREF="#SHIPPING">SHIPPING</A>
<UL>
<LI><A HREF="#Default_Shipping_Mode">Default Shipping Mode</A>
<LI><A HREF="#Shipping_Cost_Database">Shipping Cost Database</A>
<LI><A HREF="#Shipping_Calculation_modes">Shipping Calculation modes</A>
<LI><A HREF="#How_shipping_is_calculated">How shipping is calculated</A>
<LI><A HREF="#More_on_UPS_style_lookup">More on UPS-style lookup</A>
<LI><A HREF="#Geographic_qualification">Geographic qualification</A>
<LI><A HREF="#Handling_charges">Handling charges</A>
</UL>
<LI><A HREF="#USER_DATABASE">USER DATABASE</A>
<UL>
<LI><A HREF="#The_userdb_tag">The [userdb ...] tag</A>
<LI><A HREF="#Setting_defaults_with_the_UserDB">Setting defaults with the UserDB directive</A>
<LI><A HREF="#User_Database_functions">User Database functions</A>
<LI><A HREF="#Address_Book">Address Book</A>
<LI><A HREF="#Accounts_Book">Accounts Book</A>
<LI><A HREF="#Preferences">Preferences</A>
<LI><A HREF="#Carts">Carts</A>
<LI><A HREF="#Controlling_page_access_with_Use">Controlling page access with UserDB</A>
</UL>
<LI><A HREF="#TRACKING_AND_BACKEND_ORDER_ENTRY">TRACKING AND BACKEND ORDER ENTRY</A>
<UL>
<LI><A HREF="#Easy_ASCII_Tracking">Easy ASCII Tracking</A>
<LI><A HREF="#Database_Tracking">Database Tracking</A>
<LI><A HREF="#Custom_Order_Routing">Custom Order Routing</A>
</UL>
<LI><A HREF="#MINIVEND_SECURITY">MINIVEND SECURITY</A>
<UL>
<LI><A HREF="#SSL_support">SSL support</A>
<LI><A HREF="#Administrative_Pages">Administrative Pages</A>
<LI><A HREF="#Controlling_access_to_certain_pa">Controlling access to certain pages</A>
</UL>
<LI><A HREF="#CONTROLLING_PAGE_APPEARANCE">CONTROLLING PAGE APPEARANCE</A>
<UL>
<LI><A HREF="#Body_and_Buttonbar_Control">Body and Buttonbar Control</A>
<LI><A HREF="#Random_Banners">Random Banners</A>
<LI><A HREF="#Rotating_Banners">Rotating Banners</A>
<LI><A HREF="#In_line_Help">In-line Help</A>
</UL>
<LI><A HREF="#STATIC_PAGE_BUILDING">STATIC PAGE BUILDING</A>
<LI><A HREF="#INTERNATIONALIZATION">INTERNATIONALIZATION</A>
<UL>
<LI><A HREF="#Setting_the_locale">Setting the locale</A>
<LI><A HREF="#MiniVend_Locale_Settings">MiniVend Locale Settings</A>
<LI><A HREF="#Special_Locale_keys_for_price_re">Special Locale keys for price representation</A>
<LI><A HREF="#Dynamic_locale_directive_changes">Dynamic locale directive changes</A>
<LI><A HREF="#Sorting_based_on_Locale">Sorting based on Locale</A>
<LI><A HREF="#Placing_Locale_information_in_a_">Placing Locale information in a Database</A>
</UL>
<LI><A HREF="#MINIVEND_CONFIGURATION_FILES">MINIVEND CONFIGURATION FILES</A>
<LI><A HREF="#MINIVEND_CFG">MINIVEND.CFG</A>
<UL>
<LI><A HREF="#AdminSub">AdminSub</A>
<LI><A HREF="#AdminUser">AdminUser</A>
<LI><A HREF="#AllowGlobal">AllowGlobal</A>
<LI><A HREF="#Catalog">Catalog</A>
<LI><A HREF="#DisplayErrors">DisplayErrors</A>
<LI><A HREF="#DomainTail">DomainTail</A>
<LI><A HREF="#Environment">Environment</A>
<LI><A HREF="#FullUrl">FullUrl</A>
<LI><A HREF="#GlobalSub">GlobalSub</A>
<LI><A HREF="#HammerLock">HammerLock</A>
<LI><A HREF="#HouseKeeping">HouseKeeping</A>
<LI><A HREF="#IpHead">IpHead</A>
<LI><A HREF="#LockoutCommand">LockoutCommand</A>
<LI><A HREF="#MaxServers">MaxServers</A>
<LI><A HREF="#NoAbsolute">NoAbsolute</A>
<LI><A HREF="#PIDcheck">PIDcheck</A>
<LI><A HREF="#SafeSignals">SafeSignals</A>
<LI><A HREF="#SafeUntrap">SafeUntrap</A>
<LI><A HREF="#SendMailProgram">SendMailProgram</A>
<LI><A HREF="#SubCatalog">SubCatalog</A>
<LI><A HREF="#TcpHost">TcpHost</A>
<LI><A HREF="#TcpMap">TcpMap</A>
<LI><A HREF="#TcpPort">TcpPort</A>
<LI><A HREF="#TolerateGet">TolerateGet</A>
<LI><A HREF="#UserTag">UserTag</A>
<LI><A HREF="#Variable">Variable</A>
</UL>
<LI><A HREF="#CATALOG_CFG">CATALOG.CFG</A>
<UL>
<LI><A HREF="#VendURL">VendURL</A>
<LI><A HREF="#MailOrderTo">MailOrderTo</A>
<LI><A HREF="#Optional_Configuration_Directive">Optional Configuration Directives</A>
<LI><A HREF="#ActionMap">ActionMap</A>
<LI><A HREF="#AdminDatabase">AdminDatabase</A>
<LI><A HREF="#AdminPage">AdminPage</A>
<LI><A HREF="#AlwaysSecure">AlwaysSecure</A>
<LI><A HREF="#AsciiBackend">AsciiBackend</A>
<LI><A HREF="#AsciiTrack">AsciiTrack</A>
<LI><A HREF="#BackendOrder">BackendOrder</A>
<LI><A HREF="#ButtonBars">ButtonBars</A>
<LI><A HREF="#CheckoutFrame">CheckoutFrame</A>
<LI><A HREF="#CheckoutPage">CheckoutPage</A>
<LI><A HREF="#ClearCache">ClearCache</A>
<LI><A HREF="#CollectData">CollectData</A>
<LI><A HREF="#CommonAdjust">CommonAdjust</A>
<LI><A HREF="#ConfigDir">ConfigDir</A>
<LI><A HREF="#CookieDomain">CookieDomain</A>
<LI><A HREF="#CookieLogin">CookieLogin</A>
<LI><A HREF="#Cookies">Cookies</A>
<LI><A HREF="#CreditCardAuto">CreditCardAuto</A>
<LI><A HREF="#CustomShipping">CustomShipping</A>
<LI><A HREF="#CyberCash">CyberCash</A>
<LI><A HREF="#DataDir">DataDir</A>
<LI><A HREF="#Database">Database</A>
<LI><A HREF="#DefaultShipping">DefaultShipping</A>
<LI><A HREF="#Delimiter">Delimiter</A>
<LI><A HREF="#DescriptionField">DescriptionField</A>
<LI><A HREF="#DisplayErrors">DisplayErrors</A>
<LI><A HREF="#DynamicData">DynamicData</A>
<LI><A HREF="#EncryptProgram">EncryptProgram</A>
<LI><A HREF="#ErrorFile">ErrorFile</A>
<LI><A HREF="#ExtraSecure">ExtraSecure</A>
<LI><A HREF="#FieldDelimiter">FieldDelimiter</A>
<LI><A HREF="#FinishOrder">FinishOrder</A>
<LI><A HREF="#FormIgnore">FormIgnore</A>
<LI><A HREF="#FractionalItems">FractionalItems</A>
<LI><A HREF="#FrameFlyPage">FrameFlyPage</A>
<LI><A HREF="#FrameLinkDir">FrameLinkDir</A>
<LI><A HREF="#FrameOrderPage">FrameOrderPage</A>
<LI><A HREF="#FrameSearchPage">FrameSearchPage</A>
<LI><A HREF="#FramesDefault">FramesDefault</A>
<LI><A HREF="#Glimpse">Glimpse</A>
<LI><A HREF="#Help">Help</A>
<LI><A HREF="#ImageAlias">ImageAlias</A>
<LI><A HREF="#ImageDir">ImageDir</A>
<LI><A HREF="#ImageDirInternal">ImageDirInternal</A>
<LI><A HREF="#ImageDirSecure">ImageDirSecure</A>
<LI><A HREF="#ItemLinkDir">ItemLinkDir</A>
<LI><A HREF="#ItemLinkValue">ItemLinkValue</A>
<LI><A HREF="#Locale">Locale</A>
<LI><A HREF="#LocaleDatabase">LocaleDatabase</A>
<LI><A HREF="#LogFile">LogFile</A>
<LI><A HREF="#MasterHost">MasterHost</A>
<LI><A HREF="#MixMatch">MixMatch</A>
<LI><A HREF="#MsqlDB">MsqlDB</A>
<LI><A HREF="#Mv_AlinkColor">Mv_AlinkColor</A>
<LI><A HREF="#Mv_Background">Mv_Background</A>
<LI><A HREF="#Mv_BgColor">Mv_BgColor</A>
<LI><A HREF="#Mv_LinkColor">Mv_LinkColor</A>
<LI><A HREF="#Mv_TextColor">Mv_TextColor</A>
<LI><A HREF="#Mv_VlinkColor">Mv_VlinkColor</A>
<LI><A HREF="#NewEscape">NewEscape</A>
<LI><A HREF="#NewReport">NewReport</A>
<LI><A HREF="#NewTags">NewTags</A>
<LI><A HREF="#NoCache">NoCache</A>
<LI><A HREF="#NoImport">NoImport</A>
<LI><A HREF="#NonTaxableField">NonTaxableField</A>
<LI><A HREF="#OfflineDir">OfflineDir</A>
<LI><A HREF="#OldShipping">OldShipping</A>
<LI><A HREF="#OrderCounter">OrderCounter</A>
<LI><A HREF="#OrderFrame">OrderFrame</A>
<LI><A HREF="#OrderLineLimit">OrderLineLimit</A>
<LI><A HREF="#OrderProfile">OrderProfile</A>
<LI><A HREF="#OrderReport">OrderReport</A>
<LI><A HREF="#PageCache">PageCache</A>
<LI><A HREF="#PageDir">PageDir</A>
<LI><A HREF="#PGP">PGP</A>
<LI><A HREF="#PageSelectField">PageSelectField</A>
<LI><A HREF="#ParseVariables">ParseVariables</A>
<LI><A HREF="#Password">Password</A>
<LI><A HREF="#PriceAdjustment">PriceAdjustment</A>
<LI><A HREF="#PriceBreaks">PriceBreaks</A>
<LI><A HREF="#PriceCommas">PriceCommas</A>
<LI><A HREF="#PriceDivide">PriceDivide</A>
<LI><A HREF="#PriceField">PriceField</A>
<LI><A HREF="#ProductDir">ProductDir</A>
<LI><A HREF="#ProductFiles">ProductFiles</A>
<LI><A HREF="#Random">Random</A>
<LI><A HREF="#ReadPermission_and_WritePermissi">ReadPermission and WritePermission</A>
<LI><A HREF="#ReceiptPage">ReceiptPage</A>
<LI><A HREF="#RecordDelimiter">RecordDelimiter</A>
<LI><A HREF="#RemoteUser">RemoteUser</A>
<LI><A HREF="#ReportIgnore">ReportIgnore</A>
<LI><A HREF="#RequiredFields">RequiredFields</A>
<LI><A HREF="#RobotLimit">RobotLimit</A>
<LI><A HREF="#Rotate">Rotate</A>
<LI><A HREF="#SalesTax">SalesTax</A>
<LI><A HREF="#SaveExpire">SaveExpire</A>
<LI><A HREF="#ScratchDir">ScratchDir</A>
<LI><A HREF="#SearchCache">SearchCache</A>
<LI><A HREF="#SearchFrame">SearchFrame</A>
<LI><A HREF="#SearchProfile">SearchProfile</A>
<LI><A HREF="#SecureURL">SecureURL</A>
<LI><A HREF="#SendMailProgram">SendMailProgram</A>
<LI><A HREF="#SeparateItems">SeparateItems</A>
<LI><A HREF="#SessionDatabase">SessionDatabase</A>
<LI><A HREF="#SessionExpire">SessionExpire</A>
<LI><A HREF="#SessionLockFile">SessionLockFile</A>
<LI><A HREF="#Shipping">Shipping</A>
<LI><A HREF="#SpecialPage">SpecialPage</A>
<LI><A HREF="#Static">Static</A>
<LI><A HREF="#StaticAll">StaticAll</A>
<LI><A HREF="#StaticDepth">StaticDepth</A>
<LI><A HREF="#StaticDir">StaticDir</A>
<LI><A HREF="#StaticFly">StaticFly</A>
<LI><A HREF="#StaticPage">StaticPage</A>
<LI><A HREF="#StaticPath">StaticPath</A>
<LI><A HREF="#StaticPattern">StaticPattern</A>
<LI><A HREF="#StaticSuffix">StaticSuffix</A>
<LI><A HREF="#Sub">Sub</A>
<LI><A HREF="#SubArgs">SubArgs</A>
<LI><A HREF="#TaxShipping">TaxShipping</A>
<LI><A HREF="#Tracking">Tracking</A>
<LI><A HREF="#TransparentItem">TransparentItem</A>
<LI><A HREF="#UpsZoneFile">UpsZoneFile</A>
<LI><A HREF="#UseCode">UseCode</A>
<LI><A HREF="#UseModifier">UseModifier</A>
<LI><A HREF="#Variable">Variable</A>
<LI><A HREF="#VariableDatabase">VariableDatabase</A>
</UL>
<LI><A HREF="#ADMINISTERING_MINIVEND">ADMINISTERING MINIVEND</A>
<UL>
<LI><A HREF="#Starting_Stopping_and_Re_start">Starting, Stopping, and Re-starting the Servers</A>
<LI><A HREF="#UNIX_and_INET_modes">UNIX and INET modes</A>
<LI><A HREF="#User_reconfiguration">User reconfiguration</A>
<LI><A HREF="#Making_the_Product_Database">Making the Product Database</A>
<LI><A HREF="#Updating_Individual_Records">Updating Individual Records</A>
<LI><A HREF="#Expiring_Sessions">Expiring Sessions</A>
</UL>
<LI><A HREF="#DEBUGGING">DEBUGGING</A>
<LI><A HREF="#MANUAL_INSTALLATION_OF_CATALOGS">MANUAL INSTALLATION OF CATALOGS</A>
<UL>
<LI><A HREF="#Needed_Directories">Needed Directories</A>
<LI><A HREF="#The_Demo_Systems">The Demo Systems</A>
<LI><A HREF="#Setting_up_VLINK_and_TLINK">Setting up VLINK and TLINK</A>
<LI><A HREF="#Compiling_VLINK_and_TLINK">Compiling VLINK and TLINK</A>
</UL>
<LI><A HREF="#AUTHOR">AUTHOR</A>
<LI><A HREF="#ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</A>
</UL>
-->
<!-- INDEX END -->
<P>
<H1><A NAME="NAME">NAME</A></H1>
<P>
MiniVend -- shopping cart and electronic catalog system
<P>
<HR>
<H2><A NAME="Version">Version</A></H2>
<P>
This document describes MiniVend 3.14-4, based on Andrew Wilcox's original
Vend, Version 0.2, with portions from Vend 0.3. This is the third major
revision of MiniVend.
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
MiniVend is a database access and retrieval system focused on e-commerce.
It allows customers to select items to buy from catalog pages. The program
tracks which products they have selected and the quantity desired. Many
different catalog pages may be visited, and the user ``session'' will be
tracked to build a cumulative list of items. Once selection is finished,
they may complete the ordering process by entering their name and address
along with payment information, if any. Once the order process is
completed, MiniVend submits the order to the system via email or an
external order entry program.
<P>
Though its name begins with ``Mini'', MiniVend is anything but. It is a
high-end, fully customizable, powerful software system with complete
database functionality. It is suitable for many applications besides
shopping carts, though that is its main bent.
<P>
MiniVend plugs into a system with an
<FONT SIZE=-1>SSL</FONT> (Secure Sockets Layer) server, allowing encrypted
transmission of sensitive customer data. This capability makes the entry of
credit card numbers practical and secure. In addition, it supports online
payment systems and encryption; no credit card numbers need be stored on
the system ``en clair''.
<P>
Many different catalogs can be run from the same MiniVend server, allowing an
<FONT SIZE=-1>ISP</FONT> to serve many different customers from one or just a few MiniVend server processes. As many as 1,000 MiniVend catalogs have been run on one machine from the same server process.
<P>
When possible, multiple servers are forked to serve the same set of
catalogs. This ensures fast response, while only one server runs when there
is no catalog activity.
<P>
MiniVend is powerful, and correspondingly complex. It can easily handle
catalogs of a million items or more, with excellent performance. It has
completely flexible page display, search, and order entry capability. If
you only have a few items to catalog, MiniVend is probably overkill for
your needs. But if you are willing to spend some up-front learning time, it
can support your simple catalog with unlimited room to grow. To get a fast
start with a simple catalog, start with the simple demo and customize from
there.
<P>
<HR>
<H1><A NAME="OVERVIEW_OF_MINIVEND">OVERVIEW OF MINIVEND</A></H1>
<P>
The following section describes how MiniVend works, and should be read by
anyone creating a MiniVend catalog.
<P>
<HR>
<H2><A NAME="The_Vend_Concept">The Vend Concept</A></H2>
<P>
MiniVend is a descendent of Vend, originally developed by Andrew Wilcox.
Though the original Vend was much simpler than MiniVend in implementation,
the basic concept remains unchanged. Quite simply, MiniVend maintains its
own set of pages, <EM>outside of regular HTML space</EM>, which contain special tags that are interpreted by MiniVend.
<P>
The tags, which are in <CODE>[square brackets]</CODE> or
<FONT SIZE=-1><IMG</FONT> SRC=``somepic.gif'' MV=``[embedded in
<FONT SIZE=-1>HTML]''>,</FONT> are interpreted by MiniVend and many different values can be substituted. Some examples are:
<DL>
<DT><STRONG><A NAME="item_User">User form input</A></STRONG><DD>
MiniVend remembers input by a user from form to form, and the value of any
form variable is ``remembered'' and inserted upon finding a <CODE>[value input_field]</CODE>
tag. The <CODE>input_field</CODE> is a normal
<FONT SIZE=-1>HTML</FONT> form field.
<P><DT><STRONG><A NAME="item_Database">Database contents</A></STRONG><DD>
MiniVend can have an unlimited number of attached databases, either in one of its own internal formats or attached via
<FONT SIZE=-1>SQL/ODBC.</FONT> The contents of a database can be referenced with tags like
<CODE>[data table=products column=name key=334-12]</CODE>.
<P><DT><STRONG><A NAME="item_Session">Session parameters</A></STRONG><DD>
Things like where the user originally found your catalog <CODE>[data session referer]</CODE>), domain they are from (<CODE>[data session host]</CODE>), source of hit in a partner program (<CODE>[data session source]</CODE>), the time of their last access (<CODE>[data session time]</CODE>), and many other parameters.
<P><DT><STRONG><A NAME="item_File">File contents or program output</A></STRONG><DD>
You can insert the contents of an outboard file with
<CODE>[file directory/file]</CODE> or <CODE>[include directory/file]</CODE>, or the output from an arbitrary program (given proper permission from
your administrator!).
<P><DT><STRONG><A NAME="item_Searches">Searches of files</A></STRONG><DD>
MiniVend supports different search engines, including <EM>Glimpse</EM>, or you can call your own and have MiniVend process the output for you.
<P></DL>
<P>
There are over 80 different distinct tags supporting hundreds of functions.
<P>
<HR>
<H2><A NAME="A_typical_user_session">A typical user session</A></H2>
<P>
The user hears about your catalog via a search engine, link from another page, or click-thru from a banner ad. They access the link, which is a
<FONT SIZE=-1>URL</FONT> pointing to the MiniVend
<FONT SIZE=-1>CGI</FONT> link program (generically called
<FONT SIZE=-1>VLINK</FONT> or
<FONT SIZE=-1>TLINK,</FONT> more on that below). The MiniVend server is already running on your system, and your catalog has been designed and tested.
<P>
The link, which is a regular
<FONT SIZE=-1>CGI</FONT> program, calls the MiniVend server through a socket. The MiniVend server sees the path information which is appended to the
<FONT SIZE=-1>URL</FONT> calling it, and brings up the corresponding page. The page contains a link to find or order items from your catalog.
<P>
The user clicks on the link and MiniVend looks in the <EM>products</EM> database, finds the item, and places it in the user's shopping cart. (Each
user has a separate shopping cart, which is attached to their <EM>session</EM>.)
<P>
Once the user decides to purchase, they check out by filling out a form
with their name, address, payment information, etc. In the process they may
make choices about how the product should be shipped, how they will pay,
and provide any other information you may ask for. They then place (or
``submit'') the order.
<P>
Their payment may be taken at that point via real-time electronic payment and a soft-goods product downloaded -- or their order information may be simply sent to you, the store owner, via encrypted email or
<FONT SIZE=-1>FAX.</FONT> The order is saved to a file or database table as backup, or in the case of fully-automated systems sent directly to an order entry program or database link.
<P>
All of these operations are fully configurable by you. The base MiniVend
distribution includes a sample store -- some users have simply customized
the text and images inside, changed the database entries, and opened their
store. You will probably want to fully customize for a distinctive catalog
look and feel.
<P>
<HR>
<H2><A NAME="How_MiniVend_Manages_Sessions">How MiniVend Manages Sessions</A></H2>
<P>
Normally, each request for a World Wide Web page which comes in to a server
stands on its own. While the server will probably know which machine a
request comes from, it may not know if the next request comes from the same
browser or even from the same user on that machine.
<P>
MiniVend keeps track of who is ordering what by including in the
<FONT SIZE=-1>URL</FONT> a
<EM>session id</EM>, which is a random piece of text which is different for each customer
browsing the catalog.
<P>
This session
<FONT SIZE=-1>ID</FONT> is either tracked with cookies, or it can be passed along through special URLs within catalog pages. Pages in the catalog served by MiniVend running as a cgi-bin program generate a special
<FONT SIZE=-1>URL</FONT> for every link. Here is an example of such a
<FONT SIZE=-1>URL:</FONT>
<P>
<PRE> <A HREF="http://machine.company.com/cgi-bin/simple/browse?WehUkATn">http://machine.company.com/cgi-bin/simple/browse?WehUkATn</A>;arg;1
</PRE>
<P>
An explanation of each part:
<DL>
<DT><STRONG><A NAME="item_machine">machine.company.com</A></STRONG><DD>
Internet address of the server hosting the MiniVend catalog.
<P><DT><STRONG><A NAME="item_cgi">cgi-bin</A></STRONG><DD>
Informs server that the requested page will be generated by a program.
<P><DT><STRONG><A NAME="item_simple">simple</A></STRONG><DD>
Name of the program to run
<P><DT><STRONG><A NAME="item_browse">browse</A></STRONG><DD>
Page of the catalog to display
<P><DT><STRONG><A NAME="item_WehUkATn">WehUkATn</A></STRONG><DD>
The session
<FONT SIZE=-1>ID</FONT>
<P><DT><STRONG><A NAME="item__">;</A></STRONG><DD>
Separates session
<FONT SIZE=-1>ID</FONT> from argument.
<P><DT><STRONG><A NAME="item_arg">arg</A></STRONG><DD>
An argument which can be used by MiniVend to select page display options.
<P><DT><STRONG>;</STRONG><DD>
Separates argument from the unique integer.
<P><LI>
<FONT SIZE=-1>A</FONT> unique integer (or source code, if it contains a letter) which prevents caching servers from caching the
<FONT SIZE=-1>URL.</FONT>
<P></DL>
<P>
<HR>
<H2><A NAME="Page_Delivery">Page Delivery</A></H2>
<P>
MiniVend pages are written in regular
<FONT SIZE=-1>HTML</FONT> with extensions to support catalog ordering.
MiniVend extensions look like:
<P>
<PRE> [page specials]See our specials![/page]
</PRE>
<P>
Pages are delivered through the following steps:
<UL>
<LI>
The
<FONT SIZE=-1>HTTPD</FONT> server (Apache, Netscape, or
<FONT SIZE=-1>NCSA</FONT> are examples of
<FONT SIZE=-1>HTTP</FONT> servers) receives a request for a MiniVend page.
<P><LI>
The server is already running as a daemon, and the request calls a small
<FONT SIZE=-1>C</FONT> program (source is vlink.c or tlink.c) that is
<EM>named according to which catalog is being called.</EM> This program communicates with the MiniVend program via a
<FONT SIZE=-1>UNIX-</FONT> or INET-domain socket.
<P><LI>
MiniVend reads the source page from the MiniVend pages directory, and
interprets the MiniVend tags in the file. If the page doesn't exist, and
corresponds to a part number in the database, it is built ``on the fly''
using a template page. In the process, it may read or modify any number of
database tables. If the user's browser doesn't accept cookies, then any
links generated on the page will contain the <EM>session ID</EM>, which is needed to ensure the user's session is retained.
<P><LI>
The page, which is now entirely in regular
<FONT SIZE=-1>HTML,</FONT> is delivered to the
<FONT SIZE=-1>HTTP</FONT> server, which returns it to the browser.
<P></UL>
<P>
<HR>
<H1><A NAME="DISTRIBUTION_AND_SUPPORT_INFORMA">DISTRIBUTION AND SUPPORT INFORMATION</A></H1>
<P>
MiniVend is normally free of charge, and is distributed under the
<FONT SIZE=-1>GNU</FONT> general public license. This means that
individuals and organizations, both commercial and non-commercial, may use
MiniVend without charge. If you modify and redistribute it, there are
certain obligations you must fulfill. See the file <STRONG>Copying</STRONG> which came with your MiniVend distribution for the full license.
<P>
MiniVend is not guaranteed to be supported other than by making full source
code available. If it breaks you get to keep both pieces. However, the
author is always looking to improve MiniVend and sometimes answers
questions. The more concise and better-researched your question, the more
likely it is to get an answer. No tutorials will be provided, though. You
have to learn all of this stuff on your own, or use the MiniVend mail list
and hope that someone will help you.
<P>
<HR>
<H2><A NAME="Where_to_Download_MiniVend">Where to Download MiniVend</A></H2>
<P>
The MiniVend version described in this document is available from:
<P>
<PRE> <A HREF="http://www.minivend.com/minivend/download.html">http://www.minivend.com/minivend/download.html</A>
</PRE>
<P>
You can also go to any
<FONT SIZE=-1>CPAN</FONT> archive and access the directory
<CODE>authors/id/MIKEH</CODE>.
<P>
<HR>
<H2><A NAME="Perl">Perl</A></H2>
<P>
You will need Perl version 5.004 or higher to run MiniVend 3.14-4. Many sites are still running lower Perl versions. In addition, on systems that do not have
<FONT SIZE=-1>GDBM</FONT> or DB_File installed, memory problems may occur. Large catalogs will use large amounts of memory if the databases must all reside there.
<P>
You can download the latest Perl 5 from any
<FONT SIZE=-1>CPAN</FONT> (Comprehensive Perl Archive Network) site. See
<P>
<PRE> <A HREF="http://www.perl.com/CPAN/">http://www.perl.com/CPAN/</A>
</PRE>
<P>
Windows users will need to obtain the either the ActiveState Perl build 5xx (the one from the
<FONT SIZE=-1>NT</FONT> Resource Kit will
<FONT SIZE=-1>NOT</FONT> work) or the standard version Perl, also known as the
<EM>Gurusamy Sarathy</EM> or <EM>CORE</EM> version, from the directory <CODE>ports/win32/Standard/x86</CODE>.
<P>
<HR>
<H2><A NAME="Setup_for_HTTP_Servers">Setup for HTTP Servers</A></H2>
<P>
MiniVend requires a that a web server be installed on your system in the
normal course of events; it does have an internal server which can be used
for administration, testing, and maintenance, but you will not want to use
it to serve images and other content.
<P>
As detailed previously, MiniVend is always running in the background as a
daemon. It monitors either 1) a UNIX-domain file-based socket, located in
the <A HREF="#item_etc_">etc/</A> subdirectory; or 2) a series of INET-domain sockets. The small
<FONT SIZE=-1>CGI</FONT> link program, called in the demo <A HREF="#item_simple">simple</A>, is run to connect to one of those sockets and provide the link between
your browser.
<P>
<FONT SIZE=-1>NOTE:</FONT> Since Apache and other CERN/NCSA-derived servers are the most popular, we will talk in the terms they use. If you use another web server, you may have to translate the terms; for instance on
<FONT SIZE=-1>MS</FONT> Personal web server the standard
<CODE>ScriptAlias</CODE> is <CODE>/scripts</CODE>.
<P>
You need to have a <CODE>ScriptAlias</CODE> or other
<FONT SIZE=-1>CGI</FONT> execution capability to use the link program. (The
default <CODE>ScriptAlias</CODE> for many web servers is <CODE>/cgi-bin</CODE>.) If you have <CODE>ExecCGI</CODE> set for all of your directories, then any program ending in a particular
file suffix (usually
<A HREF="#item__cgi">.cgi</A>) will be seen as a
<FONT SIZE=-1>CGI</FONT> program.
<P>
MiniVend, by convention, names the link program the same name as the catalog
<FONT SIZE=-1>ID.</FONT> In the distribution demo, this would yield a program name or
<FONT SIZE=-1>SCRIPT_PATH</FONT> of
<CODE>/cgi-bin/simple</CODE> or <CODE>/simple.cgi</CODE>. This
<FONT SIZE=-1>SCRIPT_PATH</FONT> is used to determine which MiniVend
catalog will be used when the link program is accessed.
<P>
<HR>
<H2><A NAME="UNIX_domain_sockets">UNIX-domain sockets</A></H2>
<P>
This is a socket which is not reachable from the Internet directly, but
which must come from a request on your own server. The link program
<CODE>vlink</CODE> is the provided facility for such communication with MiniVend.
<P>
This is the most secure way to run your catalog, for there is no way for
systems on the Internet to interact with MiniVend except through its link
program.
<P>
The most important issue with UNIX-domain sockets on MiniVend is the permissions with which the
<FONT SIZE=-1>CGI</FONT> program and the MiniVend server run.
<P>
To improve security, MiniVend normally runs with the socket file having 0600 permissions (rw-------), which mandates that the
<FONT SIZE=-1>CGI</FONT> program and the server run
<EM>as the same user ID</EM>. This means that the <CODE>vlink</CODE> program must be
<FONT SIZE=-1>SUID</FONT> to the same user
<FONT SIZE=-1>ID</FONT> as the server executes under. (Or that
<FONT SIZE=-1>CGIWRAP</FONT> is used on a single catalog system).
<P>
With MiniVend 3.0 multiple catalog capability, the permissions situation
gets a bit tricky. MiniVend comes with a program, <CODE>makecat</CODE>, which configures catalogs for a multiple catalog system. It should
properly set up ownership and permissions for multiple users if run as the
superuser.
<P>
<HR>
<H2><A NAME="INET_domain_sockets">INET-domain sockets</A></H2>
<P>
These are sockets which are reachable from the Internet directly. The link
program <CODE>tlink</CODE> is the provided facility for such communication with MiniVend; you may also
use your browser to talk to the socket directly if you have it mapped to a
catalog with the global <EM>TcpMap</EM> directive.
<P>
To improve security, MiniVend usually checks that the request comes from
one of a limited number of systems, defined in the global <EM>TcpHost</EM>
directive. (This check is not made for the internal
<FONT SIZE=-1>HTTP</FONT> server.)
<P>
<HR>
<H2><A NAME="Internal_HTTP_server">Internal HTTP server</A></H2>
<P>
If you contact the socket directly (only for INET-domain sockets), MiniVend will perform the
<FONT SIZE=-1>HTTP</FONT> server function itself, talking directly to the browser. It can monitor any number of ports and map them to a particular catalog; by default it only maps the special catalog mv_admin, which performs administrative functions. The default port is 7786
<FONT SIZE=-1>(ASCII</FONT> for
<FONT SIZE=-1>M</FONT> an
<FONT SIZE=-1>V),</FONT> which is the default compiled into the distribution
<EM>tlink</EM> program. You can change this port via the
<EM>TcpMap</EM> directive.
<P>
To prevent catalogs that do not wish access made in this way from being served from the internal server, MiniVend has a fixed
<FONT SIZE=-1>SCRIPT_PATH</FONT> of
<CODE>/catalogname</CODE> (/simple for the distribution demo) which needs to be placed as an alias in
the <EM>Catalog</EM> directive to enable access. See <EM>TcpMap</EM> for more details.
<P>
<HR>
<H1><A NAME="QUICK_START">QUICK START</A></H1>
<P>
Obtain, decompress and untar the distribution:
<P>
<PRE> gzip -dc minivend-3.14-4.tar.gz | tar xvf -
</PRE>
<P>
<FONT SIZE=-1>NOTE</FONT>
<FONT SIZE=-1>FOR</FONT>
<FONT SIZE=-1>WINDOWS:</FONT> Windows users need to unzip the file WinZip or a similar program or obtain the self-extracting executable.
<P>
Before installing, check the site where you obtained MiniVend for any
patches that might have been issued since the release.
<P>
Change to the created directory, something like:
<P>
<PRE> cd minivend-3.14-4
</PRE>
<P>
Run the configure script with:
<P>
<PRE> ./configure
</PRE>
<P>
<FONT SIZE=-1>NOTE</FONT>
<FONT SIZE=-1>FOR</FONT>
<FONT SIZE=-1>WINDOWS:</FONT> Type
<CODE>configure</CODE> instead. The ./ is needed for
<FONT SIZE=-1>UNIX</FONT> users with a properly setup shell.
<P>
If you have trouble with ./configure, try this:
<P>
<PRE> perl Makefile.PL
make
make test
make install
</PRE>
<P>
Replace the <CODE>perl</CODE> with the proper path to your Perl 5.004 or higher binary.
<P>
You will be asked for the directory where you want to install MiniVend -- any directory will do. You must of course have write permission there; and you will eventually need to have write permission on your
<FONT SIZE=-1>CGI-BIN</FONT> and
<FONT SIZE=-1>HTML</FONT> directories. This directory is referred to later in the documentation as
<STRONG>VendRoot</STRONG> or the <STRONG>MiniVend software directory</STRONG>.
<P>
The process should be self-explanatory. If you have trouble answering the
questions asked, <STRONG>look closely</STRONG> at the examples provided. If you still have trouble, you will need to find a tutorial about the World Wide Web -- the
<FONT SIZE=-1>WWW</FONT>
<FONT SIZE=-1>FAQ</FONT> at www.boutell.com would be a good place to look.
<P>
If you discover any problems, refer to the section <EM>If something goes wrong</EM>. Otherwise, MiniVend should be installed at the completion of the script.
It is strongly suggested that you install the demo catalogs as a starting
point for your own catalog -- in fact you will not be able to run MiniVend
until you have created a catalog.
<P>
You will want separate directories to hold the catalog pages and databases.
The <CODE>makecat</CODE> program supplied with MiniVend will make those for you.
<P>
<STRONG>IMPORTANT NOTE:</STRONG> One point that is to be emphasized --
<EM>only your base html pages go in the document space of your http server.</EM>
Any pages with MiniVend elements/tags go in the directory set by the
<EM>PageDir</EM> directive (the default is <CODE>~/catalogs/catalog_name/pages</CODE>). For the demos supplied with MiniVend, this means that only a few pages will be copied to your
<FONT SIZE=-1>HTML</FONT> directory, with the remainder of the pages staying in the directory defined as
<EM>PageDir</EM>.
<P>
If you are on an
<FONT SIZE=-1>ISP</FONT> where <STRONG>all</STRONG> of your files are in
<FONT SIZE=-1>HTML</FONT> document space, you should disable all access to your MiniVend catalog directory with the proper
<FONT SIZE=-1>HTTP</FONT> access restrictions. Normally that is creating a .htaccess file like this:
<P>
<PRE> <Limit GET POST>
order allow,deny
deny from all
</Limit>
</PRE>
<P>
If you are unable to do this, it is recommended that you do not run MiniVend. If you can set file permissions such that files will not be served, it may be
<FONT SIZE=-1>OK,</FONT> but security will be a problem. Please be careful with your customers' personal information.
<P>
<HR>
<H2><A NAME="The_Catalog">The Catalog</A></H2>
<P>
MiniVend pages are
<FONT SIZE=-1>NOT</FONT> in normal
<FONT SIZE=-1>HTML</FONT> space. They are contained in the
<EM>catalog directory</EM>. Each individual catalog must have its own base directory. The catalog
directory has this structure by default:
<DL>
<DT><STRONG><A NAME="item_catalog">catalog.cfg</A></STRONG><DD>
File containing configuration directives for this catalog. (Subcatalogs
have differing information in a file named for the subcatalog.)
<P><DT><STRONG><A NAME="item_config">config</A></STRONG><DD>
Directory that will be read when directives are set with the <filename notation. For example, the file <CODE>config/static.pages</CODE>
will be read when the directive
<P>
<PRE> StaticPage <static.pages
</PRE>
<P>
is encountered in the catalog.cfg file.
<P>
This directory also contains template information used with the makecat
program.
<P><DT><STRONG><A NAME="item_error">error.log</A></STRONG><DD>
File which contains catalog-specific errors.
<EM>Check this file when something doesn't work right.</EM>
It is also where any syntax errors in embedded Perl code will be shown.
<P><DT><STRONG><A NAME="item_etc">etc</A></STRONG><DD>