RE: Modification to shopping_cart.php box needed...

nemmerss <[email protected]>
Newsgroups gmane.comp.web.oscommerce.general
Message-ID <51c25e3bbfeb3f339789e28cc4a6fb8c@osCommerce-Forums>
This message was sent from: General Support
http://forums.oscommerce.com/viewtopic.php?p=227213#227213
----------------------------------------------------------------

[color=black]
Hi -

As far as the Shopping Cart Infobox problem you mentioned, we used the following solution.  The lines shown below replace the originals (at about Lines 62 to 70 or so) in /catalog/include/boxes/shopping_cart.php: 
[/color]
[color=blue]
  $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' => 'left',
                                 'text' =>  'Items in Cart: ' . '&nbsp;' . $cart->count_contents() . '<p>' . 'Cart-Total: ' . '&nbsp;' . $currencies->format($cart->show_total()));
  }
[/color]
[color=black]This should produce a shopping cart infobox that looks something like this:
________________

  Items in Cart:  x 
 Cart-Total:  $xx.xx 
________________

Seems to increment and decrement properly when items are put in and taken out of the cart.  

My wife and I are newbies at this, too.  :-)  Hope this is of some use to you.  Good luck.
[/color]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.