0

根据您的建议,我使用网格方法来构建我的购物车。

[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));

网格/基本.php:

if(false) // no header *AFMod*
$header->appendHTML('cols',$header_col->render());

我的目标:

  1. 不想打印第一行(蓝色箭头)
  2. 一种不打印表格标题的更好方法,我将有一些其他网格,我会想要它们的标题。
  3. 一种改进行打印的方法,例如: Sandwish 2 x 4.11 = 8.22 €(可能使用模板,但我无法使用)

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

  4. 一种使用 $grid 重新加载 $totCart 的方法:

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

0 回答 0