Post by digitaldept » Thu Jan 31, 2013 2:33 am

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?

New member

Posts

Joined
Fri Aug 31, 2012 12:12 pm
Location - Ohio

Post by anung » Thu Jan 31, 2013 3:33 am

This error related to your theme, because your theme not support OpenCart v.1.5.5.1, try ask the developer to update the theme.

User avatar
Active Member

Posts

Joined
Fri Mar 30, 2012 10:32 am
Location - Indonesia

Post by digitaldept » Thu Jan 31, 2013 4:20 am

Thanks anung! I just emailed them.

New member

Posts

Joined
Fri Aug 31, 2012 12:12 pm
Location - Ohio

Post by URAGANU » Sun Jun 09, 2013 8:23 am

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:

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 } ?>
Replace with help from the following file:
/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; ?>" />
NEXT

/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 } ?>
FInd 2:

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>
Find 3:

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>
Replace each code, one by one, with help from following file:
/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 } ?>
Replace Find 2:

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>
Replace Find 3:

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>
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.

Newbie

Posts

Joined
Tue Mar 27, 2012 6:45 am

Post by code7 » Mon Aug 12, 2013 11:27 pm

You magnificent man. I will create a shrine in your name.

Newbie

Posts

Joined
Mon Jul 15, 2013 7:56 pm

Post by ukracer » Wed Nov 06, 2013 11:30 pm

digitaldept wrote:Thanks anung! I just emailed them.
Web site is dead so I guess you had no reply!

Active Member

Posts

Joined
Wed Oct 03, 2012 6:36 am

Post by ukracer » Wed Nov 06, 2013 11:56 pm

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

Active Member

Posts

Joined
Wed Oct 03, 2012 6:36 am

Post by bjohnson187 » Sat Apr 19, 2014 10:09 pm

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

Newbie

Posts

Joined
Fri Feb 01, 2013 7:17 am

Post by amirmilad » Mon Jun 16, 2014 8:08 pm

Thank you so much for your efforts

Newbie

Posts

Joined
Mon Jun 16, 2014 8:08 pm
Who is online

Users browsing this forum: No registered users and 96 guests