diff --git a/controllers/admin/AdminHomeController.php b/controllers/admin/AdminHomeController.php index 0c11473de..e966bfd14 100644 --- a/controllers/admin/AdminHomeController.php +++ b/controllers/admin/AdminHomeController.php @@ -520,7 +520,7 @@ class AdminHomeControllerCore extends AdminController if (file_exists('../config/xml/preactivation.xml')) { $count = 0; - $preactivation = simplexml_load_file('../config/xml/preactivation.xml'); + $preactivation = @simplexml_load_file('../config/xml/preactivation.xml'); foreach ($preactivation->partner as $partner) { // Cache the logo @@ -543,8 +543,8 @@ class AdminHomeControllerCore extends AdminController $link = 'index.php?controller=adminmodules&install='.htmlentities((string)$partner->module).'&token='.Tools::getAdminTokenLite('AdminModules').'&module_name='.htmlentities((string)$partner->module).'&redirect=config'; $return .= '

- '.htmlentities((string)$partner->name).'
- '.htmlentities(utf8_decode((string)$label_final)).' + '.htmlentities((string)$partner->name).'
+ '.htmlentities(utf8_decode((string)$label_final)).'

'; $count++; @@ -552,11 +552,50 @@ class AdminHomeControllerCore extends AdminController } } if (!empty($return)) - $return .= '
'; + $return .= '
+ '; return $return; } + public function ajaxProcessSavePreactivationRequest() + { + $isoUser = Context::getContext()->language->iso_code; + $isoCountry = Context::getContext()->country->iso_code; + $employee = new Employee((int)Context::getContext()->cookie->id_employee); + $firstname = $employee->firstname; + $lastname = $employee->lastname; + $email = $employee->email; + $return = @file_get_contents('http://api.prestashop.com/partner/premium/set_request.php?iso_country='.strtoupper($isoCountry).'&iso_lang='.strtolower($isoUser).'&host='.urlencode($_SERVER['HTTP_HOST']).'&ps_version='._PS_VERSION_.'&ps_creation='._PS_CREATION_DATE_.'&partner='.htmlentities(Tools::getValue('module')).'&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).'&email='.urlencode($email).'&firstname='.urlencode($firstname).'&lastname='.urlencode($lastname).'&type=home'); + die($return); + } + public function getBlockDiscover() { $stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => AdminHomeController::TIPS_TIMEOUT)));