@@ -1196,7 +1196,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
}
|
||||
|
||||
$objHotelAmenities = new HotelAmenities();
|
||||
$roomTypeAmenities = $objHotelAmenities->HotelBranchSelectedAmenitiesArray(
|
||||
$roomTypeAmenities = $objHotelAmenities->hotelBranchSelectedAmenitiesArray(
|
||||
$selectedAmenityRows,
|
||||
$this->context->language->id
|
||||
);
|
||||
|
||||
@@ -129,7 +129,7 @@ class HotelAmenities extends ObjectModel
|
||||
* @param int $idLang
|
||||
* @return array|false
|
||||
*/
|
||||
public function HotelBranchSelectedAmenitiesArray($branchAmenities, $idLang = 0)
|
||||
public function hotelBranchSelectedAmenitiesArray($branchAmenities, $idLang = 0)
|
||||
{
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
|
||||
@@ -1156,12 +1156,12 @@ class HotelHelper
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function seedDefaultDynamicRoomFeatures()
|
||||
public function createHotelRoomDefaultFeatures()
|
||||
{
|
||||
$idLang = (int) Configuration::get('PS_LANG_DEFAULT');
|
||||
$position = 0;
|
||||
|
||||
foreach ($this->getDefaultDynamicRoomFeatures() as $featureName => $featureValues) {
|
||||
foreach ($this->getDefaultRoomFeatures() as $featureName => $featureValues) {
|
||||
$idFeature = (int) Feature::addFeatureImport($featureName, $position);
|
||||
if (!$idFeature) {
|
||||
return false;
|
||||
@@ -1185,7 +1185,7 @@ class HotelHelper
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getDefaultDynamicRoomFeatures()
|
||||
protected function getDefaultRoomFeatures()
|
||||
{
|
||||
return array(
|
||||
'Bed Type' => array('Single', 'Double', 'Queen', 'King', 'Super King', 'Twin', 'Bunk Bed', 'Sofa Bed', 'Futon', 'Murphy Bed', 'Water Bed'),
|
||||
|
||||
@@ -178,7 +178,7 @@ class AdminAddHotelController extends ModuleAdminController
|
||||
$smartyVars['order_restrict_date_info'] = HotelOrderRestrictDate::getDataByHotelId($idHotel);
|
||||
$objHotelAmenities = new HotelAmenities();
|
||||
$hotelAmenities = $this->object->getAmenitiesOfHotelByHotelId($this->object->id);
|
||||
if ($amenities = $objHotelAmenities->HotelBranchSelectedAmenitiesArray($hotelAmenities)) {
|
||||
if ($amenities = $objHotelAmenities->hotelBranchSelectedAmenitiesArray($hotelAmenities)) {
|
||||
foreach ($amenities as $idAmenity => $amenity) {
|
||||
$amenities[$idAmenity]['value'] = $idAmenity;
|
||||
$amenities[$idAmenity]['input_name'] = 'id_amenity_parents';
|
||||
|
||||
@@ -572,7 +572,7 @@ class HotelReservationSystem extends Module
|
||||
|| !$this->registerModuleHooks()
|
||||
|| !$this->callInstallTab()
|
||||
|| !$objHtlHelper->insertDefaultHotelEntries()
|
||||
|| !$objHtlHelper->seedDefaultDynamicRoomFeatures()
|
||||
|| !$objHtlHelper->createHotelRoomDefaultFeatures()
|
||||
|| !$objHtlHelper->insertHotelCommonFeatures()
|
||||
) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user