Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Default Shipping Method Problem

    At the present time, once a shipping method is selected, it remembers that selection until the customer changes it or completes checkout or logs out.

    If the selection is not valid for checkout, the customer is not allowed to complete checkout without selecting a valid option.
    .

    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.

  2. #2
    Join Date
    Mar 2007
    Location
    Ayutthaya, Thailand
    Posts
    21
    Plugin Contributions
    0

    Default Re: Default Shipping Method Problem

    Will there be any fixes?
    Or, this is how it suppose to work...
    [FONT=Courier New]Toey Thongprajiad[/FONT]
    [FONT=Courier New]www.TTTzone.com[/FONT]
    [FONT=Courier New][/FONT]

  3. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Default Shipping Method Problem

    There may be a "fix" to ensure that an error message is properly displayed if the previously-selected choice is no longer valid ... I'm surprised you're not seeing any error/warning about that.

    What template are you using?
    What customizations have you made to the templates used for checkout pages?
    .

    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.

  4. #4
    Join Date
    Mar 2007
    Location
    Ayutthaya, Thailand
    Posts
    21
    Plugin Contributions
    0

    Default Re: Default Shipping Method Problem

    I have my own template. But I use default tempaltes for all checkout process. There is no customization on the checkout process.

    I also tested on a demo site, http://demo.opensourcecms.com/zencart/ , and I got the same result.

    I looked at the header.php of checkout_shipping page, but I couldn't find any code that sends out error. Not sure if I look at the right place...

    While waiting for the fix, I am planing to make a hack to it. I am thinking that if the selected shipping module is no longer exist, I will default to the cheapest one. (This is what my client wants.):

    on line 172 of /includes/modules/pages/checkout_shipping/header.php.

    Code:
     
    // if no shipping method has been selected, automatically select the cheapest method.
    // if the modules status was changed when none were available, to save on implementing
    // a javascript force-selection method, also automatically select the cheapest shipping
    // method if more than one module is now enabled
      if ( !$_SESSION['shipping'] || ( $_SESSION['shipping'] && ($_SESSION['shipping'] == false) && (zen_count_shipping_modules() > 1) ) ) {
       $_SESSION['shipping'] = $shipping_modules->cheapest();
      } else {
     $x3 = false;
     foreach ($quotes as $x1) {
      if ($x1["id"] == $_SESSION['shipping']['module']) {
       $x3 = true;
      }
     }
     if (!$x3) {
      $_SESSION['shipping'] = $shipping_modules->cheapest();
     }
    }
    Does it look ok? Is it the right place to do the hack?

    Thanks
    [FONT=Courier New]Toey Thongprajiad[/FONT]
    [FONT=Courier New]www.TTTzone.com[/FONT]
    [FONT=Courier New][/FONT]

  5. #5
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Default Shipping Method Problem

    I too am looking for a fix/solution to this issue.

    Toeyt, did your fix work?

  6. #6
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Default Shipping Method Problem

    I also noticed that if changing the address (on the checkout step 1 page), to one with a different shipping zone, the cheapest new shipping method is automatically selected. I'm going to look at this code now and see if it can be copied for use elsewhere.

  7. #7
    Join Date
    Mar 2007
    Location
    Ayutthaya, Thailand
    Posts
    21
    Plugin Contributions
    0

    Default Re: Default Shipping Method Problem

    Quote Originally Posted by Alex Clarke View Post
    I too am looking for a fix/solution to this issue.

    Toeyt, did your fix work?

    I tested it in test environment, and it worked fine.
    But I didn't implement it on the live site.
    The owner of the site didn't want to hack the site. He can live with the issue...

    Good luck
    Toey
    [FONT=Courier New]Toey Thongprajiad[/FONT]
    [FONT=Courier New]www.TTTzone.com[/FONT]
    [FONT=Courier New][/FONT]

  8. #8
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Default Shipping Method Problem

    I've got this working on my live site and it's running fine.

    Thanks for this bit of code, it's very useful. :)

 

 

Similar Threads

  1. Shipping method default selection
    By kanine in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 3 Sep 2010, 03:06 AM
  2. Setting Shipping Method to Default to ON
    By jasonhoward64 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 11 Apr 2010, 10:08 PM
  3. 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
  4. default shipping method
    By 100asa in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 7 Aug 2007, 04:37 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
  •  
disjunctive-egg