Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2005
    Plugin Contributions

    Default 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.

  2. #2
    Join Date
    Oct 2005
    Plugin Contributions

    Default Re: Shipping Estimator - Change Default State

    any help appreciated

  3. #3
    Join Date
    Jan 2005
    Seminole, Florida, USA
    Plugin Contributions

    Default 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.

  4. #4
    Join Date
    Sep 2003
    Plugin Contributions

    Default 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 ...
    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: v1.5.5]
    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!

  5. #5
    Join Date
    Jan 2004
    Blog Entries
    Plugin Contributions

    Default 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'] : '';
       $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'] : '';
    Replace the ''at the end of the two lines with the appropriate values, as shown in red. Leave the middle line alone.
    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.



Similar Threads

  1. Click-n-ship AutoFill Button Contrib
    By qhome in forum Addon Shipping Modules
    Replies: 826
    Last Post: 23 Feb 2016, 01:57 AM
  2. FAQ Manager
    By ccn1 in forum All Other Contributions/Addons
    Replies: 368
    Last Post: 29 Nov 2011, 09:20 AM
  3. [Done v1.3.7] State Selection in Shipping Estimator
    By Woodymon in forum Bug Reports
    Replies: 4
    Last Post: 30 Dec 2006, 12:12 PM
  4. 1101 BLOB/TEXT column can't have a default value
    By tkroh in forum Installing on a Windows Server
    Replies: 3
    Last Post: 27 Dec 2006, 10:28 PM
  5. State Selector for Zen Cart 1.36 (with shipping estimator support)
    By Woodymon in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 22 Dec 2006, 05:29 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Zen-Cart, Internet Selling Services, Klamath Falls, OR