under advice i've use grid methode build cart.
[1]*: http://i.stack.imgur.com/wgkli.png
$grid = $this->add('grid',null,'panier'); $grid->set('show_header',false); // ->don't work comment line grid/basic.php $grid->setmodel('model_command',array('product', 'qty','price','totalprice')); $grid->addtotals(array('totalprice')); $totcart = $this->add('text',null,'totalcart')->set($cart->gettotal($cartid)); grid/basic.php :
if(false) // no header *afmod* $header->appendhtml('cols',$header_col->render()); my objectives :
- don't want print first line (blue arrow)
- a better way don't print header of table, have other grid want header on them.
a way improve printing of rows ex: sandwish 2 x 4.11 = 8.22 € (maybe using template don't work)
$grid->addcolumn('template', 'test', false) ->settemplate(????);
a way reload $totcart $grid :
if($_get['add_product']){ $cart->addproduct($_get['add_product'],$client->get('current_cart_id'),$clientid); $grid->js()->reload()->execute(); $totcart ->js()->reload()->execute(); }
Comments
Post a Comment