partial #4370
This commit is contained in:
parent
88d7783b09
commit
8022f9e579
@ -14,7 +14,8 @@ class Controller_api_config extends Crunchbutton_Controller_Rest {
|
||||
if( $payment_type->using_pex ){
|
||||
$user[ 'using_pex' ] = true;
|
||||
}
|
||||
$user[ 'using_pex' ] = true;
|
||||
|
||||
// $user[ 'using_pex' ] = true;
|
||||
|
||||
|
||||
$config = [
|
||||
|
||||
@ -48,7 +48,7 @@ class Crunchbutton_App extends Cana_App {
|
||||
if (getenv('TRAVIS')) {
|
||||
$db = 'travis';
|
||||
// anything local
|
||||
} elseif (preg_match('/localhost$|^(crunch|cockpit|cockpitla).dev$|^dev.(pit|la|crunch)$/',$_SERVER['SERVER_NAME'])) {
|
||||
} elseif (preg_match('/localhost$|^(crunch|cockpit|cockpitla).dev$|^dev.(pit|la|crunch|seven)$/',$_SERVER['SERVER_NAME'])) {
|
||||
$db = 'local';
|
||||
// any one of our cull live urls, or staging prefixes
|
||||
} elseif (preg_match('/^cockpit.la|cbtn.io|_DOMAIN_|cockpit._DOMAIN_|spicywithdelivery.com|(staging[0-9]?.(cockpit.la|crunchr.co))$/',$_SERVER['SERVER_NAME'])) {
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
*/ ?>
|
||||
|
||||
<div ng-show="restaurant">
|
||||
|
||||
<div class="giftcard-badge-container" ng-show="credit.hasValue">
|
||||
<div class="giftcard-badge">
|
||||
<div ng-click="credit.tooltip=!credit.tooltip" class="giftcard-badge-value">${{credit.value}}</div>
|
||||
|
||||
@ -145,7 +145,7 @@
|
||||
|
||||
<ul class="resturant-dishes resturant-dish-container" date-id_category="{{category.id_category}}">
|
||||
<li ng-bind-once ng-repeat="dish in category.dishes()" class="dish-item" data-id_dish="{{dish.id_dish}}" add-to-cart>
|
||||
<span class="dish-item-name"><i class="fa fa-star" ng-if="dish.top"></i> {{dish.name}}</span><span class="dish-item-price">(${{dish.price}}<span ng-if="dish.changeable_price">+</span>)</span><br />
|
||||
<span class="dish-item-name"><i class="fa fa-star" ng-if="dish.top"></i> {{dish.name}}</span><span class="dish-item-price">({{AB.dollar}}{{dish.price}}<span ng-if="dish.changeable_price">+</span>)</span><br />
|
||||
<span class="dish-item-description">{{dish.description}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
@ -164,7 +164,7 @@
|
||||
<div ng-repeat="category in restaurant.categories()">
|
||||
<ul class="resturant-dishes resturant-dish-container" date-id_category="{{category.id_category}}">
|
||||
<li ng-repeat="dish in category.dishes() | filter: {top: 1}" class="dish-item" data-id_dish="{{dish.id_dish}}" add-to-cart>
|
||||
<span class="dish-item-name">{{dish.name}}</span><span class="dish-item-price">(${{dish.price}}<span ng-show="dish.changeable_price">+</span>)</span><br />
|
||||
<span class="dish-item-name">{{dish.name}}</span><span class="dish-item-price">({{AB.dollar}}{{dish.price}}<span ng-show="dish.changeable_price">+</span>)</span><br />
|
||||
<span class="dish-item-description">{{dish.description}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
@ -255,14 +255,14 @@
|
||||
</div>
|
||||
|
||||
<div ng-if="giftcard.hasValue && order.form.pay_type == 'cash' ">
|
||||
Pay with a card, NOT CASH, to use your ${{giftcard.value}} gift card!</span>
|
||||
Pay with a card, NOT CASH, to use your {{AB.dollar}}{{giftcard.value}} gift card!</span>
|
||||
</div>
|
||||
|
||||
<div ng-if="restaurant.giftcard == 1 && order.form.pay_type == 'card' ">
|
||||
<!-- Gift card success -->
|
||||
<div ng-repeat="success in giftcard.giftcards.success">
|
||||
<div ng-show="!success.error">
|
||||
Congrats! This gift card ({{success.giftcard}}) gives you ${{success.value}}.
|
||||
Congrats! This gift card ({{success.giftcard}}) gives you {{AB.dollar}}{{success.value}}.
|
||||
</div>
|
||||
<div ng-show="success.error == 'other restaurant'">
|
||||
The gift card ({{success.giftcard}}) you are trying to use belongs to another restaurant.
|
||||
@ -410,11 +410,11 @@
|
||||
<div class="payment-wrap">
|
||||
<div class="payment-ribbon" ng-class="{'backface':!isIOs}">
|
||||
<div class="payment-ribbon-content">
|
||||
<span class="restaurant-payment-item">Subtotal: <span ng-show="order.form.pay_type=='cash'">~</span>${{order.info.subtotal}}</span>
|
||||
<span class="restaurant-payment-item">Tax: ${{order.info.taxes}}</span>
|
||||
<span class="restaurant-payment-item" ng-show="order.form.pay_type!='cash' && order.info.tip!='0.00'">Tip: ${{order.info.tip}}</span>
|
||||
<span class="restaurant-payment-item" ng-show="order.info.delivery!='0.00'">Delivery Fee: ${{order.info.delivery}}</span>
|
||||
<span class="restaurant-payment-item" ng-show="order.info.fee!='0.00'">Service Fee: ${{order.info.fee}}</span>
|
||||
<span class="restaurant-payment-item">Subtotal: <span ng-show="order.form.pay_type=='cash'">~</span>{{AB.dollar}}{{order.info.subtotal}}</span>
|
||||
<span class="restaurant-payment-item">Tax: {{AB.dollar}}{{order.info.taxes}}</span>
|
||||
<span class="restaurant-payment-item" ng-show="order.form.pay_type!='cash' && order.info.tip!='0.00'">Tip: {{AB.dollar}}{{order.info.tip}}</span>
|
||||
<span class="restaurant-payment-item" ng-show="order.info.delivery!='0.00'">Delivery Fee: {{AB.dollar}}{{order.info.delivery}}</span>
|
||||
<span class="restaurant-payment-item" ng-show="order.info.fee!='0.00'">Service Fee: {{AB.dollar}}{{order.info.fee}}</span>
|
||||
<span class="restaurant-payment-item" ng-show="credit.hasValue && order.form.pay_type == 'card'">Credit: -$
|
||||
<span ng-show="order.total() <= credit.number">{{order.info.total}}</span>
|
||||
<span ng-show="order.total() > credit.number">{{credit.value}}</span>
|
||||
@ -428,7 +428,7 @@
|
||||
<div class="divider"></div>
|
||||
|
||||
<div ng-if="credit.hasValue && order.form.pay_type == 'cash' && order.total() >= credit.number">
|
||||
<div class="giftcard-payment-message">Pay with a card, NOT CASH, to use your ${{credit.value}} gift card</div>
|
||||
<div class="giftcard-payment-message">Pay with a card, NOT CASH, to use your {{AB.dollar}}{{credit.value}} gift card</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ App.AB = {
|
||||
},
|
||||
{
|
||||
name: 'tagline-no-free',
|
||||
tagline: 'Order the top food %s. <br /> After you order, everything is saved for future 1 click ordering. <br /><strong>Choose a restaurant:</strong>'
|
||||
tagline: 'Order the top food %s. <br /> After you order, everything is saved for future 1 click ordering. <br /><strong>Choose a restaurant:</strong>'
|
||||
}
|
||||
],
|
||||
slogan: [
|
||||
@ -52,7 +52,7 @@ App.AB = {
|
||||
],
|
||||
dollarSign: [
|
||||
{
|
||||
name : 'show'
|
||||
name : 'hide'
|
||||
},
|
||||
{
|
||||
name : 'hide'
|
||||
@ -68,7 +68,7 @@ App.AB = {
|
||||
if (clear) {
|
||||
App.config.ab = {};
|
||||
}
|
||||
|
||||
|
||||
// Creates the ab object case it don't exist
|
||||
if( App.config && !App.config.ab ){
|
||||
App.config.ab = {};
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// CartService service
|
||||
NGApp.factory('CartService', function () {
|
||||
|
||||
|
||||
var service = {
|
||||
restaurants : {},
|
||||
id_restaurant : null
|
||||
@ -43,7 +43,7 @@ NGApp.factory('CartService', function () {
|
||||
dish = App.cache('Dish', item);
|
||||
dish_options = dish.options(),
|
||||
options = [];
|
||||
|
||||
|
||||
var expanded = true;
|
||||
if (arguments[1]) {
|
||||
options = arguments[1].options;
|
||||
@ -81,7 +81,7 @@ NGApp.factory('CartService', function () {
|
||||
service.restaurants[ service.id_restaurant ].items[id] = {
|
||||
id: item,
|
||||
options: options,
|
||||
|
||||
|
||||
/* Template viewer stuff */
|
||||
details: {
|
||||
id: id,
|
||||
@ -166,7 +166,7 @@ NGApp.factory('CartService', function () {
|
||||
}
|
||||
service.customizeItemPrice = function (price, force) {
|
||||
if (price != '0.00' || force) {
|
||||
return ' (' + ((price < 0) ? 'minus $' : '+ $') + parseFloat(Math.abs(price)).toFixed(2) + ')';
|
||||
return ' (' + ((price < 0) ? 'minus $' : '+ ') + parseFloat(Math.abs(price)).toFixed(2) + ')';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@ -230,7 +230,7 @@ NGApp.factory('CartService', function () {
|
||||
for (var x in service.restaurants[ service.id_restaurant ].items) {
|
||||
total += parseFloat(App.cached['Dish'][service.restaurants[ service.id_restaurant ].items[x].id].price);
|
||||
if( App.cached['Dish'][service.restaurants[ service.id_restaurant ].items[x].id].markup ){
|
||||
total -= parseFloat(App.cached['Dish'][service.restaurants[ service.id_restaurant ].items[x].id].markup);
|
||||
total -= parseFloat(App.cached['Dish'][service.restaurants[ service.id_restaurant ].items[x].id].markup);
|
||||
}
|
||||
options = service.restaurants[ service.id_restaurant ].items[x].options;
|
||||
for (var xx in options) {
|
||||
|
||||
@ -56,9 +56,10 @@ NGApp.factory( 'OrderService', function ($http, $location, $rootScope, $filter,
|
||||
}
|
||||
|
||||
service.init = function () {
|
||||
if (App.config.ab && App.config.ab.dollarSign == 'show') {
|
||||
service.info.dollarSign = '$';
|
||||
}
|
||||
// remove $ signs from prices #4370
|
||||
// if (App.config.ab && App.config.ab.dollarSign == 'show') {
|
||||
// service.info.dollarSign = '$';
|
||||
// }
|
||||
// Tip stuff
|
||||
if (service.account.user && service.account.user.last_tip) {
|
||||
var tip = service.account.user.last_tip;
|
||||
@ -876,7 +877,6 @@ console.log('order',order);
|
||||
autotipValue = autotipValue.toFixed( 2 );
|
||||
}
|
||||
}
|
||||
console.log('autotipValue',autotipValue);
|
||||
service.form.autotip = autotipValue;
|
||||
}
|
||||
service._autotipText = function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user