Welcome Guest, Not a member yet? Register   Sign In
flexi cart - A comprehensive shopping cart library for CodeIgniter
#58

[eluser]haseydesign[/eluser]
@georgegijo

The flexi-cart library deliberately doesn't come with any product item management functions. The reason being is that e-commerce sites can have vastly different database
designs from one site to another.

So by omitting the functionality from the library, it allows the developer to plug the library into the setup they want, rather than forcing them to use a design that is potentially unsuitable to their needs.

To get a better understanding of some of the most common database designs for product tables on e-commerce sites, checkout this very good summary posted on Stackoverlow @ http://stackoverflow.com/a/695860/99106

As the most basic of examples, the flexi-cart demo includes a single table named 'demo_items'. If you need an example of inserting records to this table it could be done as simply as:
Code:
$sql_insert = array(
    'item_cat_fk' => 3,
    'item_name' => 'My Example Item',
    'item_price' => 29.99,
    'item_weight' => 9
);
$this->db->insert('demo_items', $sql_insert);

However, if you're unfamiliar with the native functions within CI (As used above), then I suggest you spend a couple of hours reading through the CI documentation just to give yourself an idea of what CodeIgniter can do. Once you know what it can do, then you can hunt down how to actually do it when you need to apply it.

http://ellislab.com/codeigniter/user-gui...ecord.html


Messages In This Thread
flexi cart - A comprehensive shopping cart library for CodeIgniter - by El Forum - 10-21-2012, 08:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB