Permalink
Browse files

remove redundant parameters in checkout_process.php

check if variables are set
(report #70)
  • Loading branch information...
1 parent 4e18a3b commit 7b63fa966b871eb06ccb438be8686c4e5e342841 @haraldpdl haraldpdl committed Nov 7, 2010
Showing with 2 additions and 8 deletions.
  1. +1 −7 catalog/checkout_process.php
  2. +1 −1 catalog/includes/functions/general.php
@@ -141,8 +141,6 @@
// initialized for the email confirmation
$products_ordered = '';
- $subtotal = 0;
- $total_tax = 0;
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
// Stock Update - Joao Correia
@@ -238,10 +236,6 @@
}
}
//------insert customer choosen option eof ----
- $total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
- $total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
- $total_cost += $total_products_price;
-
$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
}
@@ -277,7 +271,7 @@
EMAIL_SEPARATOR . "\n";
$payment_class = $$payment;
$email_order .= $order->info['payment_method'] . "\n\n";
- if ($payment_class->email_footer) {
+ if (isset($payment_class->email_footer)) {
$email_order .= $payment_class->email_footer . "\n\n";
}
}
@@ -1082,7 +1082,7 @@ function tep_count_modules($modules = '') {
for ($i=0, $n=sizeof($modules_array); $i<$n; $i++) {
$class = substr($modules_array[$i], 0, strrpos($modules_array[$i], '.'));
- if (is_object($GLOBALS[$class])) {
+ if (isset($GLOBALS[$class]) && is_object($GLOBALS[$class])) {
if ($GLOBALS[$class]->enabled) {
$count++;
}

0 comments on commit 7b63fa9

Please sign in to comment.