Welcome Guest, Not a member yet? Register   Sign In
Chaining in Cart module
#1

[eluser]Go-Trex[/eluser]
Hi,

I'm using CodeIgniter for quite some time now, and most of the time I can figure things out myself. But there is one thing I can not figure out myself.

I am creating an order module where it is possible to search for a domain name and in step two of the order process you can select a webhosting solution. These two rules are added to the Cart module from CodeIgniter. When a user decides to remove the domain name from the cart I would like to see that the webhosting rule also would be removed. A sort of chaining.

Both rules have a unique ID. My firtst thought was to attach the unique ID of the domainname to the extra attribute of the webhosting solution to chain them and then when the user removes the domainname a script looks in the extra attribute of the other rules and when a match is found it also deletes this item. The problem is that the Cart module not works this way. Deleting an item needs to be through the unique ID.

Does anyone know how to achieve this situation. A work a round will be fine too.

Thanks in advance.
#2

[eluser]InsiteFX[/eluser]
You can always extend the Cart Class and add to it what you need it to do...




Theme © iAndrew 2016 - Forum software by © MyBB