Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Set default selected shipping method

    I have a store where we offer different shipping methods, we also offer the ability to collect in store, this is the cheapest method and the shop selects this as default to be the shipping option as it is the cheapest, is there a way not to have this method selected as the default option as customers are not looking what this shipping method means.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Set default selected shipping method

    There's this:

    http://www.zen-cart.com/forum/showthread.php?t=90218

    I haven't tried it.

  3. #3
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Set default selected shipping method

    Cheers .

  4. #4
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    bug Re: Set default selected shipping method

    Quote Originally Posted by stevesh View Post
    This is not Paypal Express friendly. Anyone got a fix before invest another hour of my life I'll never get back?

    Thanks

    Twitch.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: Set default selected shipping method

    If you don't want PayPal Express Checkout to auto-select cheapest shipping, just turn that switch off in your ZC Express Checkout settings.
    .

    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.

  6. #6
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    bug Re: Set default selected shipping method

    Quote Originally Posted by DrByte View Post
    If you don't want PayPal Express Checkout to auto-select cheapest shipping, just turn that switch off in your ZC Express Checkout settings.
    It is off. That's the unfortunate part. I posted a fix for the buggy stock 'storepickup' shipping module here:

    http://www.zen-cart.com/forum/showthread.php?t=178003

    The result of that fix is now the store pickup works, the shipping estimator doesn't see the $0.00 value and selects the correct 'cheapest' shipping option :).

    However, even with the paypal 'cheapest' switch off in admin, clicking the express checkout or landing on the shipping options page returns the default selection to the $0.00 in store pickup option.

    I have looked at the fix for the 'cheapest' code on the shipping options page ->remming out the line that operates the selection causes paypal to see the $0.00 in store shipping module or none at all.

    (fix found in the forum looks at includes/templates/your_template/tpl_checkout_shipping_default.php and asks to hide this line:
    $checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']) ? true : false);
    This to me defeats the purpose of having cart filters if you're just going to shut them off)

    So, instead of a hack, I'm looking at a solid hard coded fix now. If you've got any advice I'd be happy to hear it.

    Thanks

    Twitch.


  7. #7
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: Set default selected shipping method

    It seems to me you're using the system in a way it wasn't intended. Why are you using the "Store Basis" method in the first place? And why are you charging tax on a Store Pickup option? Shouldn't it be free?

    In short I don't think I agree with your alleged "fix", and it seems clear to me that I can't offer any assistance without knowing EXACTLY what I need to do to my brand new clean fresh uncustomized install of v1.3.9h in order to be able to replicate your problem. And the "why" behind all the settings you've set. After that, then maybe I might be able to offer some assistance.
    .

    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.

  8. #8
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,550
    Plugin Contributions
    70

    Default Re: Set default selected shipping method

    I'm confused because when I look at the cheapest_method function, it explicitly checks for storepickup and will not use that as the cheapest rate. However, I think this is a bug because if storepickup is the ONLY rate, it still will not get selected as the cheapest. This causes issues with mods like FEC.

    Here is my fix.

    Change line 172 to:

    PHP Code:
    if (($rates[$i]['cost'] < $cheapest['cost'] and $rates[$i]['module'] != 'storepickup') || $size == 1) { 
    and line 176 to:

    PHP Code:
    if ($rates[$i]['module'] != 'storepickup' || $size == 1) { 

  9. #9
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,550
    Plugin Contributions
    70

    Default Re: Set default selected shipping method

    DrByte,

    Would it be possible to somehow achieve this using an observer?

    At the bottom of the function I see:

    PHP Code:
          $this->notify('NOTIFY_SHIPPING_MODULE_CALCULATE_CHEAPEST'$cheapest);
          return 
    $cheapest

  10. #10
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Set default selected shipping method

    How to select the default cheapest shipping module - turn off the storepickup filter.
    Updated for ZenCart 1.51, Clean Install, Twitch Wholesale with Wholesale Attributes Installed.

    As mentioned previously - just hide the original code, you may need it again.

    includes/classes/shipping.php
    Hide line 176
    // if ($rates[$i]['cost'] < $cheapest['cost'] and $rates[$i]['module'] != 'storepickup') {
    Change it to this...
    if ($rates[$i]['cost'] < $cheapest['cost']) {

    Then hide the second filter:
    line 180 - 182 like this...
    // if ($rates[$i]['module'] != 'storepickup') {
    $cheapest = $rates[$i];
    // }

    Why you ask? The cart at http://sheldrakeautomotive.com/sacart/ is being used to track wholesale inventory for a wholesale customer, they don't pay shipping charges and want a quick and simple checkout.

    What about Retail?
    I excluded the Twitch Wholesale/Retail filter, if you have Twitch Wholesale installed and would like it just message me.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

 

 

Similar Threads

  1. v154 Select table shipping method as default - freedelivery is being set maybe as cheapest
    By SarahL in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 24 Aug 2015, 03:32 PM
  2. Replies: 0
    Last Post: 27 Mar 2012, 12:59 AM
  3. Need to set default shipping method to FedExGround
    By rgshearer in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 14 Apr 2011, 04:15 PM
  4. Set shipping method to Default?
    By Chariotz in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 5 Dec 2009, 03:25 AM
  5. Set a Default Shipping Method in Checkout?
    By magpie in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 29 Aug 2009, 05:50 PM

Bookmarks

Posting Permissions

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