Welcome Guest, Not a member yet? Register   Sign In
add same product but different rowid in shopping chart codeigniter
#1

[eluser]harris_priambudi[/eluser]
I am developing some laundry's website,
and I was used shopping chart method for add some laundry order
and I have some issue for adding laundry's order
for example:
I want to insert some laundry option like:
- [1]Cloth 5$ [add]
- [2]Jacket 10$ [add]
- [3]Suit 12$ [add]

and if I choose jacket twice and suit once, I want my shopping chart like this:

[shopping chart view]
ID | Item | price
[2] Jacket 10$
[2] Jacket 10$
[3] Suit 12$
Total 32$

For Quantity I used default = 1
so if I choose some order and it was the same product, it would be some different order
can CI do that? because if I choose same product it would be just update their quantity
not add a new item

please tell me, thank you Smile
#2

[eluser]jacobson[/eluser]
If you add this data to database and get this from database, you need unique id for each new element (so another field in the table). You barely described your problem ;p You said something about choosing the same product twice. Give More detailed description




Theme © iAndrew 2016 - Forum software by © MyBB