Excellent, no client necessary. A cart is a good way to learn OO because it is sort of objecty in the traditional sense -- with a cart and items, etc.enoc22 wrote:Ahah...I see now (sorry I'm sometimes a bit slow on the draw).
This actually isn't for any client/commercial...more of just learning php.but you are right in that i need some point to focus on accomplishing...
So to start with the first thing which is to add products to the cart one or more times. That leads me to a couple of questions:enoc22 wrote:For this project it would be to do the following in the most efficient way
- ●being able to add product to the shopping cart(some product multiple times)
- ●have it display the total of each product in the cart.
- ●display and out of stock error for product not in the "store"
- What is a "product"? I usually consider it a SKU which is a string, but it could be a primary key. We need some value that can reference back to some datasource containing product information -- typically a database table.
- What does "multiple times" mean? In my experience when some kinds of products are added to the cart each gets its own line -- even if there is already that kind of product in the cart. Other times you want adding more of the same product to just increases the quantity -- if that product is already in the cart. So, do you want just one of these or both?