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 = '" . (int)$products[$i]['id'] . "'
and pa.options_id = '" . (int)$option . "'
and pa.options_id = popt.products_options_id
and pa.options_values_id = '" . (int)$value . "'
and pa.options_values_id = poval.products_options_values_id
and popt.language_id = '" . (int)$languages_id . "'
and poval.language_id = '" . (int)$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'];
}
}
}
$row = 0;
echo '
'.
''.
''.TABLE_HEADING_PRODUCTS.' | '.
''.TABLE_HEADING_QUANTITY.' | '.
''.TABLE_HEADING_TOTAL.' | '.
'
';
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if ($row != 0) {
echo ' '.tep_draw_separator('spacer.gif', '1', '1').' |
';
}
$products_name = '';
$products_name .= '
|
| ';
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_options = '';
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
reset($products[$i]['attributes']);
$products_options = '';
while (list($option, $value) = each($products[$i]['attributes'])) {
$products_options .= ' - ' .$products[$i][$option]['products_options_name'] . ': ' . $products[$i][$option]['products_options_values_name'] . ' ';
}
$products_options .= ' ';
}
$products_name .= ''.$products_options.' |
| '.
' ' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="6"').'
| '.
' ' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ' | ';
$products_name .=
'
';
echo $products_name ;
echo ' ';
$row ++;
}
?>
|
|
format($cart->show_total()); ?> |