again , for learning purpose i want a very basic shopping cart without all the extras (security or money transaction, just updating D, i have scanned thorugh this forum and other material and it's not clear what is happening. i understand programming concepts but a begginer in php.
Below is an example (there is no money involved, just update database), which i have over simplified so i understand, all other threads discussing shopping basket are too advanced for me and i get lost in them. Specific questions follows:
A website with 2 types of products, lets say, vegtables and fuits.
"veg.php" page retrieves and displays from a database table called veg, all the veggie products in that table, so carrots, potatoes, etc. the columns displayed will be Name and Quantity.
similary, "fruits.php" retrieves from a database table called fruits, all fruits products in that table.
Each results row has next to it "Add to basket".
when you press "Add to basket" that particular product and qty is added to basket
the person can switch from veg.php and fruits.php pages at anytime
Once all shopping done, person hit checkout (leades to checkout.php) which displays all basket items, with a "purchase" buttong at the bottom, which once hit will process all orders (no money involved, just detuct qty ordered from database).
using the example above, i know and understand:
how to display data on both pages.
checkout for specific products, right now next to each item i have a "purchase" butoon. if i hit the "purchase" button next to a specific item, it will actually query the database using the UPDATE statement and detuct whatever qty i selected for that item. I don't want this, instead i want it to be added to basket and processed when i hit "checkout" along with all other orders.
what i need to understand:
when i hit "add to basket" next to a item, how to keep the item added with its qty and which type of products its (fruits or veg) in memory
how to batch process all sets of fuit order and sets of veg orders
i know there will b seesion or seesions arrays involved, which i want u to explain
where things are not obvious, please comment so i know whats happening