Sublime directory Surf the web anonymous Pagerank Monitor


Error .: Undefined index: order_id :.

chris_middleton
Thu 3 May 2007, 08:34 pm GMT +0200
just "installing" yourcart for the first time and have set up all the db's etc and now when executing it returns this error: http://www.chrismiddleton.co.uk/rock/classes/db_cart/db_cart_example.php

// show total value of the current cart
function show_total_value() {
$sql = sprintf("SELECT SUM(quantity * price) AS total FROM %s WHERE order_id = %d", ORDER_ROWS, $_SESSION['order_id']);
if (!$result = mysql_query($sql)) {
$this->error = $this->messages(1);
return;
} else {
$total_amount = mysql_result($result, 0, "total");
mysql_free_result($result);
return $total_amount;
}
}

Any help much appreciated,


Thanks,
Chris Middleton

chris_middleton
Thu 3 May 2007, 08:46 pm GMT +0200
having just gone back through my db's i realise its something i have missed out. Sorry for wasting your time!!

Chris

olaf
Thu 3 May 2007, 08:59 pm GMT +0200
having just gone back through my db's i realise its something i have missed out. Sorry for wasting your time!!

Chris

you didn't  :D

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional