Delivery cost depend on gift option

This commit is contained in:
adam.harbas@a-net.ba
2016-01-12 15:18:27 +01:00
parent 68c7a620ef
commit 54d7cdb04e
2 changed files with 11 additions and 10 deletions

View File

@@ -24,7 +24,7 @@ var CheckoutPage = React.createClass({
amount={CartStore.getAmount()}
deliveryCost={CartStore.getDeliveryCost(false)}
disabled={!this.state.isDeliveryDestinationValid}
cashOnDeliveryDisabled={!this.state.isDeliveryDestinationValid}
cashOnDeliveryDisabled={!this.state.isDeliveryDestinationValid || this.state.deliveryDestination.get('gift')}
onCashClick={this._onOrderClick}
/>
</div>
@@ -108,7 +108,7 @@ var CheckoutPage = React.createClass({
<label className="col-md-4 control-label" htmlFor="order"></label>
<div className="col-md-8">
<div> Roba: <CartTotal items={this.state.items} itemCounts={this.state.itemCounts} /><br />
<span className={this.state.deliveryDestinationErrors['place'] ? 'hidden' : 'shown'}>
<span className={this.state.deliveryDestinationErrors[this.state.deliveryCostsTarget] ? 'hidden' : 'shown'}>
Dostava: <CartTotal deliveryCosts={this.state.deliveryCosts} /><br />
Ukupno: <CartTotal items={this.state.items} itemCounts={this.state.itemCounts} deliveryCosts={this.state.deliveryCosts} />
</span>