add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));
// START DELETE PAYPAL TEMP ORDER
// Check to see if customer has cancelled a paypal_ipn process
if ( $HTTP_GET_VARS['ipn']== 'cancel_ipn' && tep_not_null($HTTP_GET_VARS['order']) ) {
// Make sure that this order is THIS customers' order
// We don't want anybody to pass order numbers to here and delete other people's orders!!!!
$delete_order_query = tep_db_query("SELECT customers_id FROM " . TABLE_ORDERS . " WHERE `orders_id`='" . (int)$HTTP_GET_VARS['order'] . "'");
$delete_order = tep_db_fetch_array($delete_order_query);
//echo "DEBUG - delete_order=".$delete_order['customers_id']." ";
//echo "DEBUG - customer id in session=".$customer_id." ";
if ( $delete_order['customers_id']==$customer_id ) {
// Delete the order
//echo "DEBUG - about to delete order!!! ";
tep_remove_order($HTTP_GET_VARS['order'], '');
}
}
// END DELETE PAYPAL TEMP ORDER
?>
>
nach Freischaltung";
$noprice = 'true';
}
}
if ($customer_group_id == '0') {
if (ALLOW_RETAIL_PRICE == 'false') {
$nuPrice = "Preisansicht erst nach Freischaltung";
$noprice = 'true';
}
}
?>
count_contents() > 0) {
?>
'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 = '" . (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'];
}
}
}
// BOF Products Bundles
if (STOCK_CHECK == 'true') {
$runningsums = array();
// Temporarily sort the cart so that bundles are first to
// prevent marking a bundle out of stock, if the user tries to order
// a bundle's worth separately.
// Make a copy of the cart.
$workprods = $products;
for ($i = 0, $n = sizeof($workprods); $i < $n; $i++) {
// Remember the original sort order.
$workprods[$i]['origpos'] = $i;
}
// Sort.
$inorder = false;
while (!$inorder) {
$inorder = true;
for ($i = 0, $n = sizeof($workprods); $i < $n-1; $i++) {
if ($workprods[$i]['bundle'] != "yes" && $workprods[$i+1]['bundle'] == "yes") {
$workprod = $workprods[$i+1];
$workprods[$i+1] = $workprods[$i];
$workprods[$i] = $workprod;
$inorder = false;
break;
}
}
}
for ($i = 0, $n = sizeof($workprods); $i < $n; $i++) {
if ($workprods[$i]['bundle'] == "yes") {
$stock_checks[0][$i] = tep_check_stock($workprods[$i]['id'], $workprods[$i]['quantity']);
if (!tep_not_null($stock_checks[0][$i])) {
// The bundle is in stock, so count this against the total.
$bundle_query = tep_db_query("SELECT subproduct_id, subproduct_qty FROM " . TABLE_PRODUCTS_BUNDLES . " WHERE bundle_id = '" . $workprods[$i]['id'] . "'");
while ($bundle_data = tep_db_fetch_array($bundle_query)) {
$work = $bundle_data['subproduct_id'];
$runningsums[$work] += $bundle_data['subproduct_qty'];
}
}
} else {
$work = $workprods[$i]['id'];
$runningsums[$work] += $workprods[$i]['quantity'];
$stock_checks[0][$i] = tep_check_stock($workprods[$i]['id'], $runningsums[$work]);
}
}
// Now go back to the original sort order.
for ($i = 0, $n = sizeof($workprods); $i < $n; $i++) {
$work = $workprods[$i]['origpos'];
$stock_checks[1][$i] = $stock_checks[0][$work];
}
}
// EOF Product Bundles
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="middle"',
'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], '','class="standard_inputs"'));
$products_name = '