Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Posts
    97
    Plugin Contributions
    0

    Default List shipping methods automatically on Shipping and Return Page

    I want to list the shipping methods that I enabled from admin on the shipping and return page automatically. I modiflied the tpl_checkout_shipping_default.php, but it didn't work.

    Below is what I got:

    <?php
    /**
    * Page Template
    *
    * Loaded automatically by index.php?main_page=checkout_shipping.<br />
    * Displays allowed shipping modules for selection by customer.
    *
    * @package templateSystem
    * @copyright Copyright 2003-2006 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_checkout_shipping_default.php 3183 2006-03-14 07:58:59Z birdbrain $
    */
    ?>

    <?php
    if (zen_count_shipping_modules() > 0) {
    ?>
    <fieldset>
    <legend id="checkoutShippingHeadingMethod"><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></legend>

    <?php
    if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
    ?>

    <div id="checkoutShippingContentChoose" class="important"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></div>
    <?php
    } elseif ($free_shipping == false) {
    ?>
    <div id="checkoutShippingContentChoose" class="important"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></div>
    <?php
    }
    ?>
    <?php
    if ($free_shipping == true) {
    ?>
    <div id="freeShip" class="important" ><?php echo FREE_SHIPPING_TITLE; ?>&nbsp;<?php echo $quotes[$i]['icon']; ?></div>
    <div id="defaultSelected"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . zen_draw_hidden_field('shipping', 'free_free'); ?></div>

    <?php
    } else {
    $radio_buttons = 0;
    for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
    ?>
    <fieldset>
    <legend><?php echo $quotes[$i]['module']; ?>&nbsp;<?php if (isset($quotes[$i]['icon']) && zen_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></legend>

    <?php
    if (isset($quotes[$i]['error'])) {
    ?>
    <div><?php echo $quotes[$i]['error']; ?></div>
    <?php
    } else {
    for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
    // set the radio button to be checked if it is the method chosen
    $checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']) ? true : false);

    if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
    //echo ' <div id="defaultSelected" class="moduleRowSelected">' . "\n";
    //} else {
    //echo ' <div class="moduleRow">' . "\n";
    }
    ?>
    <?php
    if ( ($n > 1) || ($n2 > 1) ) {
    ?>
    <div class="important forward"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></div>
    <?php
    } else {
    ?>
    <div class="important forward"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . zen_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></div>
    <?php
    }
    ?>

    <?php echo zen_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked, 'id="ship-'.$quotes[$i]['id'] . '-' . $quotes[$i]['methods'][$j]['id'].'"'); ?>
    <label for="ship-<?php echo $quotes[$i]['id'] . '-' . $quotes[$i]['methods'][$j]['id']; ?>" class="checkboxLabel" ><?php echo $quotes[$i]['methods'][$j]['title']; ?></label>
    <!--</div>-->
    <br class="clearBoth" />
    <?php
    $radio_buttons++;
    }
    }
    ?>

    </fieldset>
    <?php
    }
    }
    ?>

    <?php
    }
    ?>
    </form>
    </div>

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: List shipping methods automatically on Shipping and Return Page

    Why are you changing code?

    Your Shipping Modules that you install in the Admin already list automatically on the checkout_shipping ...

    If you do not see them then something is not configured correctly ...
    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!]
    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!

  3. #3
    Join Date
    Jul 2005
    Posts
    97
    Plugin Contributions
    0

    Default Re: List shipping methods automatically on Shipping and Return Page

    Quote Originally Posted by Ajeh
    Why are you changing code?

    Your Shipping Modules that you install in the Admin already list automatically on the checkout_shipping ...

    If you do not see them then something is not configured correctly ...

    I want it the shipping methods to display on the static information page, the "Shipping & Returns," not in the checkout process.

  4. #4
    Join Date
    Jul 2005
    Posts
    97
    Plugin Contributions
    0

    Default Re: List shipping methods automatically on Shipping and Return Page

    Let me clarify the what I did.

    I copied

    /includes/templates/nokoria/template/tpl_checkout_shipping_default.php
    to
    /includes/languages/english/html_includes/nokoria/define_shippinginfo.php

    and I deleted part of the code, so that only the shipping methods will dispaly. But nothing display.

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: List shipping methods automatically on Shipping and Return Page

    Wouldn't it be easier to type the names in the Shipping & Returns as they will not display if the customer is not logged in ... and unless there is something in the cart they would not run a value ...

    Might peek at the shipping estimator and how that is called to display on the shopping cart if you still think you want to do it this way ...
    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!]
    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!

  6. #6
    Join Date
    Jul 2005
    Posts
    97
    Plugin Contributions
    0

    Default Re: List shipping methods automatically on Shipping and Return Page

    Thanks for the replies. I will look at it.

 

 

Similar Threads

  1. Skip Shipping and Payment Methods
    By thatstevensguy in forum Customization from the Admin
    Replies: 2
    Last Post: 3 Oct 2011, 02:32 PM
  2. Add image to shipping and return
    By provida in forum General Questions
    Replies: 15
    Last Post: 2 Feb 2010, 12:26 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