Domanda

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!

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top