Adding Cart id for order number

This commit is contained in:
adam.harbas@a-net.ba
2016-01-13 09:26:28 +01:00
parent 2f673c9877
commit 9e200ca910
7 changed files with 43 additions and 33 deletions

View File

@@ -26,6 +26,7 @@ var CheckoutPage = React.createClass({
disabled={!this.state.isDeliveryDestinationValid}
cashOnDeliveryDisabled={!this.state.isDeliveryDestinationValid || this.state.deliveryDestination.get('gift')}
onCashClick={this._onOrderClick}
cartId={this.state.cart.get('id')}
/>
</div>
);
@@ -33,13 +34,15 @@ var CheckoutPage = React.createClass({
var last_used_payment;
if(this.state.deliveryDestination.get('payment_method') == 'paypal') {
last_used_payment = (
<PaypalButton disabled={!this.state.isDeliveryDestinationValid} onSubmitPaypal={this._handleOnSubmitPaypal} deliveryDestination={this.state.deliveryDestination} amount={CartStore.getAmount()} deliveryCost={CartStore.getDeliveryCost(false)} />
<PaypalButton disabled={!this.state.isDeliveryDestinationValid} onSubmitPaypal={this._handleOnSubmitPaypal} deliveryDestination={this.state.deliveryDestination} amount={CartStore.getAmount()} deliveryCost={CartStore.getDeliveryCost(false)} cartId={this.state.cart.get('id')}/>
);
} else if(this.state.deliveryDestination.get('payment_method') == 'pikpay') {
<PikpayButton amount={CartStore.getAmount()} deliveryCost={CartStore.getDeliveryCost(false)} disabled={!this.state.isDeliveryDestinationValid} deliveryDestination={this.state.deliveryDestination}/>
last_used_payment = (
<PikpayButton amount={CartStore.getAmount()} deliveryCost={CartStore.getDeliveryCost(false)} disabled={!this.state.isDeliveryDestinationValid} deliveryDestination={this.state.deliveryDestination} cartId={this.state.cart.get('id')}/>
);
} else {
last_used_payment = (
<CashOnDeliveryButton onCashClick={this._onOrderClick} disabled={!this.state.isDeliveryDestinationValid || this.state.deliveryDestination.get('gift')}/>
<CashOnDeliveryButton onCashClick={this._onOrderClick} disabled={!this.state.isDeliveryDestinationValid || this.state.deliveryDestination.get('gift')} cartId={this.state.cart.get('id')}/>
);
}