I am working on an extension that will add a fee to a cart if an item from a specific category is selected. If the restuarant sells merchandise that is not food related and wants to ship it to their customers this fee could be added if something from that category is selected. I only need the fee to be added once no mater how many of those items are added, and if the items are removed from the cart the fee would automatically be removed.
I have the barebones of the extension completed and it is able to be accessed through the backend and I can add the amount of the fee so far. I would really appreciate some direction in the followng areas:
-Are there any extensions that do something similar to this that I can take a look at to see how I can accomplish this?
-What php functions are built into TastyIgniter that would allow me to loop through a cart and find any items of a given category?
-How can I add a menu item (the fee) to the cart once I have looped through the cart and found that there are items from the given category?
Thanks for taking the time to read my questions and I appreciate any help at all puttng me in the right direction.