// Context part 27

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7812 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-29 14:29:57 +00:00
parent 35748d1b8f
commit 5d090a25b3
66 changed files with 532 additions and 813 deletions
+4 -11
View File
@@ -36,8 +36,6 @@ class Envoimoinscher extends Module
const INSTALL_SQL_FILE = 'install.sql';
function __construct()
{
global $cookie;
$this->name = 'envoimoinscher';
$this->tab = 'shipping_logistics';
$this->version = '1.0';
@@ -81,8 +79,6 @@ class Envoimoinscher extends Module
*/
public function install()
{
global $cookie;
if (!file_exists(dirname(__FILE__).'/'.self::INSTALL_SQL_FILE))
return false;
elseif (!$sql = file_get_contents(dirname(__FILE__).'/'.self::INSTALL_SQL_FILE))
@@ -121,8 +117,6 @@ class Envoimoinscher extends Module
*/
public function uninstall()
{
global $cookie;
Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'envoimoinscher_contenu`');
$tab = new Tab(Tab::getIdFromClassName('AdminEnvoiMoinsCher'));
@@ -158,12 +152,11 @@ class Envoimoinscher extends Module
private function _displayForm()
{
global $cookie;
$genderTab = array(1 => 'M.', 2 => 'Mme', 9 => '', 0 => '');
$features = Feature::getFeatures($cookie->id_lang);
$order_states = OrderState::getOrderStates($cookie->id_lang);
$carriers = Carrier::getCarriers($cookie->id_lang);
$countries = Country::getCountries($cookie->id_lang);
$features = Feature::getFeatures($this->context->language->id);
$order_states = OrderState::getOrderStates($this->context->language->id);
$carriers = Carrier::getCarriers($this->context->language->id);
$countries = Country::getCountries($this->context->language->id);
$confs = Configuration::getMultiple(array('PS_SHOP_NAME', 'EMC_LOGIN', 'EMC_GENDER', 'EMC_LAST_NAME', 'EMC_FIRST_NAME', 'EMC_ADDRESS', 'EMC_ZIP_CODE', 'EMC_CITY', 'EMC_COUNTRY',
'EMC_PHONE', 'EMC_EMAIL'));
$link = '<a href="http://www.envoimoinscher.com/inscription.html?tracking=prestashop_module_v1
+3 -5
View File
@@ -28,8 +28,6 @@
include('../../config/config.inc.php');
include('../../init.php');
global $cookie;
$validReturn = array('infoexterne', 'token', 'etat', 'envoi');
$return = array();
@@ -56,7 +54,7 @@ if (isset($return['infoexterne']) AND isset($return['token']) AND isset($return[
$history = new OrderHistory();
$history->id_order = (int)($id_order);
$history->changeIdOrderState((int)($confs['EMC_ORDER_PAST_STATE']), (int)($history->id_order));
$history->id_employee = (int)($cookie->id_employee);
$history->id_employee = (int)$this->context->employee->id;
$history->addWithemail();
$db = Db::getInstance();
@@ -77,7 +75,7 @@ if (isset($return['infoexterne']) AND isset($return['token']) AND isset($return[
$history = new OrderHistory();
$history->id_order = (int)($id_order);
$history->changeIdOrderState((int)($confs['EMC_SEND_STATE']), (int)($history->id_order));
$history->id_employee = (int)($cookie->id_employee);
$history->id_employee = (int)$this->context->employee->id;
$history->addWithemail();
break;
// Cancel
@@ -94,7 +92,7 @@ if (isset($return['infoexterne']) AND isset($return['token']) AND isset($return[
$history = new OrderHistory();
$history->id_order = (int)($id_order);
$history->changeIdOrderState((int)($confs['EMC_DELIVERY_STATE']), (int)($history->id_order));
$history->id_employee = (int)($cookie->id_employee);
$history->id_employee = (int)$this->context->employee->id;
$history->addWithemail();
break;
}