1

i have a problem with fme layered navigation with the following errors i don't how this happened any body could help me please ?

Notice: Undefined variable: html in /var/www/html/app/code/local/FME/Layerednav/Block/Rewrite/RewriteCatalogCategoryView.php on line 18

https://znbaq.com/for-her/women-clothes/women-dress.html

enter image description here

  • 1
    provide code of that file – Gopal Patel Mar 28 '17 at 9:29
0

Well I have this extension installed in my one of the project, So replace your file code with below code

class FME_Layerednav_Block_Rewrite_RewriteCatalogCategoryView extends Mage_Catalog_Block_Category_View
{ 
    public function getProductListHtml()
    {
        $html = '';   
        $html = parent::getProductListHtml();
        if ($this->getCurrentCategory()->getIsAnchor()){
            $html = Mage::helper('layerednav')->wrapProducts($html);
        }
        return $html;
    }   
} 
| improve this answer | |
  • @maali if this answer solved your problem then mark as accepted, so other users who has same problem take benefit from that – Murtuza Zabuawala Mar 28 '17 at 9:42
0

Well this is just a notice. You got the two options.

  1. Ignore the error and Turn off the developer mode
  2. Debug the code and fix it

To fix it goto html in

/var/www/html/app/code/local/FME/Layerednav/Block/Rewrite/RewriteCatalogCategoryView.php

on line 18 and there will be a variable named $html . You will have to go through the code to check the usage of this variable. you may use isset() to remove this notice but make sure to check that it is not affecting the existing functionality of the site.

if(isset($html)){
 //code here
}

Or simply initialize the variable $html

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.