未定义变量(opencart) [英] Undefined variable (opencart)

查看:114
本文介绍了未定义变量(opencart)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显然是错误所在的代码行是这样的:

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!

推荐答案

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

This is very Vague question. most probably you would be getting this error in header.tpl because you are using theme made for 1.5.4.x ( or earlier) with 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

If you would have searched before asking you would have found this http://forum.opencart.com/viewtopic.php?f=20&t=97790

这篇关于未定义变量(opencart)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆