2

on the line where the error apparently is the code looks like this:

<?php if ($filter_name) { ?>

I know this is probably a vague questions but if anyone can help that would be great!

4

4 回答 4

7

这是一个非常模糊的问题。很可能您会在 header.tpl 中收到此错误,因为您正在使用为 1.5.4.x(或更早版本)制作的主题和 1.5.5.x

in your catalog/view/theme/your_theme/template/common/header.tpl

寻找

<?php if ($filter_name) { ?>
    <input type="text" name="filter_name" value="<?php echo $filter_name; ?>" />
    <?php } else { ?>
    <input type="text" name="filter_name" value="<?php echo $text_search; ?>" onclick="this.value = '';" onkeydown="this.style.color = '#000000';" />
    <?php } ?>

用。。。来代替

<input type="text" name="search" placeholder="<?php echo $text_search; ?>" value="<?php echo $search; ?>" />

如果您在询问之前进行搜索,您会发现这个http://forum.opencart.com/viewtopic.php?f=20&t=97790

于 2013-04-09T08:26:57.243 回答
1
go to path : catalog/view/theme/your_theme/template/common/header.tpl
open the file header.tpl
search <?php if($filter_name) { ?>
replace above by <?php if(isset($filter_name)) { ?>
于 2013-06-28T07:04:05.997 回答
0

是的,这是一个版本缺陷,当你在 1.5.5 版本中使用 1.5.4 主题时很常见,但你可以使用上述方法轻松解决(如果出现一两个错误)。只需要修改这个文件:catalog/view/theme/your-theme/template/common/header.tpl,为了安全不要破解核心文件。

于 2013-04-24T03:18:53.807 回答
-1

https://github.com/justinmarsan/opencart-blank-theme/issues/7

这个链接真的帮助了我,

只需更换

这个:

<?php if ($filter_name) { ?>

有了这个:

<?php if (isset($filter_name)) { ?>
于 2013-11-05T10:44:05.957 回答