Welcome Guest, Not a member yet? Register   Sign In
New to PHP/CI, I want to create something similar to the Shopping Cart class
#1

[eluser]Unknown[/eluser]
Except that were not going shopping...

What I'm trying to make:
http://i51.tinypic.com/2j0zeow.png
Can this be done with CodeIgniter? Note that the form, results and 'cart' are on 1 whole page.

So I'm not exactly building a shopping cart, but rather something similar for chemistry. So pretend that the 'products' are beakers, each containing different elements (carbon, oxygen, barium, chloride etc... at different quantities) and each beaker's content has a physical state (gas, liquid, solid).

To do an experiment the user has to select one gas, one liquid and one solid beaker (so 3 in total) this is referred to as their 'set up' or the cart if you like.

When a beaker is added, it would display in a table all the contents and quantity of the beaker. Add another beaker and it would do the same, add all the contents to that list BUT check for elements that have been already there (if so just increase its quantity accordingly).

Lastly a button that submits this set up to the database (validation for matching set ups would be required).

I've asked this question on a number of forums and I hope codeigniter can be my quick fix. To be honest, its been a week since I've really started to learn PHP, so talk to me like I'm a 10 year old Smile

Here's the link to the cart class: http://ellislab.com/codeigniter/user-gui.../cart.html

I should also give out information about my database (it's actually quite simple, really):

Table: Beaker (ID, Name, Weight, Element1, Element1Amount, Element2, Element2Amount, Element3, Element3Amount, Element4, Element4Amount)

Table: SetUp (ID, Gas, Liquid, Solid)




Theme © iAndrew 2016 - Forum software by © MyBB