Fix for cartLoad
This commit is contained in:
@@ -26,7 +26,7 @@ var CheckoutPage = React.createClass({
|
|||||||
disabled={!this.state.isDeliveryDestinationValid}
|
disabled={!this.state.isDeliveryDestinationValid}
|
||||||
cashOnDeliveryDisabled={!this.state.isDeliveryDestinationValid || this.state.deliveryDestination.get('gift')}
|
cashOnDeliveryDisabled={!this.state.isDeliveryDestinationValid || this.state.deliveryDestination.get('gift')}
|
||||||
onCashClick={this._onOrderClick}
|
onCashClick={this._onOrderClick}
|
||||||
cartId={this.state.cart.get('id')}
|
cartId={this.state.deliveryDestination.get('id')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ var DeliveryDestination = require('../models/deliveryDestination');
|
|||||||
var OrderConfirmation = require('../models/orderConfirmation');
|
var OrderConfirmation = require('../models/orderConfirmation');
|
||||||
var Place = require('../models/place');
|
var Place = require('../models/place');
|
||||||
var Validation = require('../utils/validation');
|
var Validation = require('../utils/validation');
|
||||||
var Cart = require('../models/cart');
|
|
||||||
|
|
||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
|
|
||||||
@@ -26,8 +25,6 @@ var _deliveryCosts = new Place({
|
|||||||
postalCode: _deliveryDestination.get('place')
|
postalCode: _deliveryDestination.get('place')
|
||||||
});
|
});
|
||||||
|
|
||||||
var _cart = new Cart();
|
|
||||||
|
|
||||||
var _addressColapsed = false;
|
var _addressColapsed = false;
|
||||||
|
|
||||||
var supportedPlaces = [{
|
var supportedPlaces = [{
|
||||||
@@ -2571,7 +2568,6 @@ var nameOfThePlace = function(code) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var loadCart = function() {
|
var loadCart = function() {
|
||||||
_cart.fetch({success: function() {
|
|
||||||
_itemsInCart.fetch({
|
_itemsInCart.fetch({
|
||||||
success: function() {
|
success: function() {
|
||||||
states = {}
|
states = {}
|
||||||
@@ -2595,7 +2591,6 @@ var loadCart = function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}});
|
|
||||||
|
|
||||||
_cartDataLoadCalled = true;
|
_cartDataLoadCalled = true;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user