';
if ($_SESSION['cart']->count_contents() > 0) {
$current_uri = zen_href_link($current_page_base, zen_get_all_get_params(), $request_type);
$content .= zen_draw_form('estimator_new', $current_uri, 'post');
if ($_SESSION['customer_id']) {
$content .= zen_get_customer_address($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '
') .
'
';
} else {
$content .= zen_get_country_list('zone_country_id', $selected_country,
'class="country_push ShippingEstimatorSideboxCountrySelect" onchange="this.form.submit()"');
}
$content .= zen_draw_hidden_field('scid', $selected_shipping['id']);
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'];
if ($quotes[$i]['error']){
$content .= $quotes[$i]['module'];
$content .= ' ';
$content .= $quotes[$i]['error'];
} else {
$extra_css_class = '';
if ($selected_shipping['id'] == $thisquoteid) {
$extra_css_class = ' bold';
}
$content .= '';
$content .= '';
$content .= '';
}
if ($i < ($n - 1)) {
$content .= '';
} else {
$content .= '';
}
} 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'];
if ($quotes[$i]['error']) {
$content .= '';
$content .= $quotes[$i]['module'];
$content .= ' - ' . '
';
$content .= '';
$content .= $quotes[$i]['error'];
$content .= '
';
} else {
$extra_css_class = '';
if ($selected_shipping['id'] == $thisquoteid) {
$extra_css_class = ' bold';
}
$content .= '';
$content .= '';
$content .= '';
}
if ($i < ($n - 1)) {
$content .= '';
} else {
$content .= '';
}
}
}
}
} else { // no item
$content .= '' . SHIPPING_ESTIMATOR_SIDEBOX_TEXT_CART_EMPTY .
'
';
}
$content .= '';