| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Pre-Login Shipping Calculator | ||||
|
|
Thread Tools | Search this Thread |
#191
|
|||||||
|
|||||||
Re: Pre-Login Shipping Calculator
I am having trouble with the "Click here to change your zip code" link. All of the previous entries have been converted to links. I tried the text in post #174, but it is not working for me. Here is my cart.php text (sorry, I don't know how to insert it in the post):
# BCSE End //include "./nocookie_warning.php"; 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("payment_cc_fields"); x_session_register("current_carrier","UPS"); x_session_register("is_sns_action"); # prelogin calculator start # modified by cart-lab.com to allow US and CA zipcodes x_session_register("zipcode_estimate"); $trusted_post_variables = array("zip_estimate"); require $xcart_dir."/include/states.php"; if($HTTP_GET_VARS['zip_estimate'] == "clear"){ $zipcode_estimate = ""; func_header_location("cart.php"); } if(!empty($zip_estimate)){ $zipcode_estimate = $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"); $count = strlen($zipcode_estimate); if($count < 4){ //checking for 5 digits $zipcode_estimate = "";} func_header_location("cart.php#[anchor name]"); } if($zipcode_estimate != ""){ $count = strlen($zipcode_estimate); if($count == 5) { $config["General"]["apply_default_country"] = "Y"; $config["General"]["default_zipcode"] = $zipcode_estimate; $userinfo["s_zipcode"] = $zipcode_estimate; $smarty->assign("estimate","NO"); } else { $config["General"]["apply_default_country"] = "Y"; $config["General"]["default_country"] = "CA"; $config["General"]["default_zipcode"] = $zipcode_estimate; $userinfo["s_country"] = "CA"; $userinfo["s_zipcode"] = $zipcode_estimate; $smarty->assign("estimate","NO"); } } # prelogin calculator end Post 174 says to make the link: <a href='https://www.*****.com/store/cart.php?zip_estimate=clear'>Click here to change your zip code</a> When I do this, I get a 404 error each time I try to change to zip code. Could someone give me VERY basic instructions on how to fix this? My cart.php file is located in my "public_html" directory. I tried changing "store" to "public_html" but I don't really understand what I'm doing & it didn't work. Thanks! |
|||||||
#192
|
|||||||
|
|||||||
Re: Pre-Login Shipping Calculator
Quote:
Try removing "public_html" from the URL, you just need to reference the link to "http://www.themommymarketplace.com/cart.php?$zipcode_estimate=clear" Also make sure you remove any spaces before or after the word "clear"
__________________
---- Tracy Smith Version 4.1.8 |
|||||||
#193
|
|||||||
|
|||||||
Re: Pre-Login Shipping Calculator
I am using 4.0.18 and one post said the code in post #157 works for that but I can't get it to work. One of my problems is in cart.php I found 3 instances of this, $intershipper_recalc = "Y"; I assumed after the first one. I did try all 3 locations but with no joy.
The problem is after I inserted a zip code the box went away as did all my shipping options. I could not do anything after that change zip codes or shipping options. I would love to get this working but after 6 hours on a live site I uninstalled it for now until I can get some advice. Thanks, Mike
__________________
X-Cart 4.3.1 Buy Together Module, AlteredCart CDSEO Pro One Page Checkout, AlteredCart Smart Search, AlteredCart On Sale, AlteredCart |
|||||||
#194
|
|||||||||
|
|||||||||
Re: Pre-Login Shipping Calculator
Could anybody clue me in on how to get the zip code the customer entered to display after they enter it?
TIA
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10 |
|||||||||
#195
|
|||||||||
|
|||||||||
Re: Pre-Login Shipping Calculator
this works for me
<a href='/storename/cart.php?zip_estimate=clear'>Click here to change your zip code</a> ({$userinfo.s_zipcode})
__________________
Road Rash Apparel LLC www.roadrashapparel.com X-Cart Gold Ver.4.1.8 DSEFU Mod PHP 4.3.11 MySQL server 4.1.22-max-log MySQL client 5.0.18 Web server Apache Operation system Linux Perl 5.008 XML parser (expat) 1.95.6 |
|||||||||
#196
|
|||||||
|
|||||||
Re: Pre-Login Shipping Calculator
I have read through all the post in this thread and am a bit confused. I am running 4.1.7 and would like to add a shipping estimator.
Can somebody point me to a post or two that might work with 4.1.7? Thanks, Dean
__________________
Dean Mayes http://www.alabu.com x-cart v4.1.9 [unix] PHP 5.2.5 MySQL 5.0.22 New York, USA |
|||||||
#197
|
|||||||||
|
|||||||||
Re: Pre-Login Shipping Calculator
Quote:
Thank you! dem I believe I used: http://forum.x-cart.com/showpost.php?p=53755&postcount=74 make sure you change: HTML Code:
to the proper <a href ...> tag. The forum upgrade seems to have messed them up.
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10 |
|||||||||
#198
|
|||||||
|
|||||||
Re: Pre-Login Shipping Calculator
Hey BSCE,
I have X-Cart 4.0.19 I installed your modification but I found a little glitch in my site with it. Goto www.biodieselwarehouse.com then add some items to your cart. Then put in a test zip code....then click CHECKOUT....it will then ask you for all your personal info...but BEFORE entering it....click the Click to change your Zip Code link. It ends up making my layout all screwy. ANy suggestions? Thanks! -Mike Lannen -X-Cart Gold 4.0.19 -Linux -UPS Real Time Calculator Quote:
__________________
Mike V.4.1.11 V 4.2.2 |
|||||||
#199
|
|||||||
|
|||||||
Re: Pre-Login Shipping Calculator
Quote:
Did I miss the answer for this? I, too, am running 4.1.7 and would like to have this option added. Thanks
__________________
4.1.7 X-Cart Gold Product Configurator Module Advanced Order Management Module RMA Module Feature Compare Module Blue Dream theme by 7Dana.com |
|||||||
#200
|
|||||||
|
|||||||
Re: Pre-Login Shipping Calculator
Thanks rackit for this awesome mod!!
__________________
4.0.18 |
|||||||
|
|||
X-Cart forums © 2001-2020
|