Вопрос

Hello as it's written in F3 documentation here : http://fatfreeframework.com/basket#load you can get all the results of the basket like this

$result = $basket->find(); // array of basket items, if any

But when I tried it I get the following error :

`Internal Server Error

Missing argument 1 for Basket::find(), called in /var/www/***/controller.php on line 55 and defined

Any suggestions?

Это было полезно?

Решение

This was fixed some days ago: https://github.com/bcosca/fatfree/commit/c16332c7cc2d24ed2e98e3654e182211e6e09db5

Fetch the nightly build and try again ;)

Другие советы

@ikkez I added this function inside lib/basket.php in order to return the item of the cart by id

function findById($cartID){
    $out=array();
    foreach($_SESSION[$this->key] as $id=>$item){
        if($id==$cartID){
          return $item;
        }

    }
}

Hope it will help somebody..

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top