Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorupupnaway


    I'm trying to create a shopping cart in Akelos. I'm pretty much learning as I'm going so things are a hodgepodge of code from RoR tutorials and PHP tutorials.

    The first thing I wanted to do was tie this cart to a session. If there exists a cart in this session, use it. If not create a new one. This is what I have so far:

    In controller:

    function findCart()
        if (isset($_SESSION['cart'])){
            $this->cart = unserialize($_SESSION['cart'];
        else {
            $this->cart = new Cart();

    Does this make sense? If it doesn't please don't laugh :D I've been following this RoR tutorial and have been doing good. Now the tutorial is beginning to use alot of Ruby specific syntax and it's throwing me for a loop. So expect a few more posts from me.


    • CommentAuthorKaste

    no problem with that, looks good.

    Everyone understands what this method should do, so go on.

    • CommentAuthortirood
    I have the same problem if some people can help us, it will very good for me