Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2005
    Posts
    287
    Plugin Contributions
    0

    Idea or Suggestion Skip Checkout Shipping Page - Only 1 method offered

    How can we skip the checkout_shipping page when we offer only 1 kind of shipping ?
    It's no use showing this page to the customer.

    The checkout_shipping page can be shown for countries we do not ship to, so that the website will not move ahead from this page.

    Please guide .

  2. #2
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Skip Checkout Shipping Page - Only 1 method offered

    If you remove this page...
    How do you handle customers who want to change the "delivery address"?

  3. #3
    Join Date
    Oct 2005
    Posts
    287
    Plugin Contributions
    0

    Default Re: Skip Checkout Shipping Page - Only 1 method offered

    Yes Gilby you are correct.
    Fast and Easy checkout is probably something I should look into

  4. #4
    Join Date
    Jun 2012
    Posts
    68
    Plugin Contributions
    2

    Default Re: Skip Checkout Shipping Page - Only 1 method offered

    Since Fast and Easy plugin change quite a few core files, and is somewhat unstable, is there any other way to skip shipping selection when only 1 method available? Thanks.

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,970
    Plugin Contributions
    96

    Default Re: Skip Checkout Shipping Page - Only 1 method offered

    Is there always only one shipping method available?

  6. #6
    Join Date
    Jun 2012
    Posts
    68
    Plugin Contributions
    2

    Default Re: Skip Checkout Shipping Page - Only 1 method offered

    As far as can be seen from now, there is only Per Weight Unit shipping suitable for us. Thanks.

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,970
    Plugin Contributions
    96

    Default Re: Skip Checkout Shipping Page - Only 1 method offered

    That can be accomplished with a teeny observer-class script.

    Create the file /includes/classes/observers/force_per_weight_shipping.php:
    Code:
    <?php
    class force_per_weight_shipping extends base {
    
      function __construct () {
        $this->attach ($this, array ('NOTIFY_HEADER_START_CHECKOUT_SHIPPING'));
        
      }
      
      function update (&$class, $eventID) {
        $_POST['shipping'] = 'perweightunit_perweightunit';
        $_POST['action'] = 'process';
        
      }
     
    }
    and its associated installer, /includes/auto_loaders/config.force_per_weight_shipping.php:
    Code:
    <?php
    if (!defined('IS_ADMIN_FLAG')) {
     die('Illegal Access');
    }
                        
    /*
    ** Point 200 is after all other initialization is complete.
    */
    $autoLoadConfig[200][] = array ('autoType'   => 'class',
                                    'loadFile'   => 'observers/force_per_weight_shipping.php');
    $autoLoadConfig[200][] = array ('autoType'   => 'classInstantiate',
                                    'className'  => 'force_per_weight_shipping',
                                    'objectName' => 'force_per_weight_shipping');
    That results in the class-based module running each time the checkout_shipping page starts. It "emulates" the customer's selection of the perweightunit shipping method, resulting in the checkout_shipping page being bypassed with the perweightunit method being automatically selected.

    To disable this processing, simply rename the auto_loader file to have an extension of .php~

  8. #8
    Join Date
    Jun 2012
    Posts
    68
    Plugin Contributions
    2

    Default Re: Skip Checkout Shipping Page - Only 1 method offered

    It's great. I appreciate, lat9.

    To handle customers who want to change the "delivery address" (see above #2), I changed one line in '/includes/templates/your_template/templates/tpl_checkout_confirmation_default.php'

    from <div class="buttonRow forward"><?php echo '<a href="' . $editShippingButtonLink . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div>
    to <div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div>

    Zen Cart forum is wonderful because people here help themselves by helping others.

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,970
    Plugin Contributions
    96

    Default Re: Skip Checkout Shipping Page - Only 1 method offered

    Nice one, @scott_ease, that was the one downfall in the checkout_shipping page's bypass that I was going to alert you to!

 

 

Similar Threads

  1. Display of shipping method in checkout page
    By ericvanwenkop in forum Addon Shipping Modules
    Replies: 0
    Last Post: 19 May 2011, 06:29 PM
  2. Only show payment method when UPS shipping method chosen?
    By helen610 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 28 Aug 2008, 03:04 AM
  3. Replies: 4
    Last Post: 7 Apr 2008, 03:52 PM
  4. Replies: 9
    Last Post: 13 Dec 2007, 04:45 PM
  5. Replies: 5
    Last Post: 7 Oct 2006, 05:14 AM

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