Skip to content

Commit

Permalink
resovle issue when room is added in order for deleted customer
Browse files Browse the repository at this point in the history
  • Loading branch information
shreesh-webkul committed Mar 2, 2023
1 parent 7f7122d commit f89c0a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion classes/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ public function getStats()
WHERE c.`id_customer` = '.(int)$this->id);

$result['last_visit'] = $result2['last_visit'];
$result['age'] = ($result3['age'] != date('Y') ? $result3['age'] : '--');
$result['age'] = (isset($result3['age']) && $result3['age'] != date('Y') ? $result3['age'] : '--');
return $result;
}

Expand Down
4 changes: 2 additions & 2 deletions controllers/admin/AdminOrdersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2708,7 +2708,7 @@ public function ajaxProcessAddProductOnOrder()
$objCartBookingData = new HotelCartBookingData();
$objCartBookingData->id_cart = $this->context->cart->id;
$objCartBookingData->id_guest = $this->context->cookie->id_guest;
$objCartBookingData->id_customer = $this->context->customer->id;
$objCartBookingData->id_customer = $order->id_customer;
$objCartBookingData->id_currency = $order->id_currency;
$objCartBookingData->id_product = $room_info['id_product'];
$objCartBookingData->id_room = $room_info['id_room'];
Expand Down Expand Up @@ -3036,7 +3036,7 @@ public function ajaxProcessAddProductOnOrder()
$objBookingDetail->id_cart = $this->context->cart->id;
$objBookingDetail->id_room = $objCartBookingData->id_room;
$objBookingDetail->id_hotel = $objCartBookingData->id_hotel;
$objBookingDetail->id_customer = $this->context->customer->id;
$objBookingDetail->id_customer = $order->id_customer;
$objBookingDetail->booking_type = $objCartBookingData->booking_type;
$objBookingDetail->id_status = 1;
$objBookingDetail->comment = $objCartBookingData->comment;
Expand Down

0 comments on commit f89c0a5

Please sign in to comment.