I finally managed to get this mod working clean in a 3.5.10 site. Here is what I did:
1). Uncheck the option "When a customer isn't logged in, it is presumed that he is from a default country." in General.
2). Create calculate.gif and place it in /skin1/images (you could just use the supplied go.gif).
3). Modified cart.php:
Old Code:
x_session_register("cart");
x_session_register("intershipper_rates");
x_session_register("intershipper_recalc");
x_session_unregister("secure_oid");
x_session_register("extended_userinfo");
x_session_register("anonymous_checkout");
New Code:
if(!$login){
$smarty->assign("not_logged_message","1");
}
else{
$smarty->assign("not_logged_message","0");
}
x_session_register("cart");
x_session_register("intershipper_rates");
x_session_register("intershipper_recalc");
x_session_unregister("secure_oid");
x_session_register("extended_userinfo");
x_session_register("anonymous_checkout");
x_session_register("zipcode_estimate");
if($HTTP_GET_VARS['zip_estimate'] == "clear"){
$zipcode_estimate = "";
func_header_location("cart.php");
}
if(!empty($HTTP_POST_VARS['zip_estimate'])){
$zipcode_estimate = $_POST['zip_estimate'];
$count = substr_count($zipcode_estimate,"0") + substr_count($zipcode_estimate,"1") + substr_count($zipcode_estimate,"2") + substr_count($zipcode_estimate,"3") + substr_count($zipcode_estimate,"4") + substr_count($zipcode_estimate,"5") + substr_count($zipcode_estimate,"6") + substr_count($zipcode_estimate,"7") + substr_count($zipcode_estimate,"8") + substr_count($zipcode_estimate,"9");
if($count != 5){ //checking for 5 digits
$zipcode_estimate = "";}
func_header_location("cart.php");
}
if($zipcode_estimate != ""){
$config["General"]["apply_default_country"] = "Y";
$config["General"]["default_zipcode"] = $zipcode_estimate;
$smarty->assign("estimate","NO");
}
4). Modified top.inc.php
Old Code:
if (!in_array($__key, array("HTTP_GET_VARS","HTTP_POST_VARS","HTTP_SERVE R_VARS","HTTP_ENV_VARS","HTTP_COOKIE_VARS","HTTP_P OST_FILES","__key","__val")))
New Code:
if (!in_array($__key, array("HTTP_GET_VARS","HTTP_POST_VARS","HTTP_SERVE R_VARS","HTTP_ENV_VARS","HTTP_COOKIE_VARS","HTTP_P OST_FILES","__key","__val","_GET","_POST","_SERVER ")))
5). Modified cart_totals.tpl
Added this code to the bottom of the file:
<div align=right>
{if $not_logged_message eq "1"}
{if $estimate ne "NO"}
Please enter your zip code to
calculate shipping charges.
<input type=TEXT name='zip_estimate' size=5 maxlength=5>
<input type=image alt="Calculate Shipping" src="../skin1/images/calculate.gif" border=0 align=middle name=btnCalculate >
{else}
Click here to change your shipping zip code.
{/if}
{/if}
If you use this method, make sure you back things up first! I am not a programmer, just a hacker.