warrenerjm Posted November 18, 2007 Posted November 18, 2007 Hi How do I integrate this into the shopping_cart infobox in the right column, instead of the header please? I have tried to pick out the code & integrate into the catalog/includes/boxes/shopping_cart.php but I can't get it to work. I would like to stop the products being listed in this box & only sho: Basket Details Items : 6 Value : £25.67 View Cart <-- This is a link to the shopping cart page Thanks for your help. Julie Quote
warrenerjm Posted November 18, 2007 Author Posted November 18, 2007 Hi again At least I am giving it a go! :blink: I haven't been able to play with this code to work, so I found Cleaner shopping cart contribution. (& no relevant support threads) It partly goes towards what I want but I can't read code well enough to know what the { else etc are. :( This is the code... <?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) 2005 leisuret Released under the GNU General Public License Changes: 2006-06-11 Modify to 1 line for item count and amount & clean up code */ ?> <!-- shopping_cart //--> <?php $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 = ''; if ($cart->count_contents() > 0) { $cart_contents_string = '<table border="0" width=BOX_WIDTH cellspacing="0" cellpadding="0">'; $products = $cart->get_products(); { $cart_contents_string .= '<tr><td align="center" valign="middle" class="infoBoxContents">'; $cart_contents_string .= '<b>' . $cart->count_contents() . '</b>'; if ($cart->count_contents() > 1) { $cart_contents_string .=' Items <b>' . $currencies->format($cart->show_total()) . '</b></td>'; } else { $cart_contents_string .=' Item <b>' . $currencies->format($cart->show_total()) . '</b></td>'; } } $cart_contents_string .= '</table>'; } else { $cart_contents_string .= BOX_SHOPPING_CART_EMPTY; } $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => $cart_contents_string); new infoBox($info_box_contents); ?> <!-- shopping_cart_eof //--> It throws the boxes under the shopping cart out, so I think it needs the <tr> <td> at the beginning & </td> </tr> at the end? Can anyone re-gig it to show Basket Details Items : 3 Value : £4.50 View Cart (link) pleaseeee as I am getting in a right pickle. >_< Thanks Julie Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.