Forums / General Questions / Shipping Estimator - Change Default State

Shipping Estimator - Change Default State

Locked

Started by harry2cool on 25 Jun 2007, 5:38 AM · Views: 2,649

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:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

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

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
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)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.