Issue with Widget "Prestashop integration module"
-
Hi Francois,
I noticed an issue with the widget “Prestashop integration module”.
The php error :
Notice: Undefined property: PrestaShopIntegration::$hooks_names in prestashop-integration.php on line 427.I think it’s because $hook_name is static parameter, so I’ve change the function psHooksNames from:
function psHooksNames( $hook = null ) { if ( !$this->hooks_names ) $this->hooks_names = ( version_compare(_PS_VERSION_, '1.5', '>=') ? array( 'HOOK_TOP' => 'displayTop', 'HOOK_LEFT_COLUMN' => 'displayLeftColumn', 'HOOK_RIGHT_COLUMN' => 'displayRightColumn', 'HOOK_FOOTER' => 'displayFooter' ) : array( 'HOOK_TOP' => 'top', 'HOOK_LEFT_COLUMN' => 'leftColumn', 'HOOK_RIGHT_COLUMN' => 'rightColumn', 'HOOK_FOOTER' => 'footer' ) ); if ( $hook ) return $this->hooks_names[$hook]; else return $this->hooks_names; }
like that
function psHooksNames( $hook = null ) { if ( !self::$hooks_names ) self::$hooks_names = ( version_compare(_PS_VERSION_, '1.5', '>=') ? array( 'HOOK_TOP' => 'displayTop', 'HOOK_LEFT_COLUMN' => 'displayLeftColumn', 'HOOK_RIGHT_COLUMN' => 'displayRightColumn', 'HOOK_FOOTER' => 'displayFooter' ) : array( 'HOOK_TOP' => 'top', 'HOOK_LEFT_COLUMN' => 'leftColumn', 'HOOK_RIGHT_COLUMN' => 'rightColumn', 'HOOK_FOOTER' => 'footer' ) ); if ( $hook ) return self::$hooks_names[$hook]; else return self::$hooks_names; }
after that I have a warning because Module::hooExec() is deprecated in Prestashop 1.5.
So I’ve changed in prestashop-integration-module.php on line 45
Module::hookExec()
by
Hook::exec()
And voilà, it work.
https://www.ads-software.com/extend/plugins/prestashop-integration/
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Issue with Widget "Prestashop integration module"’ is closed to new replies.