Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Where to DeSelect "Automatically select lowest prices shipping"

    There's gotta be a switch somewhere but have not located it nor can Mr Google locate it.

    Automatic selection of lowest priced shipping is not a valid shipping option for us. It is an exception.

    Functionality is the same with the default checkout or OPC checkout. Lowest priced shipping is automatically selected.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  2. #2
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,669
    Plugin Contributions
    9

    Default Re: Where to DeSelect "Automatically select lowest prices shipping"

    Quote Originally Posted by RixStix View Post
    There's gotta be a switch somewhere but have not located it nor can Mr Google locate it.

    Automatic selection of lowest priced shipping is not a valid shipping option for us. It is an exception.

    Functionality is the same with the default checkout or OPC checkout. Lowest priced shipping is automatically selected.
    includes/classes/shipping.php

    line 178 is a function called cheapest.

    on line 179 you can try adding a new line:

    PHP Code:
    return false
    and i think that should resolve your issue.

    there does not look like there is a config switch for it.... as far as i can tell.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  3. #3
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Where to DeSelect "Automatically select lowest prices shipping"

    Thank you.

    So far, that edit looks to do what was expected.

    I was looking for a switch since customized code edits create a good chance of getting lost in future upgrades. At least for me, it seems to have that effect.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  4. #4
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Where to DeSelect "Automatically select lowest prices shipping"

    Sorry carlwhat, thanks for your suggestion above, I did try it but got a little bit confused.
    Here is the code in the include/classes/shipping.php around that line..
    Code:
      function cheapest() {
        if (!is_array($this->modules)) return false;
          $rates = array();
    
          foreach($this->modules as $value) {
            $class = substr($value, 0, strrpos($value, '.'));
            if (isset($GLOBALS[$class]) && is_object($GLOBALS[$class]) && $GLOBALS[$class]->enabled) {
              $quotes = isset($GLOBALS[$class]->quotes) ? $GLOBALS[$class]->quotes : null;
              if (empty($quotes['methods'])) {
                continue;
              }
    This is from a zen 1.5.7c with OPC installed.
    I can already see the code you suggested to add in there already but the cheapest options is still already ticked which I would rather NO options to be picked until a customer picks it.
    Please help.
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  5. #5
    Join Date
    Jan 2007
    Location
    Illinois, USA
    Posts
    312
    Plugin Contributions
    0

    Default Re: Where to DeSelect "Automatically select lowest prices shipping"

    Quote Originally Posted by rlexyd View Post
    Sorry carlwhat, thanks for your suggestion above, I did try it but got a little bit confused.
    Here is the code in the include/classes/shipping.php around that line..
    Code:
      function cheapest() {
        if (!is_array($this->modules)) return false;
          $rates = array();
    
          foreach($this->modules as $value) {
            $class = substr($value, 0, strrpos($value, '.'));
            if (isset($GLOBALS[$class]) && is_object($GLOBALS[$class]) && $GLOBALS[$class]->enabled) {
              $quotes = isset($GLOBALS[$class]->quotes) ? $GLOBALS[$class]->quotes : null;
              if (empty($quotes['methods'])) {
                continue;
              }
    This is from a zen 1.5.7c with OPC installed.
    I can already see the code you suggested to add in there already but the cheapest options is still already ticked which I would rather NO options to be picked until a customer picks it.
    Please help.

    Assuming you have more than one shipping option to offer? If you only have 1 option configured, then by default, it will select that option.
    NTO: building a better network thru collaboration
    www.needtoorder.com | www.coffeewitheinstein.com

  6. #6
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Where to DeSelect "Automatically select lowest prices shipping"

    I have two Flat Rate modules, 1 regular and 1 express.
    The regular is always check and I would rather it doesn’t.

  7. #7
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Where to DeSelect "Automatically select lowest prices shipping"

    Quote Originally Posted by rlexyd View Post
    Sorry carlwhat, thanks for your suggestion above, I did try it but got a little bit confused.
    Here is the code in the include/classes/shipping.php around that line..
    Code:
      function cheapest() {
        if (!is_array($this->modules)) return false;
          $rates = array();
    
          foreach($this->modules as $value) {
            $class = substr($value, 0, strrpos($value, '.'));
            if (isset($GLOBALS[$class]) && is_object($GLOBALS[$class]) && $GLOBALS[$class]->enabled) {
              $quotes = isset($GLOBALS[$class]->quotes) ? $GLOBALS[$class]->quotes : null;
              if (empty($quotes['methods'])) {
                continue;
              }
    This is from a zen 1.5.7c with OPC installed.
    I can already see the code you suggested to add in there already but the cheapest options is still already ticked which I would rather NO options to be picked until a customer picks it.
    Please help.
    Being "in there" and being as provided are two different things.

    Yes, there is a line that will return false and that line is the first one after the function declaration, but... returning that result depends on a variable not being an array. The goal as provided above is to always return false not as a conditional situation.

    That would be similar to below:
    Code:
      function cheapest() {
        return false;
        if (!is_array($this->modules)) return false;
          $rates = array();
    
          foreach($this->modules as $value) {
            $class = substr($value, 0, strrpos($value, '.'));
            if (isset($GLOBALS[$class]) && is_object($GLOBALS[$class]) && $GLOBALS[$class]->enabled) {
              $quotes = isset($GLOBALS[$class]->quotes) ? $GLOBALS[$class]->quotes : null;
              if (empty($quotes['methods'])) {
                continue;
              }
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Where to DeSelect "Automatically select lowest prices shipping"

    Thank you McNumbers and Carbonless!
    That is exactly what I was asking for, for a novice like myself, I do need to have the spoon fed to me when it comes to these things :)

    Trying to eliminate a problem with OPC and shipping module (which ONLY occurs when I remove the parens from the includes/classes/shipping.php) as per my other post, and wanted the above to help find some other reason for this..
    https://www.zen-cart.com/showthread....40#post1382840
    I still can't believe it that removing parens can cause the problem I'm having.
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  9. #9
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,669
    Plugin Contributions
    9

    Default Re: Where to DeSelect "Automatically select lowest prices shipping"

    Quote Originally Posted by rlexyd View Post
    Sorry carlwhat, thanks for your suggestion above, I did try it but got a little bit confused.
    Here is the code in the include/classes/shipping.php around that line..
    Code:
      function cheapest() {
        if (!is_array($this->modules)) return false;
          $rates = array();
    
          foreach($this->modules as $value) {
            $class = substr($value, 0, strrpos($value, '.'));
            if (isset($GLOBALS[$class]) && is_object($GLOBALS[$class]) && $GLOBALS[$class]->enabled) {
              $quotes = isset($GLOBALS[$class]->quotes) ? $GLOBALS[$class]->quotes : null;
              if (empty($quotes['methods'])) {
                continue;
              }
    This is from a zen 1.5.7c with OPC installed.
    I can already see the code you suggested to add in there already but the cheapest options is still already ticked which I would rather NO options to be picked until a customer picks it.
    Please help.
    i suppose i could have been clearer. in addition, my line numbers refer to v156 not v157c.

    as mc has adequately stated, if cheapest just does a return false, it should work, ie:

    PHP Code:
    function cheapest() {
     return 
    false
    just add that 1 line after the function declaration and nothing should get selected.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  10. #10
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Where to DeSelect "Automatically select lowest prices shipping"

    Thank you Carlwhat :), I’m sure it will also help someone in the future as well.
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

 

 

Similar Threads

  1. Replies: 3
    Last Post: 19 Nov 2014, 05:05 PM
  2. v139h Getting an Error On checkout page-"Please select shipping country for shipping."
    By atp29awr in forum Built-in Shipping and Payment Modules
    Replies: 26
    Last Post: 25 Apr 2013, 06:52 AM
  3. v139h Getting an Error On checkout page-"Please select shipping country for shipping."
    By atp29awr in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Apr 2013, 10:15 AM
  4. Replies: 1
    Last Post: 20 Jun 2011, 03:58 AM

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