Hi,
I'm building a webshop and im stuck at the checkout.
I'm using this Shopping Cart class http://www.webforcecart.com/manual.html
The cart is stored as an object in $_SESSION[cart].
This method
print_r($cart->get_contents());
would get this as output:
Array ( [0] => Array ( [id] => 7 [qty] => 1 [price] => 11.00 [info] => Test [subtotal] => 11 ) [1] => Array ( [id] => 6 [qty] => 2 [price] => 19.00 [info] => White 0 [subtotal] => 38 ) )
In the table Order I would like to store
order-id
customer-id
total products
total quantity
total price
date
In the table Orderrow I would like to store:
order-id,
product-id,
product-name,
quantity,
price,
subtotal
I know i can get the order-id with the function mysql_insert_id() but how can i store each product in the array with their info in the table Orderrow?
Or is there a better way to do this? please advice me, thank you.