diff --git a/modules/blockuserinfo/blockuserinfo.php b/modules/blockuserinfo/blockuserinfo.php index fa7e204a..7d6171fc 100755 --- a/modules/blockuserinfo/blockuserinfo.php +++ b/modules/blockuserinfo/blockuserinfo.php @@ -74,6 +74,7 @@ class BlockUserInfo extends Module } $display_credits = false; + $loyalties = null; if ($this->disableCredits === false) { $display_credits = true; $sql = 'SELECT id_customer FROM `'._DB_PREFIX_.'customer_credits` WHERE id_customer = ' .(int) $cookie->id_customer; @@ -115,6 +116,7 @@ class BlockUserInfo extends Module global $smarty, $cookie, $cart; $display_credits = false; + $loyalties = null; if ($this->disableCredits === false) { $display_credits = true; if ($cookie->logged) { diff --git a/modules/invite/invite-program.php b/modules/invite/invite-program.php index 3b71f94f..08a04888 100644 --- a/modules/invite/invite-program.php +++ b/modules/invite/invite-program.php @@ -13,7 +13,7 @@ include(dirname(__FILE__).'/../../header.php'); $invite = new Invite(); -$activeTab = 'sponsor'; +$activeTab = 'credit'; $error = FALSE; $revive_sent = FALSE; $mails_exists = array(); @@ -241,6 +241,8 @@ if($oi_enable = Configuration::get('INVITE_OPENINVITER_ENABLE')) { $oi_services = $inviter->getPlugins(); } +$customer_credit = $invite->_get_credit((int) $cookie->id_customer, false, false, 'frontoffice'); + $smarty->assign(array( 'activeTab' => $activeTab, 'orderQuantity' => $orderQuantity, @@ -265,8 +267,8 @@ $smarty->assign(array( 'oi_enable' => $oi_enable, 'pendingFriends' => $invite->getPendingFriends($customer->id), 'subscribeFriends' => $invite->getFriends($customer->id), - 'currency' => $currency->sign, - + 'currency' => $currency->sign, + 'customer_credit' => $customer_credit, )); echo Module::display(dirname(__FILE__).'/invite.php', 'invite-program.tpl'); diff --git a/modules/invite/invite.php b/modules/invite/invite.php index 0b96d796..94f88379 100644 --- a/modules/invite/invite.php +++ b/modules/invite/invite.php @@ -1427,7 +1427,8 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor= return $result.'

'; } - private function _get_credit($id_customer=FALSE, $value=FALSE, $with_sign=FALSE, $mode=FALSE) { + public function _get_credit($id_customer=FALSE, $value=FALSE, $with_sign=FALSE, $mode=FALSE) + { $credit = Db::getInstance()->ExecuteS(' SELECT * FROM `'._DB_PREFIX_.'invite_credit` @@ -1946,7 +1947,8 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor= '); } - public function getFriends($id_customer=FALSE, $nb_limit) { + public function getFriends($id_customer = false, $nb_limit = false) + { if(!(int) $id_customer) { return array(); } diff --git a/modules/invite/shopping-cart-credit.tpl b/modules/invite/shopping-cart-credit.tpl index d0eb2cc3..9ee7f9ae 100755 --- a/modules/invite/shopping-cart-credit.tpl +++ b/modules/invite/shopping-cart-credit.tpl @@ -1,6 +1,9 @@
{*

{l s='Referral program:' mod='invite'}

*}

- {l s='Click here to use your credit' mod='invite'}

{$invite_credit[0]|string_format:'%.02f'} {$invite_credit[2]} {l s='will be deducted from your order total.' mod='invite'}

+ + {l s='Click here to use your credit' mod='invite'} +

{$invite_credit[0]|string_format:'%.02f'} {$invite_credit[2]} + {l s='will be deducted from your order total.' mod='invite'}

diff --git a/themes/site/modules/invite/invite-program.tpl b/themes/site/modules/invite/invite-program.tpl index dfc09751..6258869c 100755 --- a/themes/site/modules/invite/invite-program.tpl +++ b/themes/site/modules/invite/invite-program.tpl @@ -50,18 +50,22 @@
- {include file="tab1.tpl"} + {include file="tab-credit.tpl"}
- {include file="tab2.tpl"} + {include file="tab1.tpl"}
+ {include file="tab2.tpl"} +
+
{include file="tab3.tpl"}
diff --git a/themes/site/modules/invite/my-account.tpl b/themes/site/modules/invite/my-account.tpl index f01cc035..74a4989d 100755 --- a/themes/site/modules/invite/my-account.tpl +++ b/themes/site/modules/invite/my-account.tpl @@ -1 +1,4 @@ -
  • {l s='Referral program' mod='invite'}
  • +
  • + {l s='Referral program' mod='invite'} +
  • diff --git a/themes/site/modules/loyalty/my-account.tpl b/themes/site/modules/loyalty/my-account.tpl index 61673af8..5ade293e 100755 --- a/themes/site/modules/loyalty/my-account.tpl +++ b/themes/site/modules/loyalty/my-account.tpl @@ -1,3 +1,5 @@
  • - {l s='My loyalty points' mod='loyalty'} + {l s='My loyalty points' mod='loyalty'} +
  • \ No newline at end of file