KGOLF11
Newbie - One Blade
Joined: 14 Apr 2005
Posts: 14
|
Bonnie,
Thanks for the responce:
In trying to edit the agora.setup.db I could not find the variables you provided. Is there something else within this code you see that I can change to fix the problem. Thanks again very much.
Kris
#######################################################################
# Global Store Control variables #
#######################################################################
$versions{'agora.setup.db'} = "20010917";
# set this to "" to always calculate the tax
$sc_sales_tax_form_variable = "Ecom_ShipTo_Postal_StateProv";
# Use a line like this to set a custom library search path
# to look for things like the LWP library (you must uncomment
# it and set the path for your server!)
#unshift(@INC,"/usr/local/perl5/site_perl");
# DELUXE HTML helper definitions
# Someday some of these html modifiers may be in the manager
$sc_browser_header = "Content-type: text/html\n\n";
$sc_qty_box_on_cart_display = "no";
$cart_font_style = "<FONT FACE=Arial SIZE=2>";
$cartnum_font_style = "<FONT FACE=Arial SIZE=2>";
$cart_table_def = 'BORDER="1" bordercolor="black" CELLPADDING="5" BGCOLOR="#CCCCCC"' .
' CELLSPACING=0';
$cart_heading_def = 'BGCOLOR="#FFFFFF"';
$cart_item_def = 'ALIGN="center"';
$order_table_def = 'bgcolor="#ffffff" BORDER=0 CELLPADDING=2 CELLSPACING=0';
$order_heading_def = 'align=center colspan=2 BGCOLOR="#ffffff"';
$order_item_def = 'ALIGN="right"';
$offline_ver_tbldef = 'width="500" bgcolor="#cccccc" cellpadding="2" ' .
'cellspacing="0" border="1" bordercolor="black"';
$offline_ver_tbldef2 = 'width="500" bgcolor="#ffffff" cellpadding="2" ' .
'cellspacing="0" border="1" bordercolor="black" ';
$sc_search_nav_font = "COLOR=\"#000000\"";
$sc_search_nav_bgcolor = "\"#ffffff\"";
$sc_search_nav_width = "526";
#failed attempt to create customized secure head variable
#$sc_secure_head_info = '<script language="JavaScript" #src='https://secure.comodo.net/trustlogo/javascript/trustlogo.js'>
#</script>';
$sc_standard_head_info = '';
$sc_standard_body_info = 'bgcolor="#FFFFFF" text="#000000"';
$sc_replace_orderform_form_tags = "yes";
$sc_image_string_template = '<IMG SRC="%%URLofImages%%/%%image%%" BORDER=0>';
# End of html thingies
# Setup the directory definitions first
$sc_admin_dir = "./admin_files";
$sc_data_file_dir = "./data_files";
$sc_html_dir = "./html";# sort of like old path_to_html variable
$sc_lib_dir = "./library";
$sc_logs_dir = "./log_files";
$sc_templates_dir = "$sc_html_dir/html-templates/";
$sc_user_carts_directory_path = "./shopping_carts";
$sc_cgi_lib_path = "$sc_lib_dir/cgi-lib.pl";
$sc_mail_lib_path = "$sc_lib_dir/mail-lib.pl";
$sc_ship_lib_path = "$sc_lib_dir/shipping_lib.pl";
$sc_html_setup_file_path = "$sc_lib_dir/agora_html_lib.pl";
$sc_process_order_lib_path = "$sc_lib_dir/$sc_gateway_name-order_lib.pl";
$sc_cookie_lib = "$sc_lib_dir/cookie-lib.pl";
$sc_store_header_file = "$sc_templates_dir/store_header.inc";
$sc_store_footer_file = "$sc_templates_dir/store_footer.inc";
$sc_secure_store_header_file = "$sc_templates_dir/secure_store_header.inc";
$sc_secure_store_footer_file = "$sc_templates_dir/secure_store_footer.inc";
if ($sc_database_lib eq "") {#default it
$sc_database_lib="agora_db_lib.pl";
}
$sc_db_lib_path = "$sc_lib_dir/$sc_database_lib";
$sc_order_lib_path = "$sc_lib_dir/agora_order_lib.pl";
$sc_pgp_lib_path = "$sc_lib_dir/pgp-lib.pl";
$sc_data_file_path = "$sc_data_file_dir/data.file";
$sc_options_directory_path = "$sc_html_dir/options";
$sc_generic_directory_path = "$sc_html_dir/files";
$sc_html_product_directory_path = "$sc_html_dir/pages";
$sc_html_order_form_path = "$sc_html_dir/main/$sc_gateway_name-orderform.html";
$sc_store_front_path = "http://www.golfmole.com";
#default=$sc_store_front_path = "$sc_html_dir/main/frontpage.html";
$sc_counter_file_path = "$sc_admin_dir/counter.file";
$sc_cart_user_lib_path = "$sc_admin_dir/cart_user_lib.pl";
$sc_error_log_path = "$sc_logs_dir/error.log";
$sc_access_log_path = "$sc_logs_dir/access.log";
$sc_order_log_directory_path = "$sc_logs_dir/orders";
$error_page = "$sc_html_dir/pages/error.html";
$sc_main_script_url = "agora.cgi";
if ($sc_stepone_order_script_url eq "") { #set default value
$sc_stepone_order_script_url = $sc_store_url;
}
$sc_cookie_days = 365; # cookie lifetime, not cart lifetime
$sc_number_days_keep_old_carts = 0.5; # cart lifetime in days
$sc_allow_location_redirect = "yes"; # helpful for cookies
$sc_test_for_store_cart_change_repeats = 1; # test for reloaded pages
# As of 3.1 taken out of manager, should be left on unless
# a good reason for disabling is found (like security concerns
# on your particular server.) Agorascript is now used in much
# of the store!
$sc_use_agorascript = "yes";
# if this var is "" then it won't convert the underlines
$sc_convert_product_token_underlines = " "; #convert to what char
#######################################################################
# Database Definition Variables #
#######################################################################
$sc_db_flatfile_caching_ok = "yes";
$VF_DEF{"PRODUCT"} = "db";
$db[0]="product_id";
$db[1]="product";
$db[2]="price";
$db[3]="name";
$db[4]="image_url";
$db[5]="description";
$db[6]="shipping";
$db[7]="user1";
$db[8]="user2";
$db[9]="user3";
$db[10]="user4";
$db[11]="user5";
$db[12]="options";
{ my $inx=-1;
my $txt;
foreach $txt (@db) {
$inx++;
$db{$txt}=$inx;
}
}
@sc_db_display_fields = ("Product");
@sc_db_index_for_display = ($db{"image_url"},
$db{"name"},
$db{"description"},
$db{"options"},
$db{"price"},
$db{"shipping"},
$db{"user1"},
$db{"user2"},
$db{"user3"},
$db{"user4"},
$db{"user5"});
@sc_db_index_for_defining_item_id =
($db{"product_id"},
$db{"product"},
$db{"price"},
$db{"name"},
$db{"image_url"},
$db{"shipping"});
$sc_db_index_of_product_id = $db{"product_id"};
$sc_db_index_of_product = $db{"product"};
# These two can be changed if need be, they are used to get the db price
# for verification when adding to the cart.
# could use a virtual field
$sc_db_price_field_name = "price";
$sc_db_index_of_price = $db{$sc_db_price_field_name};
@sc_db_query_criteria = ("product_id|0|=|string",
"p_id|0|=|string",
"product|1|=|string",
"user1|$db{'user1'}|=|string",
"user2|$db{'user2'}|=|string",
"user3|$db{'user3'}|=|string",
"user4|$db{'user4'}|=|string",
"user5|$db{'user5'}|=|string",
"keywords|1,3,5|=|string",
"lopr|2|<=|number",
"hipr|2|>=|number",
"query_price_low_range|2|<=|number",
"query_price_high_range|2|>=|number");
#######################################################################
# 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.
$sc_opt_sep_marker = '{';
$VF_DEF{"CART"} = "cart";
$cart[0]="quantity";
$cart[1]="product_id";
$cart[2]="product";
$cart[3]="price";
$cart[4]="name";
$cart[5]="image";
$cart[6]="shipping";
$cart[7]="shipping_calc_flag";
$cart[8]="options_ids";
$cart[9]="user1";
$cart[10]="user2";
$cart[11]="user3";
$cart[12]="options";
$cart[13]="price_after_options";
$cart[14]="unique_cart_line_id";
#
{ my $inx=-1;
my $txt;
foreach $txt (@cart) {
$inx++;
$cart{$txt}=$inx;
}
}
# old-style vitual fields ...
# Virtual Cart Fields are all the negated value of position in data.file
$cart{"db_description"} = -5;
$cart{"db_price"} = -2;
$cart{"db_shipping"} = -6;
$cart{"db_user1"} = -7;
$cart{"db_user2"} = -8;
$cart{"db_user3"} = -9;
$cart{"db_user4"} = -10;
$cart{"db_user5"} = -11;
###
# new-style virtual fields, perl code, first char is *
###
$cart{"web_options"} = '* $ans=&cart_web_options(&vf_eval("options"));';
$cart{"email_options"} = '* $ans=&cart_email_options(&vf_eval("options"));';
# a couple short support routines
$sc_opt_web_strip_part_number = "yes";
$sc_opt_email_leading_spaces = 15;
#########
$sc_cart_index_of_price = $cart{"price"};
$sc_cart_index_of_image = $cart{"image"};
$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{"shipping"};
$sc_cart_index_of_item_id = $cart{"product_id"};
$sc_cart_index_of_quantity = $cart{"quantity"};
# 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 = 2;
$sc_calculate_discount_at_process_form = 2;
if ($sc_calculate_shipping_loop eq "" ||
$sc_calculate_shipping_loop < 0 ||
$sc_calculate_shipping_loop > 3 ) {
$sc_calculate_shipping_loop = 3; # set the loop value to default
}
if ($sc_use_SBW =~ /yes/i) { # need ZIP before we can determine
$sc_calculate_shipping_at_display_form = 0;
} else { #we can display, value is actual ship price
$sc_calculate_shipping_at_display_form = $sc_calculate_shipping_loop; #3
}
$sc_calculate_shipping_at_process_form = $sc_calculate_shipping_loop; #3
$sc_calculate_sales_tax_at_display_form = 3;
$sc_calculate_sales_tax_at_process_form = 3;
$sc_calculate_extra_tax1_at_display_form = 3;
$sc_calculate_extra_tax1_at_process_form = 3;
$sc_calculate_extra_tax2_at_display_form = 3;
$sc_calculate_extra_tax2_at_process_form = 3;
$sc_calculate_extra_tax3_at_display_form = 3;
$sc_calculate_extra_tax3_at_process_form = 3;
#
# This may be used in Custom Shipping Logic, can be reset there
# to anything else if need be
@sc_order_form_shipping_related_fields = ('Ecom_ShipTo_Method');
@sc_order_form_discount_related_fields = ();
### Not used in agora ... use custom shipping logic instead in
### manager.cgi! If you want to use this, it is okay, just
### need to call the appropriate routine to execute this
### logic in this array.
# 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 = ("|1||$ship_amount","|2||$ship_amount");
### end of unused stuff
# 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 = ("200.00-|||5%");
#moved to agora admin sub
#$sc_order_check_db = "yes";
# 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.
#
# UPDATE: Now PGP setup is found in manager.cgi, just set
# temp variable here. [SPK 1/18/2000]
$sc_pgp_temp_file_path = "./shopping_carts";
#######################################################################
# Store Option Variables #
#######################################################################
# meaning of possible $sc_use_html_product_pages values
# yes: never generate Product pages using a database.
# no: only generate Product pages from database ...
# maybe: if there is a page specified, use it, otherwise generate
$sc_use_html_product_pages = "maybe";
$sc_repeat_fake_it = "yes"; # attempt to answer well on reload of "cart change"
$sc_shall_i_let_client_know_item_added = "yes";
# For Static HTML pages, if telling them item added ok used to sneak in msg,
# use the %%item_ordered_msg%% token instead! Can enable if needed though:
$sc_allow_sneak_in_message = "no";
# this is for the %%item_ordered_msg%%
$sc_item_ordered_msg_token = "<FONT FACE=ARIAL SIZE=2 COLOR=BLUE>Thank
you, your selection has been added to your order.</FONT>";
# what is placed at the top of "on-the-fly" productPage.inc type pages
$sc_item_ordered_message = "
<TR>
<TD COLSPAN=3><CENTER><FONT FACE=ARIAL SIZE=2 COLOR=BLUE>Thank
you, your selection has been added to your order.</FONT></CENTER></TD>
</TR>
";
$sc_shall_i_email_if_error = "no";
$sc_shall_i_log_errors = "yes";
$sc_shall_i_log_accesses = "yes";
#######################################################################
# HTML Search Variables #
#######################################################################
@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.";
$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_processing_order="no"; # init this
@acceptable_file_extensions_to_display = (".html", ".htm");
$sc_money_symbol = '$';
$sc_money_symbol_spaces = ' ';
$sc_money_symbol_placement = "front";
@sc_sales_tax_form_values = ("$sc_sales_tax_state");
$sc_no_frames_button = qq!
<INPUT TYPE = "submit" NAME = "return_to_frontpage_button"
VALUE = "Return to Frontpage">
!;
$sc_product_display_title = "Golf Mole Store";
$sc_product_display_header = qq!<CENTER><TABLE BORDER="0" WIDTH="550">!;
$sc_product_display_footer_helper = "<tr><td colspan=3><hr></td></tr>";
$sc_product_display_footer = qq!</TABLE></CENTER>!;
# for display in the "orders (sub)totals table"
$sc_totals_table_ship_label = "Shipping";
$sc_totals_table_disc_label = "Discount";
$sc_totals_table_stax_label = "Sales Tax";
$sc_totals_table_gtot_label = "Grand Total";
$sc_totals_table_itot_label = "Item Cost Subtotal";
$sc_totals_table_thdr_label = "Order Totals"; # Table Header
#######################################################################
# Various Message Variables #
#######################################################################
#
# format is $messages{'mod_num'}='the message';
#
#used if not "faking it" on a page reload, displays this msg & cart contents
$messages{'chkref_01'} =
"<center><table width=500><tr><td>The " .
"cart system has detected a possible page-reload " .
"attempt on a page that may have previously changed the " .
"cart contents. The current cart contents are displayed below." .
" </td></tr></table></center>";
#comes up with "manual" changes to the URL in GET method
$messages{'chkref_02'} =
"<center><table width=500><tr><td>Sorry, " .
"all requests involving the cart need to come " .
" from the site's pages directly. This " .
"prevents accidental changes to cart contents. " .
" The current cart contents are displayed below." .
" </td></tr></table></center>";
$messages{'chkref_03'} =
"Refering Site Authentication Failed!<br>\n";
#see also messages ordcnf_07,08
$messages{'ordcnf_01'} =
"<P> </P>\n" .
"Thank you for shopping with Golf Mole. \n" .
"Your order has been received and will be shipped as soon as possible.\n" .
"If you have any questions about your order feel free to \n" .
"email us at <a href=\"mailto:$sc_admin_email\">\n" .
"$sc_admin_email</a>. <br><br>Thank you for shopping with us!\n" .
"Please visit us again soon!<br><P> </P>";
#example of where used is below "Thank You" for an order
$messages{'ordcnf_02'} =
"<a href=\"http://www.golfmole.com\">Return to the Store Front</a>\n" . #formerly href=\$sc_store_url
"<P> </P>\n" .
"<P> </P>";
#Happens if they "submit" the order a second time accidently
$messages{'ordcnf_03'} =
"<P> </P>\n" .
"We do not seem to have an order verification file for this \n" .
"shopping cart! Is it possible your order was already \n" .
"processed? If you are having trouble completing your \n" .
"order, please contact us at <a href=\"mailto:$sc_admin_email\">\n" .
"$sc_admin_email</a>. <br><br>Thank you for shopping with us!\n" .
"<P> </P>\n";
$messages{'ordcnf_04'} =
"Please verify the following information. \n" .
"When you are confident that it is correct, click the \n" .
"'Submit Order For Processing' button below.\n";
$messages{'ordcnf_05'} =
"There was a problem processing this order:";
$messages{'ordcnf_06'} =
"Please verify the above information. \n" .
"When you are confident that it is correct, click the \n" .
"'Secure Orderform' button to enter your payment information.\n";
#see also message ordcnf_01
$messages{'ordcnf_07'} =
"Thank you for your order. We appreciate your business and will " .
"do everything we can to meet your expectations. Please visit us " .
"again soon!\n\n";
$messages{'ordcnf_08'} = "Thank you for your order";
$messages{'ordprc_01'} = qq~I'm sorry, but there seems to
be a problem with your order.  Please
check the order form, verify your information, and
try submitting the order again.~;
#########################################################################
1; # We are a library
|