ok! answer time...
First of all, in the fjy-to-basket.js file the totalPrice variable needs to be moved so that it is a global declaration:
Code: Select all
var totalPrice = 0; //New Location
function updateTotalPrice()
{
var itemBox = document.getElementById('shopping_cart_items');
// Calculating total price and showing it below the table with basket items
//var totalPrice = 0; //Old Location
Then, an onClick event needs to be added to some text / button etc. anywhere on your .html page:
Code: Select all
<p style="text-decoration:underline" onClick="MM_goToURL('top','billing.php?tot='.concat(totalPrice))">Billing ></p>
Then, a php page needs to be added with the following code:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Billing</title>
<?php
$totalPrice = $_GET['tot'];
?>
</head>
<body>
<p align="center">Total Price: <?php print $totalPrice; ?></p>
</body>
</html>
And that's it! However, at the moment it will only display NaN until you have the price list set up - here are the new files...