电子商务的atk4推车实施

Under your advice i've use the grid methode to build my cart.

[1]*: http://i.stack.imgur.com/wgkli.png

$grid = $this->add('Grid',null,'panier');
$grid->set('show_header',false); // ->don't work I comment a line into 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 to print the first line (blue arrow)
  2. A better way to don't print the header of the table, I will have some other grid an I will want the header on them.
  3. A way to improve the printing of my rows ex: Sandwish 2 x 4.11 = 8.22 € (maybe using template but I don't get it work)

    $grid->addColumn('template', 'test', false) ->setTemplate(????);

  4. A way to reload $totCart with $grid :

        if($_GET['Add_Product']){
        $Cart->addProduct($_GET['Add_Product'],$client->get('current_cart_id'),$clientID);
        $grid->js()->reload()->execute();
        $totCart ->js()->reload()->execute();
        }