Is there a simple bit of code that I can insert somewhere within a page that will show the cart contents?
Eg. "You have 3 items in your basket"?
Thanks
<?
$fp = fopen ("mycart/sessions/".$_SESSION["sessionid"].".dat", "r");
//$data = fgetcsv ($fp, 250, "\t"); // skip coupon
while ($data = fgetcsv ($fp, 2000, "\t")) {
$CartTotal += ($data[2] * $data[3]);
$CartCount++;
}
$CartTotal = number_format($CartTotal, 2, '.', '');
echo "<div align='center'>Total Items = $CartCount</div><p>\n";
echo "<div align='center'>Cart Total = $CartTotal</div><p>\n";
?>
Return to Hacks & Modifications (Closed)
Users browsing this forum: No registered users and 1 guest