![]() |
Cart class problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Cart class problem (/showthread.php?tid=47589) |
Cart class problem - El Forum - 12-14-2011 [eluser]Perkin5[/eluser] i am designing a website with a shopping cart and it works perfectly on my wamp server locally. Unfortunately it throws an error when uploaded onto an online server. Fatal error: Call to undefined method CI_Cart::total_quantity() etc You can see the error if you go to: http://www.historystore.co.uk/new/shop/ephemera and click Add to Cart for any item. The session cookie is definitely created and seems to be fine but the error goes if I delete the cookie. The database seems to be fine as the test items on the page are all generated from a model query. Add to Cart links to a method called add which looks like this: Code: function add() { The actual error is thown by the telltale cart panel in the page header and the code looks like this: Code: <?php if ($cart = $this->cart->contents()): ?> total_quantity() is my own method to deliver the total number of items allowing for multiple quantities. Like I say, it all works fine locally. I would be very grateful if amyone could suggest where it might be going wrong online. |