From 53946880d9110c76296ca4edb417d3be6103ce3e Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Wed, 22 Mar 2017 17:00:37 +0100 Subject: [PATCH] opening to es version --- modules/loyalty/loyalty-program.php | 22 +++++++++++----------- modules/loyalty/loyalty.php | 24 ++++++++++++------------ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/modules/loyalty/loyalty-program.php b/modules/loyalty/loyalty-program.php index a980ef26..6aea1b64 100755 --- a/modules/loyalty/loyalty-program.php +++ b/modules/loyalty/loyalty-program.php @@ -1,6 +1,6 @@ isLogged()) // ANTADIS si espagne redirect global $site_version; -if ($cookie->id_lang == 3 || $site_version == 'es') { - Tools::redirect('my-account.php'); -} +// if ($cookie->id_lang == 3 || $site_version == 'es') { +// Tools::redirect('my-account.php'); +// } Tools::addCSS(_PS_CSS_DIR_.'jquery.cluetip.css', 'all'); Tools::addJS(array(_PS_JS_DIR_.'jquery/jquery.dimensions.js',_PS_JS_DIR_.'jquery/jquery.cluetip.js')); @@ -88,21 +88,21 @@ if (Tools::getValue('transform-points') == 'true' AND $total_discount > 0) $voucher->cumulable = 1; $voucher->cumulable_reduction = 1; $voucher->cart_display = 1; - - - /* If merchandise returns are allowed, the voucher musn't be usable before this max return date */ + + + /* If merchandise returns are allowed, the voucher musn't be usable before this max return date */ $dateFrom = Db::getInstance()->getValue(' SELECT UNIX_TIMESTAMP(date_add) n - FROM '._DB_PREFIX_.'loyalty + FROM '._DB_PREFIX_.'loyalty WHERE id_discount = 0 AND id_customer = '.(int)$cookie->id_customer.' ORDER BY date_add DESC'); - + if (Configuration::get('PS_ORDER_RETURN')) $dateFrom += 60 * 60 * 24 * (int)Configuration::get('PS_ORDER_RETURN_NB_DAYS'); $voucher->date_from = date('Y-m-d H:i:s', $dateFrom); $voucher->date_to = date('Y-m-d H:i:s', $dateFrom + 31536000); // + 1 year - + $voucher->minimal = (float)Configuration::get('PS_LOYALTY_MINIMAL'); $voucher->active = 1; @@ -115,7 +115,7 @@ if (Tools::getValue('transform-points') == 'true' AND $total_discount > 0) $languages = Language::getLanguages(true); $default_text = Configuration::get('PS_LOYALTY_VOUCHER_DETAILS', (int)(Configuration::get('PS_LANG_DEFAULT'))); - + foreach ($languages AS $language) { $text = Configuration::get('PS_LOYALTY_VOUCHER_DETAILS', (int)($language['id_lang'])); diff --git a/modules/loyalty/loyalty.php b/modules/loyalty/loyalty.php index 4a997916..ac00f2b2 100755 --- a/modules/loyalty/loyalty.php +++ b/modules/loyalty/loyalty.php @@ -496,9 +496,9 @@ class Loyalty extends Module public function hookExtraRight($params) { global $site_version; - if ($site_version == 'es') { - return; - } + // if ($site_version == 'es') { + // return; + // } include_once(dirname(__FILE__).'/LoyaltyModule.php'); global $smarty; @@ -541,9 +541,9 @@ class Loyalty extends Module public function hookCustomerAccount($params) { global $site_version, $cookie; - if ($site_version == 'es' || $cookie->id_lang == 3) { - return; - } + // if ($site_version == 'es' || $cookie->id_lang == 3) { + // return; + // } return $this->display(__FILE__, 'my-account.tpl'); } @@ -598,9 +598,9 @@ class Loyalty extends Module public function hookShoppingCart($params) { global $site_version, $smarty; - if ($site_version == 'es') { - return; - } + // if ($site_version == 'es') { + // return; + // } include_once(dirname(__FILE__).'/LoyaltyModule.php'); if (Validate::isLoadedObject($params['cart'])) @@ -628,9 +628,9 @@ class Loyalty extends Module die(Tools::displayError('Missing parameters')); global $site_version; - if ($site_version == 'es' || (int)$params['order']->id_lang == 3) { - return true; - } + // if ($site_version == 'es' || (int)$params['order']->id_lang == 3) { + // return true; + // } $loyalty = new LoyaltyModule(); $loyalty->id_customer = (int)$params['customer']->id; $loyalty->id_order = (int)$params['order']->id;