Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Estimate Shipping popup for v1.3.0.1

Estimate Shipping popup for v1.3.0.1

Locked

Views: 2,307

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
13 May 2006, 7:24 PM
#1
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Estimate Shipping popup for v1.3.0.1

The table that populates the results is too narrow. I think a class named LABEL.inputLabel is somehow being rememberd by IE and using it to build the table???

13 May 2006, 9:44 PM
#2
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: Estimate Shipping popup for v1.3.0.1

I fixed it, but I hope nothing else broke? Here is the new picture and code.

tpl_modules_shipping_estimator.php

<?php

/**

 * Module Template - for shipping-estimator display

 *

 * @package templateSystem

 * @copyright Copyright 2003-2005 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_modules_shipping_estimator.php 3180 2006-03-12 22:32:39Z wilt $

 */

?>

<!-- stagebrace mod //-->
<TABLE><TR><TD>
<!-- stagebrace mod //-->
<?php echo zen_draw_form('estimator', zen_href_link($show_in, '', 'NONSSL'), 'post'); ?>

<?php echo zen_draw_hidden_field('sid', $selected_shipping['id']); ?>

    <?php

  if(sizeof($quotes)) {

    if ($_SESSION['customer_id']) {

?>

<h2><?php echo CART_SHIPPING_OPTIONS; ?></h2>





<?php if (!empty($totalsDisplay)) { ?>

<div class="cartTotalsDisplay important"><?php echo $totalsDisplay; ?></div>

<?php } ?>



<?php

    // only display addresses if more than 1

      if ($addresses->RecordCount() > 1){

?>

<label class="inputLabel"><?php echo CART_SHIPPING_METHOD_ADDRESS; ?></label>

<?php echo zen_draw_pull_down_menu('address_id', $addresses_array, $selected_address, 'onchange="return shipincart_submit(\'\');"'); ?>

<?php

      }

?>



<div class="bold back"><?php echo CART_SHIPPING_METHOD_TO; ?></div>

<address class="back"><?php echo ze_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br />'); ?></address>

<br class="clearBoth" />

<?php

    } else {

?>

<h2><?php echo CART_SHIPPING_OPTIONS; ?></h2>

<?php if (!empty($totalsDisplay)) { ?>

<div class="cartTotalsDisplay important"><?php echo $totalsDisplay; ?></div>

<?php } ?>

<?php

      if($_SESSION['cart']->get_content_type() != 'virtual'){

?>



<label class="inputLabel"><?php echo ENTRY_COUNTRY; ?><label>

<?php echo zen_get_country_list('country_id', $selected_country,'style="width=200"'); ?>

<br class="clearBoth" />



<label class="inputLabel"><?php echo ENTRY_STATE; ?><label>

<?php echo zen_draw_pull_down_menu('state',$state_array, $state_zone_id); ?>

<br class="clearBoth" />



<?php

        if(CART_SHIPPING_METHOD_ZIP_REQUIRED == "true"){

?>

<label class="inputLabel"><?php echo ENTRY_POST_CODE; ?><label>

<?php echo  zen_draw_input_field('zip_code', $zip_code, 'size="7"'); ?>

<br class="clearBoth" />

<?php

        }

?>

<div class="buttonRow forward"><a href="_" onclick="return shipincart_submit('');"><?php echo  zen_image_button(BUTTON_IMAGE_UPDATE, BUTTON_UPDATE_ALT); ?></a></div>

<br class="clearBoth" />

<?php

      }

    }

    if($_SESSION['cart']->get_content_type() == 'virtual'){

?>

<?php echo CART_SHIPPING_METHOD_FREE_TEXT .  ' ' . CART_SHIPPING_METHOD_ALL_DOWNLOADS; ?>

<?php

    }elseif ($free_shipping==1) {

?>

<?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)); ?>

<?php

    }else{

?>

<!-- stagebrace mod //-->
</TD></TR></TABLE>
<!-- stagebrace mod //-->
<table width="100%" border="1" cellpadding="2" cellspacing ="2">

     <tr>

       <th scope="col" id="seProductsHeading"><?php echo CART_SHIPPING_METHOD_TEXT; ?></th>

       <th scope="col" id="seTotalHeading"><?php echo CART_SHIPPING_METHOD_RATES; ?></th>

     </tr>

<?php

      for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {

        if(sizeof($quotes[$i]['methods'])==1){

          // simple shipping method

          $thisquoteid = $quotes[$i]['id'].'_'.$quotes[$i]['methods'][0]['id'];

?>

     <tr class="<?php echo $extra; ?>">

<?php

          if($quotes[$i]['error']){

?>

         <td colspan="2"><?php echo $quotes[$i]['module']; ?> (<?php echo $quotes[$i]['error']; ?>)</td>

       </tr>

<?php

          }else{

            if($selected_shipping['id'] == $thisquoteid){

?>

         <td class="bold"><?php echo $quotes[$i]['module']; ?> (<?php echo $quotes[$i]['methods'][0]['title']; ?>)</td>

         <td class="cartTotalDisplay bold"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][0]['cost'], $quotes[$i]['tax'])); ?></td>

       </tr>

<?php

            }else{

?>

          <td><?php echo $quotes[$i]['module']; ?> (<?php echo $quotes[$i]['methods'][0]['title']; ?>)</td>

          <td class="cartTotalDisplay"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][0]['cost'], $quotes[$i]['tax'])); ?></td>

       </tr>

<?php

            }

          }

        } else {

          // shipping method with sub methods (multipickup)

          for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {

            $thisquoteid = $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id'];

?>

    <tr class="<?php echo $extra; ?>">

<?php

            if($quotes[$i]['error']){

?>

         <td colspan="2"><?php echo $quotes[$i]['module']; ?> (<?php echo $quotes[$i]['error']; ?>)</td>

       </tr>

<?php

            }else{

              if($selected_shipping['id'] == $thisquoteid){

?>

         <td class="bold"><?php echo $quotes[$i]['module']; ?> (<?php echo $quotes[$i]['methods'][$j]['title']; ?>)</td>

         <td class="cartTotalDisplay bold"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])); ?></td>

       </tr>

<?php

              }else{

?>

        <td><?php echo $quotes[$i]['module']; ?> (<?php echo $quotes[$i]['methods'][$j]['title']; ?>)</td>

        <td class="cartTotalDisplay"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])); ?></td>

      </tr>

<?php

              }

            }

          }

        }

      }

    }

  }

?>

</table>

</form>
4 Jul 2006, 5:42 PM
#3
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Estimate Shipping popup for v1.3.0.1

I've having the same problem with my shipping estimator popup.
It looks GREAT in FireFox, but looks just horrible in IE.

I tried the code change suggested above and as long as you aren't logged in, it works fine. If the person is logged it breaks it and won't work...gives an error message, so I had to put the original code back in.

Can anyone PLEASE tell me how to fix the way this displays in IE?
The fonts are all different sizes (even with the above code) and it looks so unprofessional.

I don't know how to do a screen shot, so here is a link to my site so hopefully someone can try it in both IE and FireFox to see the problem: My Zen in progress

5 Jul 2006, 2:53 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Estimate Shipping popup for v1.3.0.1

Upgrading to v1.3.0.2 would be a good place to start ... :smile:

See if that doesn't fix the issues for you ...

5 Jul 2006, 3:14 AM
#5
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: Estimate Shipping popup for v1.3.0.1

I agree. The new code fixes the issue. My fix just covered it up.

5 Jul 2006, 3:19 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Estimate Shipping popup for v1.3.0.1

Thanks for the update ... that will help others with a similar problem ... :smile:

5 Jul 2006, 3:10 PM
#7
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Estimate Shipping popup for v1.3.0.1

stagebrace:

I agree. The new code fixes the issue. My fix just covered it up.

That's weird because I had already done the upgrade before I used your fix. :dontgetit

Ajeh:

Upgrading to v1.3.0.2 would be a good place to start ...

After the upgrade it did work great in FireFox, but the table and fonts were still fubarbed in IE (at least for me). Both are working good now after using stagebrace's fix...with the exception of some font sizes in IE, but I think that's a template issue.

I'm still trying to figure out how to adjust the font sizes in the 'Sage' template. :smile:

5 Jul 2006, 4:02 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Estimate Shipping popup for v1.3.0.1

I have sage template loaded with v1.3.0.2 and I am not able to reproduce the problem ...

Check that you have all of the files from v1.3.0.2 loaded to your website and that you do not have an override file that is missing any changes ...

In particular check that /includes/templates/template_default/tpl_modules_shipping_estimator.php is current:

  • @version $Id: tpl_modules_shipping_estimator.php 3656 2006-05-24 00:08:11Z ajeh $
5 Jul 2006, 4:04 PM
#9
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: Estimate Shipping popup for v1.3.0.1

Please try this. Get a copy of the zen-cart-v1.3.0.2-changed_files_only.zip
update the file from the zip file to you store file using this location. includes\templates\template_default\templates\tpl_modules_shipping_estimator.php
Then delete the file I gave you yesterday from my suggested location of
\includes\templates<your_template>\templates\tpl_modules_shipping_estimator.php

5 Jul 2006, 4:34 PM
#10
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Estimate Shipping popup for v1.3.0.1

I did the upgrade through my cpanel using that Fantistico installer thing so I didn't see the actual files. I'll download the 'changed files only' thing and make sure I have everything correct.

Thanks so much!!