hi, i want to get the total price of all products in my cart (the quantity price sum of each product). my php code for this field: <?php echo sprintf( '%01.2f', $row['pricer'] * $row['qty'] ); ?> PHP:
I'm assuming that you are looping through the results so that you can display each row properly. I would set an array with the total item price and then do an array sum at the end. When you are looping do something like this: $totalArray[] = $row['pricer'] * $row['qty']; PHP: At the bottom do this: $total_price = array_sum($totalArray); PHP: You can then format it to whatever currency or numerical format you need.