VQCache文件中的OpenCart PHP错误

时间:2014-04-29 18:59:03

标签: php opencart vqmod

我们刚刚开始重新设计在OpenCart上运行的客户的电子商务网站。我们正在尝试追踪我们在错误日志中看到的错误,但到目前为止我们一直在逃避:

PHP注意:未定义索引:路线在... / vqmod / vqcache / vq2-catalog_view_theme_margaretha_template_common_header.tpl第360行

该行的代码是:

<?php if ($this->request->get['route'] != 'common/home') { ?>
  <div id="free-shipping">
    <p>Free shipping on all orders!</p>
  </div>
<?php } ?>

我不确定为什么这会引发错误。有什么想法吗?

1 个答案:

答案 0 :(得分:1)

更改您的if条件,如下所示:

<?php if (isset($this->request->get['route']) && $this->request->get['route'] != 'common/home') { ?>
    <div id="free-shipping">
        <p>Free shipping on all orders!</p>
    </div>
<?php } ?>

代码可能位于您的主题文件夹common/header.tpl或某些vqmod xml文件中(编辑文件/vqmod/vqcache/vq2-catalog_view_theme_margaretha_template_common_header.tpl无法进行任何更改)。

度过美好的一天!!