adamjblakey
Jun 2nd 2009, 8:20 am
Hi,
I have a e-commerce script which i am trying to modify. It currently takes the price and qty and puts them into a session. I want to add the color and size selection in the session also but am unsure how to do this.
The code is below:
case 'add':
$new = '';
for ($i = 0; $i < $_POST['qty']; $i++)
{
$new .= $_GET['id'] . ',';
}
$new = substr($new, 0, -1);
if ($cart)
{
$cart .= ',' . $new;
}
else
{
$cart = $new;
}
break;
Thank you in advance.
Adam
I have a e-commerce script which i am trying to modify. It currently takes the price and qty and puts them into a session. I want to add the color and size selection in the session also but am unsure how to do this.
The code is below:
case 'add':
$new = '';
for ($i = 0; $i < $_POST['qty']; $i++)
{
$new .= $_GET['id'] . ',';
}
$new = substr($new, 0, -1);
if ($cart)
{
$cart .= ',' . $new;
}
else
{
$cart = $new;
}
break;
Thank you in advance.
Adam