max216 Posted April 12, 2016 Share Posted April 12, 2016 Bonjour, je me lance à écrire sur le forum car je ne trouve pas de réponse via une recherche ici ou sur google. 1- Quel que soit le theme que j'installe autre que le theme de base, je n'ai pas le menu "configurateur de theme" ? 2- j'ai trouvé la manip pour modifier les images des carrousels, mais lorsque je clique sur "modules et services" j'ai une page blanche avec [PrestaShop] Fatal error in module file :/homepages/0/d620922640/htdocs/boutique/modules/fieldstaticfooter/models/Staticfooter.php:Cannot redeclare class Staticfooter J'ai installé prestashop il y a quelques jours sur un hébergement pro 1AND1, pas de soucis à l'installation, le reste que j'ai exploré fonctionne normalement. merci de votre aide ! Link to comment Share on other sites More sharing options...
max216 Posted April 12, 2016 Author Share Posted April 12, 2016 Bonjour, merci de ta réponse, je ne comprends pas ce que je dois faire. ci dessous le staticfooter.php y'a pas un ficher de config des modules quelque part pour désactiver ca ? ce ficher est lié a fieldstaticfooter.php un repertoire plus bas. merci encore <?php class Staticfooter extends ObjectModel { /** @var string Name */ public $description; public $title; public $hook_position; public $name_module; public $hook_module; public $position; public $active; public $insert_module; public $showhook; public $fieldorder; public $identify; /** * @see ObjectModel::$definition */ public static $definition = array( 'table' => 'field_staticfooter', 'multishop' => true, 'multilang' => TRUE, 'primary' => 'id_fieldstaticblock', 'fields' => array( 'fieldorder' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => false), 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), 'insert_module' => array('type' => self::TYPE_INT,'lang' => false), 'showhook' => array('type' => self::TYPE_INT,'lang' => false), 'identify' => array('type' => self::TYPE_STRING, 'lang' => false, 'validate' => 'isGenericName', 'required' => true, 'size' => 128), 'hook_position' => array('type' => self::TYPE_STRING, 'lang' => false, 'validate' => 'isGenericName', 'required' => false, 'size' => 128), 'name_module' => array('type' => self::TYPE_STRING, 'lang' => false, 'validate' => 'isGenericName', 'required' => false, 'size' => 128), 'hook_module' => array('type' => self::TYPE_STRING, 'lang' => false, 'validate' => 'isGenericName', 'required' => false, 'size' => 128), // Lang fields 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128), 'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'size' => 3999999999999), ), ); public function getStaticfooterLists($id_shop = NULL, $hook_position= 'top') { if (!Combination::isFeatureActive()) return array(); $id_lang = (int)Context::getContext()->language->id; $object = Db::getInstance()->executeS(' SELECT * FROM '._DB_PREFIX_.'field_staticfooter AS fsf LEFT JOIN '._DB_PREFIX_.'field_staticfooter_lang AS fsl ON fsf.id_fieldstaticblock = fsl.id_fieldstaticblock LEFT JOIN '._DB_PREFIX_.'field_staticfooter_shop AS fss ON fsf.id_fieldstaticblock = fss.id_fieldstaticblock WHERE id_shop ='.$id_shop.' AND id_lang ='.$id_lang.' AND `hook_position` = "'.$hook_position.'" AND `active` = 1 AND `showhook` = 1 ORDER BY `fieldorder` ASC '); $newObject = array(); if(count($newObject>0)) { foreach($object as $key=>$ob) { $nameModule = $ob['name_module']; $hookModule = $ob['hook_module']; $blockModule = $this->getModuleAssign($nameModule, $hookModule); $ob['block_module'] = $blockModule; $description = $ob['description']; $ob['description'] = $description; $newObject[$key] = $ob; } return $newObject; } return null; } public function getModuleAssign( $module_name = '', $name_hook = '' ){ //$module_id = 7 ; $id_hook = 21 ; if(!$module_name || !$name_hook) return ; $module = Module::getInstanceByName($module_name); $module_id = $module->id; $id_hook = Hook::getIdByName($name_hook); $hook_name = $name_hook; if(!$module) return ; $module_name = $module->name; if( Validate::isLoadedObject($module) && $module->id ){ $array = array(); $array['id_hook'] = $id_hook; $array['module'] = $module_name; $array['id_module'] = $module->id; if(_PS_VERSION_ < "1.5"){ return self::lofHookExec( $hook_name, array(), $module->id, $array ); }else{ $hook_name = substr($hook_name, 7, strlen($hook_name)); return self::renderModuleByHookV15( $hook_name, array(), $module->id, $array ); } } return ''; } public static function renderModuleByHook( $hook_name, $hookArgs = array(), $id_module = NULL, $array = array() ){ global $cart, $cookie; if(!$hook_name || !$id_module) return ; if ((!empty($id_module) AND !Validate::isUnsignedId($id_module)) OR !Validate::isHookName($hook_name)) die(Tools::displayError()); $live_edit = false; if (!isset($hookArgs['cookie']) OR !$hookArgs['cookie']) $hookArgs['cookie'] = $cookie; if (!isset($hookArgs['cart']) OR !$hookArgs['cart']) $hookArgs['cart'] = $cart; $hook_name = strtolower($hook_name); $altern = 0; if ($id_module AND $id_module != $array['id_module']) return; if (!($moduleInstance = Module::getInstanceByName($array['module']))) return; /* $exceptions = $moduleInstance->getExceptions((int)$array['id_hook'], (int)$array['id_module']); foreach ($exceptions AS $exception) if (strstr(basename($_SERVER['PHP_SELF']).'?'.$_SERVER['QUERY_STRING'], $exception['file_name']) && !strstr($_SERVER['QUERY_STRING'], $exception['file_name'])) return; */ if (is_callable(array($moduleInstance, 'hook'.$hook_name))) { $hookArgs['altern'] = ++$altern; $output = call_user_func(array($moduleInstance, 'hook'.$hook_name), $hookArgs); } return $output; } public static function renderModuleByHookV15( $hook_name, $hookArgs = array(), $id_module = NULL, $array = array() ){ global $cart, $cookie; if(!$hook_name || !$id_module) return ; if ((!empty($id_module) AND !Validate::isUnsignedId($id_module)) OR !Validate::isHookName($hook_name)) die(Tools::displayError()); if (!isset($hookArgs['cookie']) OR !$hookArgs['cookie']) $hookArgs['cookie'] = $cookie; if (!isset($hookArgs['cart']) OR !$hookArgs['cart']) $hookArgs['cart'] = $cart; if ($id_module AND $id_module != $array['id_module']) return ; if (!($moduleInstance = Module::getInstanceByName($array['module']))) return ; $retro_hook_name = Hook::getRetroHookName($hook_name); $hook_callable = is_callable(array($moduleInstance, 'hook'.$hook_name)); $hook_retro_callable = is_callable(array($moduleInstance, 'hook'.$retro_hook_name)); $output = ''; if (($hook_callable || $hook_retro_callable) && Module::preCall($moduleInstance->name)) { if ($hook_callable) $output = $moduleInstance->{'hook'.$hook_name}($hookArgs); else if ($hook_retro_callable) $output = $moduleInstance->{'hook'.$retro_hook_name}($hookArgs); } return $output; } } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now