PHP Cart issue with GetCartTotals()

This is a discussion on PHP Cart issue with GetCartTotals() within the PHP General forums, part of the PHP Programming Forums category; Hi, I downloaded a free script from FreeBert.com after much Google searching for a simple PHP cart script to ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-14-2008
screechyboy@googlemail.com
 
Posts: n/a
Default PHP Cart issue with GetCartTotals()

Hi,

I downloaded a free script from FreeBert.com after much Google
searching for a simple PHP cart script to compliment my existing site
however I have come unstuck on the MakePayment.php page.

After I click on the 'Click here to pay by Pay Pal' button I get the
following error at the header of the page "Warning: Missing argument 1
for GetCartTotals(), called in C:\xampp\htdocs\countrybumpkins\basket
\MakePayment.php on line 33 and defined in C:\xampp\htdocs
\countrybumpkins\basket\inc\functions\Cart_Functio ns.php on line 483"

Could you point me in the right direction as to where I have gone
wrong? the rest of the page is displays but on clicking through to
Paypal it does not pass all the info through to there site which
simply displays 'click here to try again'.

Line 33 points to function GetCartTotals

Line 483 is as follows:

//
88888888888888888888888888888888888888888888888888 88888888888888888888888888888888888888888888888888 888888888888888888888888
function GetCartTotals($Session_Prefix)
{
$Output = '';

if (isset($_SESSION[$Session_Prefix.'Item_Count']) &&
$_SESSION[$Session_Prefix.'Item_Count']!=0)
{
$CheckOrd=1;

//Setup Cart Vars
$displaysubtotal=0;
$displayshippingtotal=0;
$displaytotal=0;
$displaynewshipping=0;
$displaynewprice=0;

$final = $_SESSION[$Session_Prefix.'Item_Count']+1;

for ($i = 1; $i < $final; $i++)
{

// Setup Vars for this Row
$displayserialnum = "serialnum".$i;
$displayshippinga = "shippinga".$i;
$displayshippingb = "shippingb".$i;
$displaytitle = "title".$i;
$displayprice = "price".$i;
$displayquantity = "quantity".$i;
$displayremove = "remove".$i;

// Calculate The Total Shipping For This Item
if ($_SESSION[$Session_Prefix.$displayquantity]>1)
{
$displaynewshipping = ($_SESSION[$Session_Prefix.
$displayshippinga] + ($_SESSION[$Session_Prefix.$displayshippingb] *
($_SESSION[$Session_Prefix.$displayquantity] - 1)));
} else
{
$displaynewshipping = $_SESSION[$Session_Prefix.
$displayshippinga];
}

// Calculate The price For This Item
$displaynewprice = $_SESSION[$Session_Prefix.$displayprice] *
$_SESSION[$Session_Prefix.$displayquantity];

// Update The Total Vars
$displaysubtotal = $displaysubtotal + $displaynewprice;
$displayshippingtotal = $displayshippingtotal +
$displaynewshipping;
} // end For

// Calculate Totals
$displaytotal = ($displayshippingtotal + $displaysubtotal);

$Output['Shipping_Total']=$displayshippingtotal;
$Output['Sub_Total']=$displaysubtotal;
$Output['Order_Total']=$displaytotal;

}

return $Output;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Many thanks in advance.

Steve
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:16 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0