Dax87 Posted May 19, 2011 Share Posted May 19, 2011 hello, I have a problem, as the title. Product Attributes Not Showing in Shopping Card, Why? if post my product_info.php and shopping_Cart.php you can 'find the solution? add this contrib: http://addons.oscommerce.com/info/7036 product_info.php <?php /* $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <style type="text/css"> <!-- .Stile1 { color: #b5d8a5; font-size: 12px; font-family: Arial, Helvetica, sans-serif; } .Stile2 { color: #b5d8a5; font-family: Arial, Helvetica, sans-serif; } .Stile4 { font-size: 12px; color: #B5D8A5; } --> </style> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-23023843-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="col_left"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </td> <!-- body_text //--> <td width="100%" class="col_center"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php ///////////// begin recently_viewed if (!tep_session_is_registered('recently_viewed')) { tep_session_register('recently_viewed'); $recently_viewed = $HTTP_GET_VARS['products_id'] . ';'; } $dup_recent_viewed = 'n'; $recent_products = split(';',$recently_viewed); foreach ($recent_products as $recent) { if ($recent == $HTTP_GET_VARS['products_id']) $dup_recent_viewed = 'y'; }//foreach ($recent_products as $recent) { if ($dup_recent_viewed == 'n') $recently_viewed = $HTTP_GET_VARS['products_id'] . ';' . $recently_viewed ; ///////////// end recently_viewed if ($product_check['total'] < 1) { ?> <tr><td> <?php tep_draw_heading_top(); ?> <?php echo tep_draw_title_top();?> <?php echo TEXT_PRODUCT_NOT_FOUND;?> <?php echo tep_draw_title_bottom();?> <?php tep_draw_heading_top_1(); ?> <!-- <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td> --> <br style="line-height:1px;"><br style="line-height:12px;"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table> <!-- </td> </tr> </table> --> <?php tep_draw_heading_bottom_1(); ?> <?php tep_draw_heading_bottom(); ?> <?php } else { $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_availability_id, p.products_delivery_id, p.products_guaranty_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<span class="productOldPrice"><s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s></span> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } $products_availability = $product_info['products_availability_id']; $products_availability_info_query = tep_db_query("select products_availability_name from " . TABLE_PRODUCTS_AVAILABILITY . " where products_availability_id = '" . (int)$products_availability . "' and language_id = '" . (int)$languages_id . "'"); $products_availability_info = tep_db_fetch_array($products_availability_info_query); $products_availability_name = $products_availability_info['products_availability_name']; $products_delivery = $product_info['products_delivery_id']; $products_delivery_info_query = tep_db_query("select products_delivery_name from " . TABLE_PRODUCTS_DELIVERY . " where products_delivery_id = '" . (int)$products_delivery . "' and language_id = '" . (int)$languages_id . "'"); $products_delivery_info = tep_db_fetch_array($products_delivery_info_query); $products_delivery_name = $products_delivery_info['products_delivery_name']; $products_guaranty = $product_info['products_guaranty_id']; $products_guaranty_info_query = tep_db_query("select products_guaranty_name from " . TABLE_PRODUCTS_GUARANTY . " where products_guaranty_id = '" . (int)$products_guaranty . "' and language_id = '" . (int)$languages_id . "'"); $products_guaranty_info = tep_db_fetch_array($products_guaranty_info_query); $products_guaranty_name = $products_guaranty_info['products_guaranty_name']; ?> <tr> <td> <?php tep_draw_heading_top(); ?> <?php echo tep_draw_title_top();?> <?php echo $breadcrumb->trail(' » ')?> <?php echo tep_draw_title_bottom();?> <?php tep_draw_heading_top_1(); ?> <?php echo tep_draw_prod_top(); ?> <?php /* tep_draw_heading_top_2(); */ ?> <table cellspacing="0" cellpadding="0" border="0" class="product"> <tr><td> <table cellpadding="0" cellspacing="0" border="0" class="title_info"> <tr><td><em><?php echo $products_name; ?></em></td></tr> </table> <table cellspacing="0" cellpadding="0" border="0"> <tr><td height="100%"> <?php if (tep_not_null($product_info['products_image'])) { ?> <table cellpadding="0" cellspacing="0" border="0" align="left" class="prod_info"> <tr><td align="center"> <?php echo tep_draw_prod_pic_top();?> <script type="text/javascript"><!-- document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lytebox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') ; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lytebox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') ; ?> </noscript> <?php echo tep_draw_prod_pic_bottom();?> </td></tr> <tr><td align="center"> <?php echo '<div><a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lytebox"><br style="line-height:7px">' . TEXT_CLICK_TO_ENLARGE . '</a></div>'; ?> </td></tr> </table> <?php } ?> <div class="padd3"><?php echo stripslashes($product_info['products_description']); ?> <br><br style="line-height:11px"><?php echo tep_draw_prod_price_top();?><span class="productSpecialPrice"><?php echo $products_price?><p><?php echo clubosc_products_stock($product_info['products_id']); ?></p></span><?php echo tep_draw_prod_price_bottom();?></div> </td></tr> </table> </td> </tr> </table> <?php /* tep_draw_heading_bottom_2(); */ ?> <table cellspacing="0" cellpadding="0" border="0" align="center" style="margin:15px 0px 15px 0px; height:1px;"> <tr><td class="bg_line_x"><?php echo tep_draw_separator('spacer.gif', '1', '1');?></td></tr> </table> <?php tep_draw_heading_top_2();?> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table cellpadding="0" cellspacing="0" class="box_width_cont product"> <tr><td height="25" colspan="2"><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td></tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <tr><td height="10" colspan="2"></td></tr> <?php } ?> </table> <?php } ?> <table> <?php if (tep_not_null($products_availability_info['products_availability_name'])) { ?> <tr> <td colspan="2" align="center" valign="top" class="main"><div align="left"><b><?php echo TEXT_AVAILABILITY; ?></b> <?php echo $products_availability_name; ?></div></td> </tr> <?php } if (tep_not_null($products_delivery_info['products_delivery_name'])) { ?> <tr> <td colspan="2" align="center" valign="top" class="main"><div align="left"><b><?php echo TEXT_DELIVERY; ?></b> <?php echo $products_delivery_name; ?></div></td> </tr> <?php } if (tep_not_null($products_guaranty_info['products_guaranty_name'])) { ?> <tr> <td colspan="2" align="center" valign="top" class="main"><div align="left"><b><?php echo TEXT_GUARANTY; ?></b> <?php echo $products_guaranty_name; ?></div></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <table cellpadding="0" cellspacing="0" class="product box_width_cont"> <tr><td class="line_h"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td></tr> <tr><td height="17"></td></tr> </table> <?php } if (tep_not_null($product_info['products_url'])) { ?> <table cellpadding="0" cellspacing="0" class="product box_width_cont"> <tr><td class="line_h"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td></tr> <tr><td height="17"></td></tr> </table> <?php } if (DISPLAY_EXTRA_IMAGES == 'true'){ if ($product_check['total'] >= 1) { include (DIR_WS_INCLUDES . 'products_extra_images.php'); } } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <table cellpadding="0" cellspacing="0" class="product box_width_cont"> <tr><td class="line_h"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td></tr> <tr><td height="17"></td></tr> </table> <?php } else { ?> <table cellpadding="0" cellspacing="0" class="product box_width_cont"> <tr><td class="line_h"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td></tr> <tr><td height="17"></td></tr> </table> <?php } ?> <!-- <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"><td> --> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="product box_width_cont"> <tr> <td class="main bg_input"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?> <?php echo tep_draw_separator('spacer.gif', '15', '1'); ?><?php // BOF: MOD - EASY CALL FOR PRICE v1.4 /* <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> */ if ($product_info['products_price'] == CALL_FOR_PRICE_VALUE){ ?> <td class="main" align="right"><a href="javascript:history.go(-1)"><?php echo tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE); ?></a></td> <?php } else { ?> <td class="main" align="right"><?php $bt_buy = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $product_info['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'loading.gif', '', '', '', 'align="absmiddle" id="loading_' . $product_info['products_id'] . '" style="visibility: hidden;"') . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; echo $bt_buy; /* echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); */?></td> <?php } // EOF: MOD - EASY CALL FOR PRICE v1.4 ?> <img src="/Store/includes/languages/italian/images/buttons/help2.gif" width="32" height="32" align="absmiddle" /><a href="contact_us.php?products_id=<?php echo $product_info['products_id']; ?>&x=12&y=6&model=<?php echo $product_info['products_model']; ?>" class="Stile1" ONMOUSEOVER="window.status='Catalogo Renner - Store Piatino Pianoforti' ; return true">Fai una domanda su <b><?php echo $product_info['products_name']; ?></b></a> <p> <p></p><p class="Stile2"><img src="/Store/includes/languages/italian/images/buttons/button_print_view.gif" width="32" height="32" align="absmiddle" /><a href="JavaScript:window.print();" class="Stile4">Stampa la scheda prodotto</a><style type="text/css"> <!-- .Stile1 {color: #b5d8a5} a:visited { color: B5D8A5; } --> </style> <p></p> <p class="Stile2"><img src="/Store/includes/languages/italian/images/buttons/ups.gif" width="32" height="32" align="absmiddle" /><a href=shipping.php><span class="Stile1">Spedizione e Consegna</span></a></p> </tr> <tr> </table><br style="line-height:1px;"><br style="line-height:10px;"> <!-- </td></tr> </table> --> <?php tep_draw_heading_bottom_2();?> <?php echo tep_draw_prod_bottom(); ?> <?php tep_draw_heading_bottom_1(); ?> <?php tep_draw_heading_bottom();?> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> <tr> <td><table border="0" align="center" width="100%" cellspacing="0" cellpadding="2"> <?php if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php'); ?> </table></td> </tr> </td> </tr> <!-- social bookmarks start //--> <?php include(DIR_WS_MODULES . FILENAME_SOCIAL_BOOKMARKS); ?> <!-- social bookmarks finish //--> <!-- Begin Sitemap SEO--> <script type='text/javascript' src='javascript/sitemap_seo.js'></script> <?php require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SITEMAP_SEO); if (SITEMAP_SEO_SHOW_RELATED_PRODUCTS == 'true') { ?> <tr> <td class="smallText"><a href="javascript:displaySitemapProduct();" class="smallText"><span style="vertical-align:text-bottom; "><img src="images/sitemap_arrow.jpg" alt="" border="0"></span><span style="padding-left: 3px;"><?php echo TEXT_SITEMAP_RELATED_PRODUCTS; ?></span></a></td> </tr> <tr><td height="5"></td></tr> <tr> <td colspan="3"><table border="0" id="sitemap_product" style="display: none;" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_PRODUCT); ?></td> </tr> </table></td> </tr> <?php } ?> <?php if (SITEMAP_SEO_SHOW_INDIVIDUAL_CATEGORY_SITEMAP == 'true') { ?> <tr> <td class="smallText"><a href="javascript:displaySitemapCategory();" class="smallText"><span style="vertical-align:text-bottom; "><img src="images/sitemap_arrow.jpg" alt="" border="0"></span><span style="padding-left: 3px;"><?php echo TEXT_SITEMAP_RELATED_CATEGORIES; ?></span></a></td> </tr> <tr><td height="5"></td></tr> <tr> <td colspan="3"><table border="0" id="sitemap_category" style="display: none;" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_CATEGORY); ?></td> </tr> </table></td> </tr> <?php } ?> <!-- End Sitemap SEO --> </table></form></td> <!-- body_text_eof //--> <td class="col_right"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--></body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> and shopping_Cart.php <?php /* $Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require("includes/application_top.php"); if ($cart->count_contents() > 0) { include(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment; } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><td class=""> <?php tep_draw_heading_top();?> <?php new contentBoxHeading_ProdNew($info_box_contents);?> <?php if ($cart->count_contents() > 0) { ?> <?php $info_box_contents = array(); $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_REMOVE); $info_box_contents[0][] = array('params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_PRODUCTS); $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_QUANTITY); $info_box_contents[0][] = array('align' => 'right', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_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 popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix 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 . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"); $attributes_values = tep_db_fetch_array($attributes); $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name']; $products[$i][$option]['options_values_id'] = $value; $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name']; $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="productListing-even"'); } else { $info_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($info_box_contents) - 1; $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'])); $products_name = ' <em>' . $products[$i]['name'] . '</em><br>'.tep_draw_separator('spacer.gif', '1', '8').'<br> <table cellpadding="0" cellspacing="0" border="0" class="pic table_pic_width"> <tr> <td>'.tep_image(DIR_WS_IMAGES.'pic_corn_tl.gif').'</td> <td class="pic_corn_t">'.tep_draw_separator('spacer.gif', '1', '1').'</td> <td>'.tep_image(DIR_WS_IMAGES.'pic_corn_tr.gif').'</td> </tr> <tr> <td class="pic_corn_l">'.tep_draw_separator('spacer.gif', '1', '1').'</td> <td class="image"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td> <td class="pic_corn_r">'.tep_draw_separator('spacer.gif', '1', '1').'</td> </tr> <tr> <td>'.tep_image(DIR_WS_IMAGES.'pic_corn_bl.gif').'</td> <td class="pic_corn_b">'.tep_draw_separator('spacer.gif', '1', '1').'</td> <td>'.tep_image(DIR_WS_IMAGES.'pic_corn_br.gif').'</td> </tr> </table>'; 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; } } if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { $products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>'; } } $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data" style="text-align:center;"', 'text' => $products_name); $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top" style="text-align:center;"', 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], ' class="input_1"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top" style="text-align:center;"', 'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>'); } ?> <?php /* <?=TABLE_HEADING_REMOVE?> <?=TABLE_HEADING_PRODUCTS?> <?=TABLE_HEADING_QUANTITY?> <?=TABLE_HEADING_TOTAL?> */ ?> <!-- Top hedaer shoping cart start --> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td style="background:url(images/li2.gif)" > <table cellpadding="0" cellspacing="0" border="0" style="background:url(images/q4.gif) no-repeat right; height:39px"> <tr> <td><?php echo tep_image(DIR_WS_IMAGES.'q3.gif')?></td> <td class="remove shop_cart vam" align="center"><?php echo TABLE_HEADING_REMOVE?></td> <td class="products shop_cart vam" align="center"><?php echo TABLE_HEADING_PRODUCTS?></td> <td class="quantity shop_cart vam" align="center"><?php echo TABLE_HEADING_QUANTITY?></td> <td class="total shop_cart vam" align="center"><?php echo TABLE_HEADING_TOTAL?></td> </tr> </table> </td> </tr> </table> <?php echo tep_draw_separator('spacer.gif', '1', '9'); ?><br> <?php tep_draw_heading_top_3();?> <?php for ($i=1;$i<count($info_box_contents);$i++) { $rowline=$info_box_contents[$i]; $product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products[$i-1]['id'] . "' and language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); $description=$product['products_description']; ?> <?php if ($i>=2) { ?> <table cellpadding="0" cellspacing="0" border="0" style="height:32px;" class="bg_line_x"><tr><td><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td></tr></table> <?php } ?> <!-- Product info --> <?php echo tep_draw_prod_top();?> <table cellpadding="0" cellspacing="0" border="0" class="product"> <tr> <td class="remove" align="center"><?php echo tep_draw_separator('spacer.gif', '1', '20'); ?><br> <?php echo $rowline[0]['text']?><input type="hidden" name="products_id[]" value="<?php echo $products[$i-1]['id']?>"/> </td> <td class="products"> <table cellpadding="0" cellspacing="20" border="0"> <tr> <td style="text-align:left"> <span><?php echo $rowline[1]['text']?></span> </td> </tr> </table> </td> <td class="quantity" align="center"><?php echo tep_draw_separator('spacer.gif', '1', '20'); ?><br> <input type="text" name="cart_quantity[]" class="input_1" value="<?php echo $products[$i-1]['quantity']?>"> </td> <td class="total" align="center"><?php echo tep_draw_separator('spacer.gif', '1', '20'); ?><br><span class="productSpecialPrice"><?php echo $rowline[3]['text']?></span></td> </tr> </table> <?php echo tep_draw_prod_bottom();?> <?php } ?> <?php tep_draw_heading_bottom_3();?> <? // new productListingBox($info_box_contents); ?> <!-- Top heder shoping cart end --> <table cellspacing="0" cellpadding="0" border="0" class="product"> <tr> <td width="80%" align="right" class="cart_total_left"><strong><?php echo SUB_TITLE_SUB_TOTAL; ?></strong> </td> <td width="20%" align="center" class="cart_total_right"> <span class="productSpecialPrice"><?php echo $currencies->format($cart->show_total()); ?></span> </td> </tr> </table> <table cellspacing="0" cellpadding="0" border="0" > <tr> <td style="padding:5px 20px 20px 0px;" class="padd33 bg_input"><?php echo tep_image_submit('button_update.gif', IMAGE_BUTTON_UPDATE_CART); ?> <?php $back = sizeof($navigation->path)-2; if (isset($navigation->path[$back])) { echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping1.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; } ?> <?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td> </tr> </table> <?php $initialize_checkout_methods = $payment_modules->checkout_initialization_method(); if (!empty($initialize_checkout_methods)) { ?> <table cellpadding="0" cellspacing="0" border="0"> <tr><td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr> <tr><td align="right" class="main" style="padding-right:50px;"><?php echo TEXT_ALTERNATIVE_CHECKOUT_METHODS; ?></td></tr> <?php reset($initialize_checkout_methods); while (list(, $value) = each($initialize_checkout_methods)) { ?> <tr><td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr> <tr><td align="right" class="main"><?php echo $value; ?></td></tr> </table> <?php } } } else { ?> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td></td> <td align="center" class="main"><br><?php new infoBox_77(array(array('text' => TEXT_CART_EMPTY))); ?></td> <td></td> </tr> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?><br><br></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <tr><td colspan="3" height="5"></td></tr> </table> <?php } ?> </td></tr> <?php tep_draw_heading_bottom();?> </table> </form></td> <!-- body_text_eof //--> <td valign="top"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Link to comment Share on other sites More sharing options...
Dax87 Posted May 20, 2011 Author Share Posted May 20, 2011 problem solved, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.