Code refactor
This commit is contained in:
@@ -81,20 +81,18 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
|
||||
Guest::setNewGuest($this->context->cookie);
|
||||
}
|
||||
|
||||
$objCart = new Cart();
|
||||
$objCart->recyclable = 0;
|
||||
$objCart->gift = 0;
|
||||
$objCart->id_shop = (int) $this->context->shop->id;
|
||||
$objCart->id_lang = (($id_lang = (int) Tools::getValue('id_lang')) ? $id_lang : (int) Configuration::get('PS_LANG_DEFAULT'));
|
||||
$objCart->id_currency = (($id_currency = (int) Tools::getValue('id_currency')) ? $id_currency : (int) Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||
$objCart->id_address_delivery = 0;
|
||||
$objCart->id_address_invoice = 0;
|
||||
$objCart->id_currency = (int) Configuration::get('PS_CURRENCY_DEFAULT');
|
||||
$objCart->id_guest = (int) $this->context->cookie->id_guest;
|
||||
$objCart->setNoMultishipping();
|
||||
|
||||
$this->context->cart = $objCart;
|
||||
$this->context->cart = new Cart();
|
||||
$this->context->cart->gift = 0;
|
||||
$this->context->cart->id_shop = (int) $this->context->shop->id;
|
||||
$this->context->cart->id_lang = (($id_lang = (int) Tools::getValue('id_lang')) ? $id_lang : (int) Configuration::get('PS_LANG_DEFAULT'));
|
||||
$this->context->cart->id_currency = (($id_currency = (int) Tools::getValue('id_currency')) ? $id_currency : (int) Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||
$this->context->cart->id_address_delivery = 0;
|
||||
$this->context->cart->id_address_invoice = 0;
|
||||
$this->context->cart->id_currency = (int) Configuration::get('PS_CURRENCY_DEFAULT');
|
||||
$this->context->cart->id_guest = (int) $this->context->cookie->id_guest;
|
||||
$this->context->cart->setNoMultishipping();
|
||||
$this->context->cart->save();
|
||||
|
||||
$this->context->cookie->id_cart = (int) $this->context->cart->id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user