I just upgraded from 1.5.4. to 1.5.5.1 and now i am getting this error:
Undefined variable: filter_name in /home/content/74/7616274/html/digitaldept/test/catalog/view/theme/nenglilis/template/common/header.tpl on line 120
Anyone know how to fix this?
Undefined variable: filter_name in /home/content/74/7616274/html/digitaldept/test/catalog/view/theme/nenglilis/template/common/header.tpl on line 120
Anyone know how to fix this?
Hi Guys,
I have a fast solution for this problem and will take you just 3 minutes to solve it.
Use Notepad++ to open the following files:
/catalog/view/theme/YOUR_THEME/template/common/header.tpl
Find A:
Replace with help from the following file:
/catalog/view/theme/default/template/common/header.tpl
Replace Find A:
NEXT
/catalog/view/theme/YOUR_THEME/template/product/search.tpl
Find 1:
FInd 2:
Find 3:
Replace each code, one by one, with help from following file:
/catalog/view/theme/default/template/product/search.tpl
Replace Find 1:
Replace Find 2:
Replace Find 3:
That's all.
This was tested with a 1.5.4.X theme on 1.5.5.1 Opencart installation and it's working properly.
All the best.
I have a fast solution for this problem and will take you just 3 minutes to solve it.
Use Notepad++ to open the following files:
/catalog/view/theme/YOUR_THEME/template/common/header.tpl
Find A:
Code: Select all
<?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; ?>" onblur="if (this.value=='') this.value='<?php echo $text_search; ?>';" onfocus="if (this.value=='<?php echo $text_search; ?>') this.value='';">
<?php } ?>
/catalog/view/theme/default/template/common/header.tpl
Replace Find A:
Code: Select all
<input type="text" name="search" placeholder="<?php echo $text_search; ?>" value="<?php echo $search; ?>" />
/catalog/view/theme/YOUR_THEME/template/product/search.tpl
Find 1:
Code: Select all
<?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 $filter_name; ?>" onclick="this.value = '';" onkeydown="this.style.color = '000000'" style="color: #999;" />
<?php } ?>
Code: Select all
<?php if ($filter_sub_category) { ?>
<input type="checkbox" name="filter_sub_category" value="1" id="sub_category" checked="checked" />
<?php } else { ?>
<input type="checkbox" name="filter_sub_category" value="1" id="sub_category" />
<?php } ?>
<label for="sub_category"><?php echo $text_sub_category; ?></label>
Code: Select all
<?php if ($filter_description) { ?>
<input type="checkbox" name="filter_description" value="1" id="description" checked="checked" />
<?php } else { ?>
<input type="checkbox" name="filter_description" value="1" id="description" />
<?php } ?>
<label for="description"><?php echo $entry_description; ?></label>
/catalog/view/theme/default/template/product/search.tpl
Replace Find 1:
Code: Select all
<?php if ($search) { ?>
<input type="text" name="search" value="<?php echo $search; ?>" />
<?php } else { ?>
<input type="text" name="search" value="<?php echo $search; ?>" onclick="this.value = '';" onkeydown="this.style.color = '000000'" style="color: #999;" />
<?php } ?>
Code: Select all
<?php if ($sub_category) { ?>
<input type="checkbox" name="sub_category" value="1" id="sub_category" checked="checked" />
<?php } else { ?>
<input type="checkbox" name="sub_category" value="1" id="sub_category" />
<?php } ?>
<label for="sub_category"><?php echo $text_sub_category; ?></label>
Code: Select all
<?php if ($description) { ?>
<input type="checkbox" name="description" value="1" id="description" checked="checked" />
<?php } else { ?>
<input type="checkbox" name="description" value="1" id="description" />
<?php } ?>
<label for="description"><?php echo $entry_description; ?></label>
This was tested with a 1.5.4.X theme on 1.5.5.1 Opencart installation and it's working properly.
All the best.
SO I tried to follow your instructions and the code in the first file
/catalog/view/theme/YOUR_THEME/template/common/header.tpl
does not exist
But this does.
<?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 } ?>
Any suggestions before I wreck the whole thing lol
Regards Andy T
/catalog/view/theme/YOUR_THEME/template/common/header.tpl
does not exist
But this does.
<?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 } ?>
Any suggestions before I wreck the whole thing lol
Regards Andy T
Uraganu;
Thank you VERY much for this bit of insight to fix the Undefined variable: filter_name issue I was having with OneFreeTheme. Your suggestion for replacing the search reference code fixed me up!! Thanks you very much!
Bob
Thank you VERY much for this bit of insight to fix the Undefined variable: filter_name issue I was having with OneFreeTheme. Your suggestion for replacing the search reference code fixed me up!! Thanks you very much!
Bob
Who is online
Users browsing this forum: No registered users and 96 guests