打开购物车 - 传递自定义变量

时间:2014-04-29 12:29:45

标签: php opencart

自定义控制器变量(付款模块)MVC-L型号

我添加了一个变量来在自定义付款模块中设置Iframe网址。 我已添加到controller.php但无法访问payment.tpl

有什么想法吗?

在OpenCart v1.5.6中,我插入了iframe,如下所示。 URL应该从Controller部分派生。

     <div class="content" id="payment">  <table class="form">
        <tr>
          <td>
          <iframe name="netbanx" src="<?php echo $amped; ?>" style="width:900px; height:550px;"></iframe>
</td>
        </tr>   </table> </div>

来自我的controller.php文件

$amped = $this->full_uri( $token, $action, $endpoint );

1 个答案:

答案 0 :(得分:0)

在你的控制器中它不是

$amped = $this->full_uri( $token, $action, $endpoint );

<强>但

$this->data['amped'] = $this->full_uri($token, $action, $endpoint);

变量$this->data(类型为array)用作变量持有者,然后用于将值分配到模板中的相应变量中。