I'm using the Codeingiter cart class for a simple ordering system, I've managed to get the cart working fine, but I'm struggling to think how i go about saving the contents of the cart as an "order" in a database table so that the administrator can process it/view it.

I know the class stores the data in a session table, but it seems quite hard to deduce what is being stored - so I'm a bit confused as to where to start!

有帮助吗?

解决方案

use

$this->cart->contents();

at the checkout time to get all the products details in the cart, and add them in the order tables.

Refer this for the cart class functions.

http://ellislab.com/codeigniter/user-guide/libraries/cart.html

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top