I don't know of any code out there right now to send you too, but judging from what I've read (if I've interpreted it correctly), this is probably fairly simple to do from scratch. I'll also assume that the user will be browsing through multiple page loads seeking out records.
If you're only concerned about the values of whatever the person has selected, and if these values are individual records in your database table, the following should be easy to implement:
Write out all your records with checkboxes next to them where the input name is the same (make sure to use the []s -- i.e. <input type='checkbox' name='fruits[]' value='1'>) and the values correspond to the unique record id.
Now all you have to do is have the persons submit this form and use something in your form handler like:
if ($_POST['fruits'])
{
$_SESSION['fruits'] = $_POST['fruits'];
/*if form handler is not the same page,
redirect to http_referer or whatever*/
}
Finally, when they get to the "sorta checkout" page, if they need to review what they selected, do something like:
if ($_SESSION['fruits'])
{
// implode session array 'fruit'
$query = "SELECT * FROM fruits WHERE id = " . implode(' OR ',$_SESSION['fruits']);
}
else
{
// display that cart is empty or whatever
}
Finally, you can store the data in the same manner:
//checkout form handler
if ($_SESSION['fruits'])
{
// implode session array 'fruit'
$query = "INSERT INTO fruit_ids (ids) VALUES ('" . implode('|',$_SESSION['fruits']) . "')";
}
else
{
// display that cart is empty or whatever
}
You could also make the checkout page another form with all the items checked and build the final implode string once again from the $_POST['fruits'] array just in case you want to let them uncheck something they accidently "ordered" before submitting them form.