============
When a customer with items in their cart proceeds to checkout, the
cart contents are not displayed unless they first click the 'Cart
Contents' button. If they click the 'Checkout' button, they are
automatically directed to the checkout_shipping.php page, where cart
contents are not displayed by default.
SOLUTION
========
Add display of cart contents to the checkout_shipping.php page. To do
that, the following steps are required:
1. Around line 17 of
/catalog/includes/languages/english/checkout_shipping.php, look for:
define('HEADING_TITLE', 'Delivery Information');
Replace with:
define('HEADING_TITLE', 'Delivery Information');
define('HEADING_PRODUCTS', 'PRODUCTS ORDERED');
define('TEXT_EDIT', 'Edit');
2. Around line 23 of /catalog/checkout_shipping.php, look for:
// if there is nothing in the customers cart, redirect them to the
shopping cart page
if ($cart->count_contents() < 1) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
}
Replace with:
// if there is nothing in the customers cart, redirect them to the
shopping cart page
if ($cart->count_contents() < 1) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
}
// Stock Check
if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') )
{
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if (tep_check_stock($products[$i]['id'],
$products[$i]['quantity'])) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
break;
}
}
}
Around line 218, look for:
<tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_ADDRESS; ?></b></td> </tr> </table></td> </tr>
Replace with:
<tr>
<td><table border="0" width="100%" cellspacing="0"
cellpadding="2">
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0"
cellpadding="3" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0"
cellpadding="3">
<?php
if (sizeof($order->info['tax_groups']) > 1) {
?>
<tr>
<td class="main" colspan="2"><?php echo '<b>' .
HEADING_PRODUCTS . '</b> <a href="' .
tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">('
. TEXT_EDIT . ')</span></a>'; ?></td>
<td class="smallText" align="right"><b><?php echo
HEADING_TAX; ?></b></td>
<td class="smallText" align="right"><b><?php echo
HEADING_TOTAL; ?></b></td>
</tr>
<tr>
<td COLSPAN="4"><?php echo
tep_draw_separator('pixel_trans.gif', '100%', '20'); ?></td>
</tr>
<?php
} else {
?>
<tr>
<td class="main" colspan="3"><?php echo '<b>' .
HEADING_PRODUCTS . '</b> <a href="' .
tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">('
. TEXT_EDIT . ')</span></a>'; ?></td>
</tr>
<tr>
<td COLSPAN="3"><?php echo
tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
}
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
echo ' <tr>' . "\n" .
' <td width="10%" class="main" align="right"
valign="top">' . $order->products[$i]['qty'] . ' x</td>' . "\n"
.
' <td width="60%" class="main" valign="top">' .
$order->products[$i]['name'] . '<br><small>Price, Each: USD $' .
$order->products[$i]['price'] . '</small>' . '<br><small>Item #' .
$order->products[$i]['item_number'] . '</small>';
if (STOCK_CHECK == 'true') {
echo '<br>' . tep_check_stock($order->products[$i]['id'],
$order->products[$i]['qty']);
}
if ( (isset($order->products[$i]['attributes'])) &&
(sizeof($order->products[$i]['attributes']) > 0) ) {
for ($j=0, $n2=sizeof($order->products[$i]['attributes']);
$j<$n2; $j++) {
echo '<br><small> <i> - ' . $order-
>products[$i]['attributes'][$j]['option'] . ': ' . $order-
>products[$i]['attributes'][$j]['value'] . '</i></small>';
}
}
echo '</td>' . "\n";
if (sizeof($order->info['tax_groups']) > 1) echo ' <td
class="main" valign="top" align="right">' .
tep_display_tax_value($order->products[$i]['tax']) . '% </td>' .
"\n";
echo ' <td width="30%"class="main" align="right"
valign="top">' . $currencies->display_price($order-
>products[$i]['final_price'], $order->products[$i]['tax'], $order-
>products[$i]['qty']) . ' </td>' . "\n" .
' </tr>' . "\n";
}
?>
<tr>
<td align="right" class="main" COLSPAN="3"><b><?php echo
SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart-
>show_total()); ?></b></td>
</tr>
<tr>
<td COLSPAN="3"><?php echo
tep_draw_separator('pixel_trans.gif', '100%', '25'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0"
cellpadding="2">
<tr>
<td class="main"><b><?php echo
TABLE_HEADING_SHIPPING_ADDRESS; ?></b></td>
</tr>
</table></td>
</tr>
Upload the changes, and the cart contents should now be displayed on
the page.
HTH,
Terry









