OUtlANDeR Posted May 25, 2006 Posted May 25, 2006 Hi i got a problem, that i cant seem to fix http://www.mypetstuff.ca/catalog On the right side, where shopping cart is, there's a 1. I got rid of the shopping cart text that was there, however that stayed, and i dont know how to get rid of it. Does anyone know? Thanks
Wendy James Posted May 25, 2006 Posted May 25, 2006 Usually this happens when the infobox has been edited incorrectly or the boxes.php in the /includes/classes/ folder has been edited. If you post your shopping_cart.php infobox code here someone can see if that is the problem. Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
OUtlANDeR Posted May 25, 2006 Author Posted May 25, 2006 Heres whats in it: <?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 */ ?> <tr> <td valign="top"> <TABLE WIDTH=132 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD width="168" COLSPAN=3> <IMG SRC="http://www.mypetstuff.ca/images/cartheader.gif" WIDTH=132 HEIGHT=22></TD> </TR> <TR> <!-- shopping_cart //--> <tr> <td> <?php $info_box_contents = array(); new ShoppingCartBoxHeading($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="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="ShoppingCartBoxContents">'; 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="ShoppingCartBoxContents">'; } $cart_contents_string .= $products[$i]['quantity'] . ' x </span></td><td valign="top" class="ShoppingCartBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">'; 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="ShoppingCartBoxContents">'; } $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; } $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())); } new ShoppingCartBox($info_box_contents); ?> <TR> <TD COLSPAN=3> <IMG SRC="http://www.mypetstuff.ca/images/content2_39.gif" WIDTH=132 HEIGHT=1></TD> </TR> </TABLE> </td> </tr> <!-- shopping_cart_eof //--> Thanks
Wendy James Posted May 25, 2006 Posted May 25, 2006 try this <?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 */ ?> <tr> <td valign="top"> <TABLE WIDTH=132 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD width="168" COLSPAN=3> <IMG SRC="http://www.mypetstuff.ca/images/cartheader.gif" WIDTH=132 HEIGHT=22></TD> </TR> <TR> <!-- shopping_cart //--> <tr> <td> <?php $cart_contents_string = ''; if ($cart->count_contents() > 0) { $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="ShoppingCartBoxContents">'; 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="ShoppingCartBoxContents">'; } $cart_contents_string .= $products[$i]['quantity'] . ' x </span></td><td valign="top" class="ShoppingCartBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">'; 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="ShoppingCartBoxContents">'; } $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; } $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())); } new ShoppingCartBox($info_box_contents); ?> <TR> <TD COLSPAN=3> <IMG SRC="http://www.mypetstuff.ca/images/content2_39.gif" WIDTH=132 HEIGHT=1></TD> </TR> </TABLE> </td> </tr> <!-- shopping_cart_eof //--> this line new ShoppingCartBoxHeading($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART)); is what is putting the 1 Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
OUtlANDeR Posted May 25, 2006 Author Posted May 25, 2006 Um epppp, now it dosnt work at all >.< www.mypetstuff.ca/catalog
Wendy James Posted May 25, 2006 Posted May 25, 2006 hmmm this is mine and it works fine <?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 $cart_contents_string = ''; if ($cart->count_contents() > 0) { $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']) . '">'; 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; } $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())); } new infoBox($info_box_contents); ?> </td> </tr> <!-- shopping_cart_eof //--> Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
OUtlANDeR Posted May 25, 2006 Author Posted May 25, 2006 Hmm copied yours exactly and it didnt work :S
Wendy James Posted May 25, 2006 Posted May 25, 2006 try changing new ShoppingCartBox($info_box_contents); to new infoBox($info_box_contents); at the bottom of the code I gave you before when i said "try this" Not sure why it wouldn't work for you if you copied mine. I have it on a page now that I am looking at and it works fine. Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
OUtlANDeR Posted May 25, 2006 Author Posted May 25, 2006 LOL! wow...alright, you were right the whole time. For some reason, the shopping cart.php got edited in the classes folder rather than the boxes, not sure how that happend as i was in the boxes folder the whole time :P But what you suggested worked perfectly! Thank you VERY! much! :)
OUtlANDeR Posted May 25, 2006 Author Posted May 25, 2006 Also let me add just one more thing. When u add an item to the cart, a black line appears in it, seperated two things. Is it possible to change the color of that line? If so how :P
j_may80 Posted May 25, 2006 Posted May 25, 2006 Also let me add just one more thing.When u add an item to the cart, a black line appears in it, seperated two things. Is it possible to change the color of that line? If so how :P edit the image/pixel_black.gif It's just 1 x 1 pixel black square. Edit it in photoshop or similar paint program to whatever color you'd like. look at mine: Click for shopping cart line!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.