yuck_fou Posted June 28, 2006 Posted June 28, 2006 hello all, I've a little problem with the shopping cart infobox arrow...it's not aligned like the rest of the info box arrows. you can see the problem here: Trendy People Any ideas on which code I must change? Thanks in advance! :thumbsup:
1Putts Posted June 28, 2006 Posted June 28, 2006 hello all, I've a little problem with the shopping cart infobox arrow...it's not aligned like the rest of the info box arrows. you can see the problem here: Trendy People Any ideas on which code I must change? Thanks in advance! :thumbsup: My guess is that your corner_right.gif image is not the correct height as compared to your other images in the same folder. You'll notice that the shopping cart box is the only one that uses the corner_right.gif image in your html source...therefore, it's probably that image that needs fixing.
yuck_fou Posted June 28, 2006 Author Posted June 28, 2006 My guess is that your corner_right.gif image is not the correct height as compared to your other images in the same folder. You'll notice that the shopping cart box is the only one that uses the corner_right.gif image in your html source...therefore, it's probably that image that needs fixing. I dont think it's that because if I copy over the shopping_cart.php file with the bellow it fixes the problem Somewhere in this code is the correction...the problem is this code is for a contribution and I was wondering if I use this code for the shopping_cart.php without using the contribution it might mess things up. I tried to compare this code with the original shopping_cart.php but I guess I'm blind :blink: <?php /* $Id: shopping_cart.php,v 1.18 2003/02/10 22:31:06 hpdl Exp $ Modified by Wendy James 2006 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ ?> <!-- shopping_cart //--> <tr><td> <?php if ($cart->count_contents() > 0) { $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART); new infoBoxHeading($info_box_contents, true, false, tep_href_link(FILENAME_SHOPPING_CART)); echo tep_draw_form('cart_quantity', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=update_product')); $info_box_contents[0] = array('align' => 'center', 'params' => 'class="shoppingcartbox"', 'text' => 'Shopping Cart'); $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="shoppingcartbox"', 'text' => 'Remove'); $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="shoppingcartbox"', 'text' => 'Product'); $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="shoppingcartbox"', 'text' => 'Qty'); $info_box_contents[0][] = array('align' => 'right', 'params' => 'class="shoppingcartbox"', 'text' => 'Total'); $any_out_of_stock = 0; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { // Push all attributes information in an array if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { while (list($option, $value) = each($products[$i]['attributes'])) { echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value); $attributes = tep_db_query("select pa.options_values_price from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $products[$i]['id'] . "' and pa.options_id = '" . $option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $value . "'"); $attributes_values = tep_db_fetch_array($attributes); $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price']; $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix']; } } } for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (($i/2) == floor($i/2)) { $info_box_contents[] = array('params' => 'class="shoppingcartbox"'); } else { $info_box_contents[] = array('params' => 'class="shoppingcartbox"'); } $cur_row = sizeof($info_box_contents) - 1; $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data"', 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'])); $products_name = '<table border="0" cellspacing="0" cellpadding="2">' . ' <tr>' . ' <td class="infoboxcontents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . $products[$i]['name'] . '</a>'; if (STOCK_CHECK == 'true') { $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']); if (tep_not_null($stock_check)) { $any_out_of_stock = 1; $products_name .= $stock_check; } } $products_name .= ' </td>' . ' </tr>' . '</table>'; $info_box_contents[$cur_row][] = array('params' => 'class="infoboxcontents"', 'text' => $products_name); $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="infoboxcontents"', 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="infoboxcontents"', 'text' => '' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity'])); } new productListingBox($info_box_contents); ?> <br /><div align="right" class="infoboxcontents"> Sub-Total <?php echo $currencies->format($cart->show_total()); ?> <br /> <?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></div></form> </td></tr> <?php } else { $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART); new infoBoxHeading($info_box_contents, true, false, tep_href_link(FILENAME_SHOPPING_CART)); $cart_contents_string .= 'Your Cart Is Empty'; $info_box_contents = array(); $info_box_contents[] = array('text' => $cart_contents_string); new infoBox($info_box_contents); ?> </td></tr> <?php } ?> <!-- shopping_cart_eof //-->
1Putts Posted June 28, 2006 Posted June 28, 2006 I dont think it's that because if I copy over the shopping_cart.php file with the bellow it fixes the problem Somewhere in this code is the correction...the problem is this code is for a contribution and I was wondering if I use this code for the shopping_cart.php without using the contribution it might mess things up. I tried to compare this code with the original shopping_cart.php but I guess I'm blind :blink: Why don't you fix the dimensions of your images/infobox/corner_right.gif first and see what happens. As it is now, it's 1px wide by 30px high. If that doesn't do it, at least you know that's not the problem.
Guest Posted June 28, 2006 Posted June 28, 2006 try resetting the array after the header is set add this: $info_box_contents = array(); right after this: new infoBoxHeading($info_box_contents, true, false, tep_href_link(FILENAME_SHOPPING_CART));
yuck_fou Posted June 28, 2006 Author Posted June 28, 2006 I tried resetting the array but that didn't work, also I reset the images and that seemed to work until I changed the arrow. Then it went slightlyt to the right. I'm just wondering why if I put this code (I mentioned earlier) it seems to fix it? And is it possible to use the above code (I mentioned earlier), even though I wouldn't be using the contribution add-on? As it's a perfect fix! Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.