You can access the basket (hence its parameters) directly form the twig template, there is a global variable defined. (I think it is ``sonata_basket.basket`` but feel free to check.)