Guest Posted March 2, 2007 Share Posted March 2, 2007 Hi, I have a shopping cart box in the left column, which has a huge white space underneath it. I want to remove the white space, but when I go into the includes/boxes/shopping_cart.php file, I can't for the life of me work out how to remove it. I think it has something to do with the dividers (pixel_trans.gif) and leaving room for other functions such as Registry, Gift Vouchers and Coupons when they are relevant. Edited to add: here is the link to the site where you can see the problem... Here is the code that I use to insert it into the left_column.php file: [size="1"]<? require(DIR_WS_BOXES . 'shopping_cart.php');?>[/size] Here is the code from the includes/boxes/shopping_cart.php file: [size="1"]<?php /* $Id: shopping_cart.php,v 1.18 2003/02/10 22:31:06 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- shopping_cart //--> <tr> <td> <?php $pcount=0; $info_box_contents = array(); // $info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART); // new infoBoxHeading($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART)); $cart_contents_string =" <script language=\"javascript\"> function couponpopupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re sizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,l eft=150') } $cart_contents_string = ''; //--></script>"; if ($cart->count_contents() > 0) { $cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">'; $cart_contents_string .= '<table border="0" width="100%" cellspacing="0" cellpadding="0">'; // Modified in v5.13 by Rigadin for STS compatibility // $cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">'; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { // $cart_contents_string .= '<tr><td align="right" valign="top" class="infoBoxContents">'; if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { // $cart_contents_string .= '<span class="newItemInCart">'; } else { // $cart_contents_string .= '<span class="infoBoxContents">'; } // $cart_contents_string .= $products[$i]['quantity'] . ' x </span></td><td valign="top" class="infoBoxContents"><a href="' . //tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">'; $pcount += $products[$i]['quantity']; if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { // $cart_contents_string .= '<span class="newItemInCart">'; } else { // $cart_contents_string .= '<span class="infoBoxContents">'; } // $cart_contents_string .= $products[$i]['name'] . '</span></a></td></tr>'; if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { tep_session_unregister('new_products_id_in_cart'); } } // $cart_contents_string .= '</table>'; } else { // $cart_contents_string .= BOX_SHOPPING_CART_EMPTY; } $cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="5"><tr><td align="left" valign="top" class="shoppingcartcontents">'; $cart_contents_string .= '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><nobr>' . $pcount . ' items</nobr></a> in your cart.<br> '; $cart_contents_string .= $currencies->format($cart->show_total()) . '<br><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); $cart_contents_string .= '">Checkout</a></td></tr></table>'; print $cart_contents_string; // $info_box_contents = array(); // $info_box_contents[] = array('text' => $cart_contents_string); if ($cart->count_contents() > 0) { // $info_box_contents[] = array('text' => tep_draw_separator()); // $info_box_contents[] = array('align' => 'right', // 'text' => $currencies->format($cart->show_total())); } if($cart->registry_id > 0){ $display_registry_owners = tep_get_registry_owners($cart->registry_id); $info_box_contents[] = array('text' => tep_draw_separator()); $info_box_contents[] = array('text' => tep_draw_separator()); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_DISPLAY_REGISTRY_PRODUCTS, 'registry_id=' . $cart->registry_id, 'NONSSL') . '">' . sprintf(BOX_SHOPPING_CART_FOR_WHO, $display_registry_owners['customers_firstname'], $display_registry_owners['customers_lastname'], $display_registry_owners['co_registrant_first_name'], $display_registry_owners['co_registrant_last_name'], $cart->registry_id) . '</a>'); } if (tep_session_is_registered('customer_id')) { $gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'"); $gv_result = tep_db_fetch_array($gv_query); if ($gv_result['amount'] > 0 ) { $info_box_contents[] = array('align' => 'left','text' => tep_draw_separator()); $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . VOUCHER_BALANCE . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($gv_result['amount']) . '</td></tr></table>'); $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext"><a href="'. tep_href_link(FILENAME_GV_SEND) . '">' . BOX_SEND_TO_FRIEND . '</a></td></tr></table>'); } } if (tep_session_is_registered('gv_id')) { $gv_query = tep_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . "'"); $coupon = tep_db_fetch_array($gv_query); $info_box_contents[] = array('align' => 'left','text' => tep_draw_separator()); $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . VOUCHER_REDEEMED . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($coupon['coupon_amount']) . '</td></tr></table>'); } if (tep_session_is_registered('cc_id') && $cc_id) { $coupon_query = tep_db_query("select * from " . TABLE_COUPONS . " where coupon_id = '" . $cc_id . "'"); $coupon = tep_db_fetch_array($coupon_query); $coupon_desc_query = tep_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $cc_id . "' and language_id = '" . $languages_id . "'"); $coupon_desc = tep_db_fetch_array($coupon_desc_query); $text_coupon_help = sprintf("%s",$coupon_desc['coupon_name']); $info_box_contents[] = array('align' => 'left','text' => tep_draw_separator()); $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="infoBoxContents">' . CART_COUPON . $text_coupon_help . '<br>' . '</td></tr></table>'); } new infoBox($info_box_contents); ?> </td> </tr> <!-- shopping_cart_eof //-->[/size] Is there a way I can not display the space where these items should be when they aren't required? Also, how would I change the background colour to #CCC to match the column background. I had no luck when searching the forum? Thanks in advance! Leah :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.