Open piyushvostro opened 4 years ago
@piyushvostro
To save the room information of a room type you have to make an entry in the htl_room_information table. Its related class is "HotelRoomInformation".
To save the disable dates information of a room, you have to make entries in the table htl_room_disable_dates. Its related class is "HotelRoomDisableDates".
Find all the above classes and tables in the module "hotelreservationsystem".
Hello sir, can I have your email for an easy communication?
@piyushvostro You can post here your issues. Here you will get your replies easily. There was a delay in the previous reply because of the situation due to coronavirus.
Thanks
I have to create rooms(product) programmatically from a custom module. for this I am using this method -
_$default_lang = Configuration::get('PS_LANG_DEFAULT'); $product = new Product(); $product->price = 2600; $product->id_supplier = 1; $product->quantity = 1; $product->save(); $product->id_category = 1; $product->id_category_default = 1; if($product->add()) { $product->updateCategories($product->idcategory); StockAvailable::setQuantity((int)$product->id,0,$product->quantity, Context::getContext()->shop->id); }
This code is successfully creating a new product as can be seen in 'manage room types' tab under catalog tab in admin panel and also a new entry is created in _psproduct table.
But how should I save additional information of this product (name, short_desc, desc, etc). As these details are saved in another table i.e _ps-productlang.
Thanks in Anticipation.
@piyushvostro
We have built this software on the Prestashop eCommerce platform. We have used the product entity in Prestashop as the room type in QloApps. So we recommend you to follow the dev docs of Prestashop for the development help.
The room was additionally added and we have told ou the process to add rooms in the previous reply.
How to add new rooms programmatically from custom modules?