Share with SMS contacts as only customer referral option on mobile #5092

This commit is contained in:
Pererinha 2015-04-06 16:00:48 -03:00
parent 56b5cca91c
commit eda4ec88d5
9 changed files with 19 additions and 14 deletions

View File

@ -392,7 +392,7 @@ class Controller_api_Giftcard extends Crunchbutton_Controller_Rest {
if( $reward->checkIfItIsEligibleForFirstTimeOrder() && $valid ){
$value = $reward->getReferredDiscountAmount();
if( $value ){
echo json_encode( [ 'success' => [ 'value' => $value, 'giftcard' => $code, 'message' => 'You have a $' . $value . ' gift card towards your first order.' ] ] );
echo json_encode( [ 'success' => [ 'value' => $value, 'giftcard' => $code, 'message' => 'You have a $' . $value . ' gift card for a free delivery.' ] ] );
exit;
}
}

View File

@ -28,7 +28,7 @@
</div>
<br />
<div>
<div ng-if="account.user.points.away_free_delivery > 0">
<p>
You are <b>{{account.user.points.away_free_delivery}}</b> points away from a free delivery!<br>
</p>

View File

@ -45,7 +45,7 @@
Congrats, you just got a <b>${{giftcard.value}}</b> gift card.
</div>
<br/>
Go ahead and order something delicious!
Go ahead and order some food!
</div>
<div class="bottom-links">
<span class="giftcard-later" ng-click="modal.close();">Great</span>

View File

@ -43,7 +43,7 @@
<br/><br/>
<p>
You are <b>{{account.user.points.away_free_delivery}}</b> points away from a free delivery.<br>
You are <b>{{account.user.points.away_free_delivery}}</b> points away from a <strong>free delivery</strong>.<br>
Earn points by ordering food, sharing your order, or referring friends.<br>
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 ;)
<br>

View File

@ -7,7 +7,7 @@
<div ng-show="account.user.invite_code">
<p>
Get your friends to enter <b>your referal code</b> in the Notes section of their first order, and they will get $3 off and you a delivery free ;)
Get your friends to enter <b>your referral code</b> in the Notes section of their first order, and they will get $3 off and you a delivery free ;)
</p><br/>
</div>

View File

@ -37,7 +37,12 @@
You just got a <b>${{giftcard.value}}</b> gift card to <b class="pointer" ng-click="giftcard.openRestaurant();">{{modal.restaurant.name}}</b>.
</span>
<span ng-show="!modal.restaurant">
You just got a <b>${{giftcard.value}}</b> gift card.
<div ng-if="giftcard.message">
{{giftcard.message}}
</div>
<div ng-if="!giftcard.message">
You just got a <b>${{giftcard.value}}</b> gift card.
</div>
</span>
&nbsp;Go ahead and order some food!

View File

@ -61,7 +61,7 @@
<br/>
<p class="delivery-free">
You just earned <strong>{{order.reward.points}}</strong> points!
<span></span>You are <strong>{{account.user.points.away_free_delivery}}</strong> points away from a free delivery.
<span ng-if="account.user.points.away_free_delivery > 0"> You are <strong>{{account.user.points.away_free_delivery}}</strong> points away from a free delivery.</span>
</p>
<br/><br/>
</div>
@ -77,7 +77,7 @@
<button class="button facebook button-refer" ng-click="referral.facebook();" ng-if="account.user.has_auth && !order.reward.shared.facebook">
<i class="fa fa-facebook-square"></i> <span>Share</span>
</button>
<button class="button twitter button-refer" ng-click="referral.twitter()" ng-if="account.user.has_auth && !order.reward.shared.twitter">
<i class="fa fa-twitter-square"></i> <span>Tweet</span>
</button>
@ -111,7 +111,7 @@
</div>
</div>
<div class="order-content">

View File

@ -7,7 +7,7 @@
<a id="credit"></a>
<div ng-show="!account.user.points.free_delivery_message && account.user.points.away_free_delivery">
<p><span class="delivery-free">You are <b>{{account.user.points.away_free_delivery || 0}}</b> points away</span> <br><br> from a free delivery. Earn points by ordering food, sharing your order, or referring friends.</p><br/>
<p><span class="delivery-free">You are <b>{{account.user.points.away_free_delivery || 0}}</b> points away from a <strong>free delivery</strong>. Earn points by ordering food, sharing your order, or referring friends.</span></p><br/>
</div>
<div ng-show="account.user.points.free_delivery_message && account.user.points.free_delivery">
<p><span class="delivery-free">You have <b>{{account.user.points.free_delivery}}</b> points!</span> <br><br>The next delivery fee is on us.</p>
@ -19,7 +19,7 @@
<div ng-show="account.user.invite_code" class="hide-mobile">
<p>
Get your friends to enter <b>your referal code</b> in the Notes section of their first order, and they will get $3 off and you a delivery free ;)
Get your friends to enter <b>your referral code</b> in the Notes section of their first order, and they will get $3 off and you a delivery free ;)
</p>
<br><br>
</div>

View File

@ -28,12 +28,12 @@ NGApp.factory( 'ReferralService', function( $http, $rootScope, $location, Accoun
}
service.sms = function(){
var text = 'i love crunchbutton delivery :) use my code ' + service.invite_code + ' in the Notes section and get $3 off your 1st order!';
var text = 'I love crunchbutton delivery :) use my code ' + service.invite_code + ' in the Notes section and get your first order delivered for free!';
if( App.iOS() ){
return 'sms:&body=' + text + ' ' + service.invite_url;
return 'sms:body=' + text + ' ' + service.invite_url;
} else {
// this appears to be the standard and should work for other non droid phones
return 'sms:?body=' + text + ' ' + service.invite_url;
return 'sms:body=' + text + ' ' + service.invite_url;
}
}