fozzo Posted January 19, 2009 Share Posted January 19, 2009 Greetings. I just installed oscommerce and I began to customize it to my taste. I managed after several efforts to add box that I wanted, both on the right than on the left. But now I find myself locked in the following problem. I'm trying to insert the image of the cart in the cart box without luck. I post the entire code: !-- shopping_cart //--> <tr> <td><?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART); new infoBoxHeading1($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART)); ?> <?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">'; } $cost = ($products[$i]['final_price'] * $products[$i]['quantity']). ''; $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'] ; $cart_contents_string .= '<td align="right" valign="top" class="infoBoxContents">'; $cart_contents_string .= $currencies->format($cost); $cart_contents_string .= '</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 = '<pre><br><font size="2.5" color="#000000" face="Tahoma, Geneva, sans-serif"> Il carrello è vuoto<font><br>'; } $temp1 = '<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center"><tr><td>'.$cart_contents_string .'</td></tr></table>'; $temp2 = ''; if ($cart->count_contents() > 0) { $temp2 = '<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center"><tr><td align="right" height="30" class="vam"><span class="productSpecialPrice">'.$currencies->format($cart->show_total()).'</span></td></tr></table>'; } $info_box_contents = array(); $info_box_contents[] = array('text' => $temp1.$temp2); //cart buttons start $info_box_contents[] = array('align' => 'center', 'text' => '<br><a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'button_cart_view.gif', 'View Cart') . '</a>' . '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING) . '">' . tep_image(DIR_WS_IMAGES . 'button_cart_checkout.gif', 'Check Out') . '</a>' ); //cart buttons end new infoBox1($info_box_contents); ?></td> </tr> <!-- shopping_cart_eof //--> I'd like to put immage first of all, just previous no items in cart and items theirselves. I'd like to say also that picture to be shown is cointained in folder images. Any clue or solution would be really apreciated. Thanks in advance you all. Quote Link to comment Share on other sites More sharing options...
fozzo Posted January 21, 2009 Author Share Posted January 21, 2009 anyone able to help me? Quote Link to comment Share on other sites More sharing options...
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.