the exact code will depend on the columns in your cart. This is the code generated for the default columns:
ID, Name, Description, Thumbnail, Weight, Quantity, Price
//get cookies
function GetCookies($ItemString) {
$itemArray = explode("|WAEC|", $ItemString);
$itemID = $itemArray[0];
$itemName = $itemArray[1];
$itemDescription = $itemArray[2];
$itemThumbnail = $itemArray[3];
$itemWeight = $itemArray[4];
$itemQuantity = $itemArray[5];
$itemPrice = $itemArray[6];
return new eCart1_ItemDefinition($itemID, $itemName, $itemDescription, $itemThumbnail, $itemWeight, $itemQuantity, $itemPrice);
}
//get cookies
//set cookies
function SetCookies($itemIndex) {
$ItemString = "";
$ItemString .= $this->Items[$itemIndex]->ID."|WAEC|";
$ItemString .= $this->Items[$itemIndex]->Name."|WAEC|";
$ItemString .= $this->Items[$itemIndex]->Description."|WAEC|";
$ItemString .= $this->Items[$itemIndex]->Thumbnail."|WAEC|";
$ItemString .= $this->Items[$itemIndex]->Weight."|WAEC|";
$ItemString .= $this->Items[$itemIndex]->Quantity."|WAEC|";
$ItemString .= $this->Items[$itemIndex]->Price;
return $ItemString;
}
//set cookies
//cookie information
function SetCookieInfo($theCookieString) {
$numDays = 14;
$theDomain = "";
$thePath = "";
$cookSec = false;
if ($numDays == "") $numDays="0";
$theDate = strtotime("+".$numDays." Days");
setcookie($this->CartName."_Items", $theCookieString, $theDate, $thePath, $theDomain, $cookSec);
}
//cookie information