Menu
As hopefully the title has given a clue to my question.
I have a shopping cart script which currently uses an array. Product ID and count for how many are in the cart of this item.
I want to make this into a OOP Collection instead.
My question is,
my collection of products is fine, but do I just add the same product twice to my collection if someone wants to buy multiple numbers of the same products?
Or should my product class have a integer in there?
what would be the best approach?
Also thinking is need to update the number or delete all.