####################################################################### # Global File Location variables # ####################################################################### $sc_cgi_lib_path = "./Library/cgi-lib.pl"; $sc_mail_lib_path = "./Library/mail-lib.pl"; $sc_html_search_routines_library_path = "./Library/web_store_html_search.pl"; $sc_db_lib_path = "./Library/web_store_db_lib.pl"; $sc_order_lib_path = "./Library/web_store_order_lib.pl"; $sc_pgp_lib_path = "./Library/pgp-lib.pl"; $sc_html_setup_file_path = "./Library/web_store_html_lib.pl"; $sc_user_carts_directory_path = "./User_carts"; $sc_data_file_path = ""; # No Data file for HTML version $sc_options_directory_path = ""; # No options dir needed for HTML version $sc_html_product_directory_path = "./Html/Products"; $sc_html_order_form_path = "./Html/outlet_order_form.html"; $sc_store_front_path = "./Html/outlet_frontpage.html"; $sc_counter_file_path = "./Admin_files/counter.file"; $sc_error_log_path = "./Admin_files/error.log"; $sc_access_log_path = "./Admin_files/access.log"; $sc_main_script_url = "web_store.cgi"; $sc_order_script_url = "web_store.cgi"; ####################################################################### # Database Definition Variables # ####################################################################### # NOTE: These variables are not really necessary if you are # using the HTML version of the cart, UNLESS you happen to # use the HTML version with the Database Check turned on. # # $db{"product_id"} = 0; $db{"product"} = 1; $db{"price"} = 2; $db{"description"} = 3; @sc_db_display_fields = ("Description"); @sc_db_index_for_display = ($db{"image_url"}, $db{"description"}, $db{"options"}); @sc_db_index_for_defining_item_id = ($db{"product_id"}, $db{"product"}, $db{"price"}, $db{"description"}); $sc_db_index_of_price = $db{"price"}; # Db_variables for searching # # All query fields should begin with # sc_query_ so that they will be passed # from screen to screen as hidden variables # if they have value # # Special query input form fields are # sc_db_exact_match = "yes" if no pattern match # and sc_db_case_sensitive = "yes", if we are doing # a case insensitive search # @sc_db_query_criteria = ("query_price_low_range|2|>|number", "product|1|=|string", "keywords|1,2,3,4,5|=|string"); # We want to restrict the number of rows returned # so that the browser does not get overloaded # $sc_db_max_rows_returned = 25; ####################################################################### # Cart Definition Variables # ####################################################################### # The cart associative array is defined via the following steps: # # 1. The 0th field is ALWAYS the quantity of the purchased item # # 2. The subsequent fields are the same fields defined # in the @sc_db_index_for_defining_item_id variable. # This is done because whatever is defined in this array, # becomes the part of the product defined in the user's cart. # # 3. The field before the next to last field is ALWAYS the # "options" that have been selected by the user. If you are # not using options, this field still needs to be here. It will # just be used as an empty place marker. # # 4. The next to last field is ALWAYS the price # after options have been calculated in with the normal price. # # 5. The last field is ALWAYS a computer generated # unique identifier to distinguish cart line items from # each other. $cart{"quantity"} = 0; $cart{"product_id"} = 1; $cart{"product"} = 2; $cart{"price"} = 3; $cart{"description"} = 4; $cart{"options"} = 5; $cart{"price_after_options"} = 6; # This is the index to the original item price $sc_cart_index_of_price = $cart{"price"}; $sc_cart_index_of_price_after_options = $cart{"price_after_options"}; # this will show the index of another column of our choice # to measure -- such as weight or volume if we are selling # something where the weight or volume affects the shipping # or discount logic. # $sc_cart_index_of_measured_value = $cart{"price"}; @sc_cart_display_fields = ("Description", "Options", "Price After Options"); @sc_cart_index_for_display = ($cart{"description"}, $cart{"options"}, $cart{"price_after_options"}); $sc_cart_index_of_item_id = $cart{"product_id"}; $sc_cart_index_of_quantity = $cart{"quantity"}; ####################################################################### # Order Form Definition Variables # ####################################################################### %sc_order_form_array =('01-name', 'Name', '02-b_street_address', 'Billing Address Street', '03-b_city', 'Billing Address City', '04-b_state', 'Billing Address State', '05-b_zip', 'Billing Address Zip', '06-b_country', 'Billing Address Country', '07-m_street_adress', 'Mailing Address Street', '08-m_city', 'Mailing Address City', '09-m_state', 'Mailing Address State', '10-m_zip', 'Mailing Address Zip', '11-m_country', 'Mailing Address Country', '12-phone', 'Phone Number', '13-fax', 'Fax Number', '14-e-mail', 'Email', '15-URL', 'URL', '16-link', 'Link', '17-type_of_card', 'Type of Card', '19-cardname', 'Name Appearing on Card', '20-card_number', 'Card Number', '21-ex_date', 'Card Expiration', '22-shipping', 'Shipping Method'); @sc_order_form_required_fields = ("01-name", "02-b_street_address", "03-b_city", "04-b_state", "05-b_zip", "12-phone", "14-e-mail"); #the following will generate hidden fields with #the contents of the cart inside of them. $sc_order_with_hidden_fields = "yes"; # increasing numerical value (1,2,3) if its 0, # then it never gets calculated at this stage # $sc_calculate_discount_at_display_form = 0; $sc_calculate_discount_at_process_form = 0; $sc_calculate_shipping_at_display_form = 0; $sc_calculate_shipping_at_process_form = 0; $sc_calculate_sales_tax_at_display_form = 0; $sc_calculate_sales_tax_at_process_form = 0; @sc_order_form_shipping_related_fields = (); @sc_order_form_discount_related_fields = (); # Shipping_logic is an array of criteria of what type of # shipping cost to apply. # The first pipe-delimited fields correspond to the # sc_order_form_shipping_related_fields. # # Subsequent fields correspond to total quantity, total price, # and total measurement field. If the field is left blank, # then that total does not enter into the equation of what # shipping logic to apply. # # The last field is the amount of shipping to apply. # It is either a hard dollar amount or it is a percentage # (indicated by % sign) that will be applied to the # total price of the order. # @sc_shipping_logic = ("|11-||5", "|1-10||10%"); # Discount logic is the same as shipping logic except # that whatever value is calculated for the discount will # be subtracted rather than added to the grand total. # @sc_discount_logic = (); # # Sales tax is always a percentage of the total order # $sc_sales_tax = ".05"; # 5% $sc_sales_tax_form_variable = "04-b_state"; @sc_sales_tax_form_values = ("md", "Maryland"); # # Process Order Variables: # $sc_order_email = "you\@yourdomain.com"; $sc_send_order_to_email = "yes"; $sc_send_order_to_log = "no"; $sc_order_log_file = "./Admin_files/order.log"; $sc_order_check_db = "no"; # # Do we use PGP Encryption -- WARNING: This is a difficult # option to setup. You must go into the pgp-lib.pl file # and edit the pgp variables in the header for your specific # setup. # $sc_use_pgp = "no"; $sc_pgp_temp_file_path = "./Admin_files"; ####################################################################### # Store Option Variables # ####################################################################### $sc_use_html_product_pages = "yes"; # A yes means that you will not generate # Product pages using a database. $sc_should_i_display_cart_after_purchase = "no"; # A no means that the # client will be sent back to the product # page from which they just ordered. # A yes means that they will be taken to a # page displaying their current cart after # every purchase. $sc_shall_i_let_client_know_item_added = "yes"; $sc_item_ordered_message = "

Your order has been added to your cart! Thank you!

"; $sc_shall_i_email_if_error = "no"; $sc_shall_i_log_errors = "yes"; $sc_shall_i_log_accesses = "yes"; ####################################################################### # HTML Search Variables # ####################################################################### $sc_root_web_path = "/usr/local/etc/httpd/htdocs/Web_store/Html/Products"; $sc_server_url = "http://www.yourdomain.com/Web_store/Html/Products"; @sc_unwanted_files = ('*.cgi'); ####################################################################### # Error Message Variables # ####################################################################### $sc_page_load_security_warning = "I am sorry, but you may only use this program to view HTML pages. If you absolutely MUST view non-HTML pages within your store, you must modify lines 79-81, but be careful, doing so may make your system vulnerable to hackers."; $sc_randomizer_error_message = "There must be something wrong with your local rand function because I cannot get a unique, random number for your shopping cart. Please check the call to rand in the Assign a Shopping Cart routine."; ####################################################################### # Miscellaneous Variables # ####################################################################### $sc_admin_email = "you\@yourdomain.com"; @acceptable_file_extensions_to_display = (".html", ".htm", ".shtml"); $sc_money_symbol = "Lira"; $sc_money_symbol_placement = "back"; $sc_current_century = "20"; $sc_number_days_keep_old_carts = .5; $sc_no_frames_button = qq! !; $sc_product_display_title = "Product Listing"; $sc_product_display_header = qq! !; $sc_product_display_footer = qq!
Quantity %s %s

!; $sc_product_display_row = qq~ %s %s
%s
~;