Zen Cart Logo
Forums / General Questions / Shipping Estimator - Change Default State

Shipping Estimator - Change Default State

Locked

Views: 2,644

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
25 Jun 2007, 5:38 AM
#1
harry2cool avatar

harry2cool

Zen Follower

Join Date:
Oct 2005
Posts:
280
Plugin Contributions:
0

Shipping Estimator - Change Default State

How do I change the guest state to say "New York" in the guest mode while one is viewing "Shipping Estimator" , the default country is "USA" but the default state is not selected.

However I do not want this default when one is logged in.

Hope for some help.

3 Jul 2007, 7:05 PM
#2
harry2cool avatar

harry2cool

Zen Follower

Join Date:
Oct 2005
Posts:
280
Plugin Contributions:
0

Re: Shipping Estimator - Change Default State

any help appreciated

16 Aug 2007, 12:42 PM
#3
tronno22556 avatar

tronno22556

Zen Follower

Join Date:
Jan 2005
Location:
Seminole, Florida, USA
Posts:
139
Plugin Contributions:
0

Re: Shipping Estimator - Change Default State

I too am looking for the same feature.

Oftentimes I get customers say "all you offer is 'Store Pick-up'".

Not true. They just didn't fill in their zip code.

I would like to change the default Country to USA (Which it is already doing) and change default State to Florida and default zip to 33777 so that at least some sort of shipping price shows and they realize we do ship products out.

But like harry2cool wants, I don't want the defaults to fill in if they already have those defined in their profile.

I looked into the code and it appears to be controlled by MySQL. I don't know how to define the "selected" option as it is coded.

16 Aug 2007, 2:54 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping Estimator - Change Default State

Perhaps just customizing the Shipping Estimator with a little text of instruction would go a long way to helping customers use it right ... :smile:

16 Aug 2007, 8:04 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Shipping Estimator - Change Default State

Ajeh's point is well-raised. Giving default shipping rates to a generic destination isn't very accurate.

nevertheless, if you must set defaults, edit /includes/modules/YOUR_TEMPLATE/shipping_estimator.php
around line 37 you'll see:```
$zip_code = (isset($_SESSION['cart_zip_code'])) ? $_SESSION['cart_zip_code'] : [B]''[/B];
$zip_code = (isset($_POST['zip_code'])) ? strip_tags(addslashes($_POST['zip_code'])) : $zip_code;
$state_zone_id = (isset($_SESSION['cart_zone'])) ? (int)$_SESSION['cart_zone'] : [B]''[/B];

The first value is a zip code. 
The second value is the NUMBER of the zone associated with the state you want selected. (from the Zones section in your Admin)