New Zenner
- Join Date:
- Aug 2007
- Posts:
- 47
- Plugin Contributions:
- 0
Remove state & zipcode from Shipping Estimator?
Is there any way I can remove the state and zipcode fields?
New Zenner
New Zenner
Totally Zenned
Totally Zenned
New Zenner
New Zenner
New Zenner
New Zenner
<label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>
<?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" onchange="update_zone(this.form);"'); ?>
<br class="clearBoth" /><label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>
<?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" onChange="this.form.submit();"'); ?>
<br class="clearBoth" /><div class="buttonRow forward"><a href="_" onclick="return shipincart_submit('');"><?php echo zen_image_button(BUTTON_IMAGE_UPDATE, BUTTON_UPDATE_ALT); ?></a></div>Zen Follower
New Zenner
New Zenner
New Zenner
New Zenner
New Zenner
New Zenner
Ivum:
Even without the button removed it doesn't seem to work. When I click on say the US and click update it refreshes but then switches back to the UK giving the UK postage costs as well.
New Zenner
<?php
/**
* Module Template - for shipping-estimator display
*
* @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_modules_shipping_estimator.php 4313 2006-08-28 00:25:40Z drbyte $
*/
?>
<?php echo zen_draw_form('estimator', zen_href_link($show_in, '', 'NONSSL'), 'post'); ?>
<?php echo zen_draw_hidden_field('scid', $selected_shipping['id']); ?>
<h2><?php echo CART_SHIPPING_OPTIONS; ?></h2>
<?php
if ($_SESSION['customer_id']) {
?>
<?php if (!empty($totalsDisplay)) { ?>
<div class="cartTotalsDisplay important"><?php echo $totalsDisplay; ?></div>
<?php } ?>
<?php
// only display addresses if more than 1
if (isset($addresses) && $addresses->RecordCount() > 1){ /* big_royalmail mod added that address object must be defined first */
?>
<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 zen_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br />'); ?></address>
<br class="clearBoth" />
<?php
} else {
?>
<?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" />
<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
}
}
?>
<?php
if(sizeof($quotes)) { /* big_royalmail.php mod else statement moved under estimator form */
?>
<?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{
?>
<table cellspacing="0" cellpadding="4" id="cartContentsDisplay" style="width:100%; padding-bottom: 1em">
<tr class="tableHeading">
<th scope="col" id="scQuantityHeading"><?php echo CART_SHIPPING_METHOD_TEXT; ?></th>
<th scope="col" id="scQuantityHeading"><?php echo CART_SHIPPING_METHOD_RATES; ?></th>
</tr>
<?php
$rowClassSwitch = 'Even';
for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
if($rowClassSwitch == 'Even'){
$rowClassSwitch = 'Odd';
}else{
$rowClassSwitch = 'Even';
}
if(sizeof($quotes[$i]['methods'])==1){
// simple shipping method
$thisquoteid = $quotes[$i]['id'].'_'.$quotes[$i]['methods'][0]['id'];
?>
<tr class="row<?php echo $rowClassSwitch; ?>">
<?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>
<?php
}
}else{ // big_royalmail mod else statement added
?>
<table cellspacing="0" cellpadding="4" id="cartContentsDisplay" style="width:100%; padding-bottom: 1em">
<tr class="tableHeading">
<th scope="col" id="scQuantityHeading"><?php echo CART_SHIPPING_METHOD_TEXT; ?></th>
<th scope="col" id="scQuantityHeading"><?php echo CART_SHIPPING_METHOD_RATES; ?></th>
</tr>
<tr>
<td colspan="2" class="rowOdd" style="text-align: center"><?php echo TITLE_NO_SHIPPING_AVAILABLE; ?>
<div class="important"><?php echo str_replace('__COUNTRY__', (isset($order->delivery['country']['title']) ? ' to '. $order->delivery['country']['title'] : ''), TEXT_NO_SHIPPING_AVAILABLE ); ?>
</td>
</tr>
</table>
<?php
} // big_royalmail mod else statement added
?>
</form>Zen Follower
Zen Follower
Destination thread ID and reason are required when shown.
Tell staff why this post should be reviewed.
Required for login, security, and core site functionality.
Help us understand how the site is used so we can improve it.
Used for promotion and personalized campaign measurement.