Help With E-Commerce Script

Discussion in 'PHP' started by adamjblakey, Jun 2, 2009.

  1. #1
    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;
    
    PHP:
    Thank you in advance.
    Adam
     
    adamjblakey, Jun 2, 2009 IP
  2. givemeknol

    givemeknol Active Member

    Messages:
    22
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    88
    #2
    Could you access color and size from $cart ?
     
    givemeknol, Jun 2, 2009 IP
  3. adamjblakey

    adamjblakey Active Member

    Messages:
    1,121
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    80
    #3
    Yes if they was stored in there.
     
    adamjblakey, Jun 2, 2009 IP
  4. adamjblakey

    adamjblakey Active Member

    Messages:
    1,121
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    80
    #4
    Can anyone help with this?
     
    adamjblakey, Jun 12, 2009 IP