Quote Originally Posted by wolfderby View Post
cool, so no other purpose other than styling?

Also I got my edit to work by editing the includes/classes/order.php
Code:
function cart() {

...

$this->products[$index] = array('...

'price' => (isset($_SESSION['new_price'][$products[$i]['id']]) ? $_SESSION['new_price'][$products[$i]['id']] : $products[$i]['price']),
and
'final_price' => zen_round((isset($_SESSION['new_price'][$products[$i]['id']]) ? $_SESSION['new_price'][$products[$i]['id']] : $products[$i]['price'] + $_SESSION['cart']->attributes_price($products[$i]['id'])), 4), // changed to 4 decimals for rounding calcs -- frank18


}
and I put the data there in includes/classes/shopping_cart.php
Code:
function actionUpdateProduct($goto, $parameters) {...
...
if ( in_array($_POST['products_id'][$i],  ... else {
...
 $_SESSION['new_price'][$_POST['products_id'][$i]] = $_POST['cart_price'][$i];
}
within the last else



is it bad to have the double square bracket for $_SESSION['new_price'][$_POST['products_id'][$i]] ?

Also is there a way to tell which php pages have been used to load a page? and/or the order of the object's methods? I think that was the most confusing part of figuring this out. The superglobals add-on for me really revealed how much goes into even just one page loading.
Nope, that double-square ending bracket (highlighted above) will add an array element to $_SESSION['new_price'] using the $_POST['products_id'][$i] value. So if $_POST['products_id'][0] contains 141, an array element will be created named $_SESSION['new_price'][141].

To bullet-proof your code, you should ensure that $_SESSION['new_price'] is (at some early point in the processing) set to an empty array.

You can get some insight into what's happening when a page loads using the Notifier Trace plugin. That will create a log file containing all the "notifications" that are being issued and will give you some clues as to the processing order.