php - atk4 cart implementation for e-commerce -


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 :

  1. don't want print first line (blue arrow)
  2. a better way don't print header of table, have other grid want header on them.
  3. 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(????);

  4. 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