Welcome Guest, Not a member yet? Register   Sign In
changing options for cart items
#4

[eluser]Damien K.[/eluser]
I'm curious how you're representing your cart items. You're using an array and the key contains (volatile) data such as options. What I'm curious is the content the key is referring to, if anything. What do each of these keys point to?

To address your case, I believe a popular approach in the industry is via OOP and using the appropriate data structures. One approach using this method is to have an CartItemList object where the implementation of this list will preserve order of added items. Then each cart item in the list will be represented as a CartItem object. CartItem will then have fields for options, quantity, and all the other required fields you need.


Messages In This Thread
changing options for cart items - by El Forum - 10-04-2009, 08:48 AM
changing options for cart items - by El Forum - 10-05-2009, 04:55 PM
changing options for cart items - by El Forum - 10-06-2009, 06:50 AM
changing options for cart items - by El Forum - 10-06-2009, 10:02 AM
changing options for cart items - by El Forum - 10-06-2009, 10:19 AM
changing options for cart items - by El Forum - 10-06-2009, 11:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB