diff --git a/include/views/default/crunchbutton/frontend/orders.phtml b/include/views/default/crunchbutton/frontend/orders.phtml index 20732e29c..b8474de77 100644 --- a/include/views/default/crunchbutton/frontend/orders.phtml +++ b/include/views/default/crunchbutton/frontend/orders.phtml @@ -45,7 +45,7 @@

You are {{account.user.points.away_free_delivery}} points away from a free delivery.
Earn points by ordering food, sharing your order, or referring friends.
- Get your friends to enter your code {{account.user.invite_code}} in the Notes section of their first order, and they will get $3 off and you a delivery free ;) + Get your friends to enter your code {{referral.invite_code}} in the Notes section of their first order, and you'll both get a free delivery ;)

diff --git a/include/views/default/seven/frontend/free-food.phtml b/include/views/default/seven/frontend/free-food.phtml index 63e60404c..d71ba7d7c 100644 --- a/include/views/default/seven/frontend/free-food.phtml +++ b/include/views/default/seven/frontend/free-food.phtml @@ -5,9 +5,9 @@
-
+

- Get your friends to enter your referral code in the Notes section of their first order, and they will get $3 off and you a delivery free ;) + Get your friends to enter your referral code in the Notes section of their first order, and you'll both get a free delivery ;)


@@ -17,7 +17,7 @@
- @@ -39,7 +39,7 @@


-

Your code: {{account.user.invite_code}}

+

Your code: {{referral.invite_code}}


Invite URL:

diff --git a/include/views/default/seven/frontend/orders.phtml b/include/views/default/seven/frontend/orders.phtml index 26cef3968..9bd119f9f 100644 --- a/include/views/default/seven/frontend/orders.phtml +++ b/include/views/default/seven/frontend/orders.phtml @@ -17,20 +17,32 @@
-
+

- Get your friends to enter your referral code in the Notes section of their first order, and they will get $3 off and you a delivery free ;) + Get your friends to enter your referral code in the Notes section of their first order, and you'll both get a free delivery ;)



+ + +
- + + + + +

+

Your code: {{referral.invite_code}}

+
+
+

Invite URL:

+
@@ -49,7 +61,7 @@


-

Your code: {{account.user.invite_code}}

+

Your code: {{referral.invite_code}}


Invite URL:

diff --git a/www/assets/js/controllers.js b/www/assets/js/controllers.js index 25c1dd8fb..1d607dd15 100644 --- a/www/assets/js/controllers.js +++ b/www/assets/js/controllers.js @@ -1401,6 +1401,8 @@ NGApp.controller('OrdersCtrl', function ($timeout, $scope, $http, $location, Acc ReferralService.getInviteCode(); } + ReferralService.getStatus(); + $scope.account = AccountService; // Alias to method AccountSignOut.do() @@ -1432,24 +1434,21 @@ NGApp.controller('OrdersCtrl', function ($timeout, $scope, $http, $location, Acc value : ReferralService.value, limit : ReferralService.limit, invites : ReferralService.invites, - enabled : ReferralService.enabled + enabled : ReferralService.enabled, + invite_code: ReferralService.invite_code } $scope.referral.cleaned_url = function(){ return ReferralService.cleaned_url(); } - // Load the invite_url - if( !ReferralService.invite_url ){ - ReferralService.getStatus(); - } - $scope.$on( 'referralStatusLoaded', function(e, data) { $scope.referral.invites = ReferralService.invites; $scope.referral.limit = ReferralService.limit; $scope.referral.invite_url = ReferralService.invite_url; $scope.referral.value = ReferralService.value; $scope.referral.enabled = ReferralService.enabled; + $scope.referral.invite_code = ReferralService.invite_code; $scope.referral.sms = ReferralService.sms(); });