addJqueryPlugin(array('easing', 'md5', 'fancybox')); // Garde tes customs (ajustés pour éviter doublons) if ($this->useMobileTheme()) { $this->setMobileMedia(); return true; } $this->addCSS(_THEME_CSS_DIR_.'grid_prestashop.css', 'all'); $this->addCSS(_THEME_CSS_DIR_.'global.css', 'all'); $this->addjquery(); $this->addJqueryPlugin('easing'); $this->addJS(_PS_JS_DIR_.'tools.js'); $this->addJS(_THEME_JS_DIR_.'global.js'); $this->addJS(_THEME_JS_DIR_.'masterscript.js'); // Footer map (Google Maps) - ton code original if (Module::isEnabled('roymap')) { $default_country = new Country((int)Configuration::get('PS_COUNTRY_DEFAULT')); if (Module::isEnabled('mpgooglemapsfix')) { $googleMapsJs = 'http'.((Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE')) ? 's' : '').'://maps.google.com/maps/api/js?region='.substr($default_country->iso_code, 0, 2); if (Configuration::get('MPGOOGLEMAPSFIX_API_KEY')) { $googleMapsJs .= '&key='.rawurlencode(Configuration::get('MPGOOGLEMAPSFIX_API_KEY')); } $this->addJS($googleMapsJs); } else { $this->addJS('http'.((Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE')) ? 's' : '').'://maps.google.com/maps/api/js?region='.substr($default_country->iso_code, 0, 2)); } $this->addJS(_THEME_JS_DIR_.'stores.js'); $this->context->smarty->assign('hasStoreIcon', file_exists(_PS_IMG_DIR_.Configuration::get('PS_STORES_ICON'))); $this->context->smarty->assign(array( 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), 'defaultLat' => (float)Configuration::get('PS_STORES_CENTER_LAT'), 'defaultLong' => (float)Configuration::get('PS_STORES_CENTER_LONG'), 'searchUrl' => $this->context->link->getPageLink('stores'), 'logo_store' => Configuration::get('PS_STORES_ICON') )); } // For account menu $this->context->smarty->assign(array( 'has_customer_an_address' => empty($has_address), 'voucherAllowed' => (int)CartRule::isFeatureActive(), 'returnAllowed' => (int)Configuration::get('PS_ORDER_RETURN') )); // Autoload JS/CSS from theme folders if (@filemtime($this->getThemeDir().'js/autoload/')) { foreach (scandir($this->getThemeDir().'js/autoload/', 0) as $file) { if (preg_match('/^[^.].*\.js$/', $file)) { $this->addJS($this->getThemeDir().'js/autoload/'.$file); } } } if (@filemtime($this->getThemeDir().'css/autoload/')) { foreach (scandir($this->getThemeDir().'css/autoload', 0) as $file) { if (preg_match('/^[^.].*\.css$/', $file)) { $this->addCSS($this->getThemeDir().'css/autoload/'.$file); } } } if (Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee'))) { $this->addJqueryUI('ui.sortable'); $this->addJqueryPlugin('fancybox'); $this->addJS(_PS_JS_DIR_.'hookLiveEdit.js'); } if (Configuration::get('PS_QUICK_VIEW')) { $this->addJqueryPlugin('fancybox'); } if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0) { $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); } // Hook Hook::exec('actionFrontControllerSetMedia', array()); } }