remove go to payment page option for backdate order
This commit is contained in:
@@ -1179,7 +1179,12 @@
|
||||
$('#id_lang option').removeAttr('selected');
|
||||
$('#id_lang option[value="'+id_lang+'"]').attr('selected', true);
|
||||
$('#send_email_to_customer').attr('rel', jsonSummary.link_order);
|
||||
$('#go_order_process').attr('href', jsonSummary.link_order);
|
||||
if (!jsonSummary.is_backdate_order) {
|
||||
$('#go_order_process').show();
|
||||
$('#go_order_process').attr('href', jsonSummary.link_order);
|
||||
} else {
|
||||
$('#go_order_process').hide();
|
||||
}
|
||||
$('#order_message').val(jsonSummary.order_message);
|
||||
resetBind();
|
||||
}
|
||||
|
||||
@@ -844,6 +844,14 @@ class AdminCartsControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
$cart_detail_data_obj = new HotelCartBookingData();
|
||||
$cart_detail_data = $cart_detail_data_obj->getCartFormatedBookinInfoByIdCart((int) $id_cart);
|
||||
$is_backdate_order = false;
|
||||
foreach ($cart_detail_data as $cartRoom) {
|
||||
if (strtotime($cartRoom['date_from']) < strtotime(date('Y-m-d'))) {
|
||||
$is_backdate_order = true;
|
||||
}
|
||||
}
|
||||
$addresses = $this->context->customer->getAddresses((int)$this->context->cart->id_lang);
|
||||
|
||||
foreach ($addresses as &$data) {
|
||||
@@ -853,6 +861,8 @@ class AdminCartsControllerCore extends AdminController
|
||||
|
||||
return array(
|
||||
'summary' => $this->getCartSummary(),
|
||||
'cart_detail_data' => $cart_detail_data,
|
||||
'is_backdate_order' => $is_backdate_order,
|
||||
'delivery_option_list' => $this->getDeliveryOptionList(),
|
||||
'cart' => $this->context->cart,
|
||||
'currency' => new Currency($this->context->cart->id_currency),
|
||||
|
||||
Reference in New Issue
Block a user