使用vqmod我在header.tpl中注入此代码.
<?php if ($this->customer->isLogged()){ if($this->customer->getCustomerGroupId()!=1) { ?>
//show something
<?php } ?>
Run Code Online (Sandbox Code Playgroud)
它在opencart 1.5.6.1中运行良好但是现在我更新到2.0.3.1并且我收到此错误:
Notice: Undefined property: Loader::$customer in C:\UniServerZ\www\opencart-2.0.3.1\upload\vqmod\vqcache\vq2-catalog_view_theme_default_template_common_header.tpl
Run Code Online (Sandbox Code Playgroud)
有没有办法从2.0.3.1中的.tpl文件中引用$ this?
| 归档时间: |
|
| 查看次数: |
282 次 |
| 最近记录: |