v1.6-v1.7 Filter Products Pro - Advanced search of products Module

Buc0

Well-known member
Diamond
Elite
XNullUser
Joined
Apr 13, 2020
Messages
386
Reaction score
379
Points
63
NullCash
1,541
Version of module, please?
 

oicram

Member
XNullUser
Joined
Dec 8, 2020
Messages
178
Reaction score
0
Points
16
NullCash
18
thank you for sharing very nice
Post automatically merged:

OK, let's fix your problem with the nice way... personally, I would prefer the hard way, because I will have less to write, but I am in good mood today, so let's go...

1. make a copy from your smarty_internal_method_registerplugin.php and name it smarty_internal_method_registerplugin_ORIGINAL.php

2. open the smarty_internal_method_registerplugin.php with Notepad++ and at the end you will see this code

Code:
public function registerPlugin(
        Smarty_Internal_TemplateBase $obj,
        $type,
        $name,
        $callback,
        $cacheable = true,
        $cache_attr = null
    ) {
        $smarty = $obj->_getSmartyObj();
        if (isset($smarty->registered_plugins[ $type ][ $name ]))
       
        {
           /** throw new SmartyException*/("Plugin tag '{$name}' already registered");
        }

         elseif (!is_callable($callback)) {
        /**   throw new SmartyException */ ("Plugin '{$name}' not callable");
        } else {
            $smarty->registered_plugins[ $type ][ $name ] = array($callback, (bool)$cacheable, (array)$cache_attr);
        }
        return $obj;
   
    }
}

3. copy the code below and paste it in your file to replace all the block

Code:
 /**
public function registerPlugin(
        Smarty_Internal_TemplateBase $obj,
        $type,
        $name,
        $callback,
        $cacheable = true,
        $cache_attr = null
    )  * Registers plugin to be used in templates *{
        $smarty = $obj->_getSmartyObj();
        if (isset($smarty->registered_plugins[ $type ][ $name ])) {
            throw new SmartyException("Plugin tag '{$name}' already registered");
        } elseif (!is_callable($callback)) {
            throw new SmartyException("Plugin '{$name}' not callable");
        } else {
            $smarty->registered_plugins[ $type ][ $name ] = array($callback, (bool)$cacheable, (array)$cache_attr);
        }
        return $obj;
    }*/
}

4. pronounce the magic formula twice... in the case if you don't remember it, save your file and clear the Prestashop cache, that's will work too.

Now you can access to your BO (feel better, isn't? :whistle:) and uninstall your module "properly" via Prestashop

5. when it's done, rename the two files:
  • smarty_internal_method_registerplugin.php by smarty_internal_method_registerplugin_TWEAKED.php
  • smarty_internal_method_registerplugin_ORIGINAL.php by
Note: on this way, if the problem happend again, you just switch the name from the files to access in your BO, and uninstall the module properly.

If you need install the module again, feel free to do it, because it's a good one ;)



Hello Takio,
I did everything as you wrote above but I still can't solve it.
Error below.

Fatal error: Uncaught Error: Call to undefined method Smarty_Internal_Method_RegisterPlugin::registerPlugin() in /home/motorepa/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:277 Stack trace: #0 /home/motorepa/public_html/config/smarty.config.inc.php(125): Smarty_Internal_TemplateBase->registerPlugin('function', 'toolsConvertPri...', Array) #1 /home/motorepa/public_html/config/smartyadmin.config.inc.php(35): smartyRegisterFunction(Object(Smarty), 'function', 'toolsConvertPri...', 'toolsConvertPri...') #2 /home/motorepa/public_html/config/smarty.config.inc.php(57): require_once('/home/motorepa/...') #3 /home/motorepa/public_html/config/config.inc.php(202): require_once('/home/motorepa/...') #4 /home/motorepa/public_html/moto1700/index.php(40): require('/home/motorepa/...') #5 {main} thrown in /home/motorepa/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 277


please help me
 
Last edited:

sadsdf

Active member
XNullUser
Joined
Nov 24, 2019
Messages
1,243
Reaction score
4
Points
38
NullCash
227
thank you very much for sharing the module.
 
Top