Panda Multi Resorts - 4.4.0 (Feb 3, 2017)
Replace the following files and execute the queries in your SQL manager to perform the updates.
NEW FEATURES/IMPROVEMENTS
New module Packages (possibility to edit the package settings)
/common/db.sql
>> New table pm_package:
-- =============== CREATION OF THE TABLE pm_package ============== CREATE TABLE pm_package( id int NOT NULL AUTO_INCREMENT, users text, name varchar(50), days text, min_nights int, max_nights int, day_start int, day_end int, PRIMARY KEY(id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Content of the table pm_package -- INSERT INTO pm_package (id, users, name, days, min_nights, max_nights, day_start, day_end) VALUES (1, '1', 'Week-end', '5,6,7', 0, 0, NULL, NULL), (2, '1', 'Night', '1,2,3,4,5,6,7', 0, 0, NULL, NULL), (3, '1', 'Mid-week', '1,2,3,4,5', 3, 4, NULL, NULL), (4, '1', '2 nights', '1,2,3,4', 2, 2, NULL, NULL), (5, '1', 'Week', '1,2,3,4,5,6,7', 7, 0, NULL, NULL);
>> New column "id_package" in the table pm_rate:
ALTER TABLE pm_rate ADD COLUMN id_package int;
>> Setting values of the new column "id_package":
UPDATE pm_rate SET id_package = 1 WHERE type = 'week-end'; UPDATE pm_rate SET id_package = 2 WHERE type = 'night'; UPDATE pm_rate SET id_package = 3 WHERE type = 'mid-week'; UPDATE pm_rate SET id_package = 4 WHERE type = '2-nights'; UPDATE pm_rate SET id_package = 5 WHERE type = 'week';
>> Copy the following PHP script (add the opening php tag at the beginning) in a new file (e.g. update.php) in the root of your website (beside index.php) and execute the script (e.g. in your browser: http//www.mywebsite.tld/update.php), then remove the file:
require("common/lib.php"); require("common/define.php"); $i = 0; $result = $db->query("SELECT * FROM pm_rate GROUP BY type"); if($result !== false){ $count = $db->last_row_count(); foreach($result as $row){ $id_package = 0; switch($row['type']){ case "week-end": $id_package = 1; break; case "night": $id_package = 2; break; case "mid-week": $id_package = 3; break; case "2-nights": $id_package = 4; break; case "week": $id_package = 5; break; } if(!empty($row['day_start']) && !empty($row['day_end'])){ $db->query("UPDATE pm_package SET day_start = ".$row['day_start'].", day_end = ".$row['day_end']." WHERE id = ".$id_package); $i++; } } } echo "$i types of price (module Rates) successfully updated!";
>> Remove the columns "min_stay", "day_start", "day_end" and "type" from the table pm_rate:
ALTER TABLE pm_rate DROP min_stay; ALTER TABLE pm_rate DROP day_start; ALTER TABLE pm_rate DROP day_end; ALTER TABLE pm_rate DROP type;
/admin/modules/booking/package/
/admin/modules/booking/rate/config.xml
/templates/default/common/get_hotels.php
/templates/default/models/hotel.php
/templates/default/models/booking.php
Advanced filters
/common/db.sql
>> New entries in the table pm_text (! replace with your translation and lang ids):
INSERT INTO pm_text (id, lang, name, value) VALUES (159, 3, 'STARS', 'Stars'), (159, 2, 'STARS', 'Stars'), (159, 1, 'STARS', 'Étoiles'), (160, 3, 'HOTEL_CLASS', 'Hotel Class'), (160, 2, 'HOTEL_CLASS', 'Hotel Class'), (160, 1, 'HOTEL_CLASS', 'Catégorie d''Hôtel'), (161, 3, 'YOUR_BUDGET', 'Your Budget'), (161, 2, 'YOUR_BUDGET', 'Your Budget'), (161, 1, 'YOUR_BUDGET', 'Votre Budget');
>> New column "class" in the table pm_hotel:
ALTER TABLE pm_hotel ADD COLUMN class int DEFAULT 0 AFTER alias;
/js/custom.js
/js/plugins/no-ui-slider/
/admin/modules/booking/hotel/config.xml
/templates/default/css/main.css
>> ADVANCED FILTERS section
/templates/default/models/booking.php
/templates/default/models/hotel.php
/templates/default/common/search.php
Translation of the button "Load more"
/common/db.sql
>> New entries in the table pm_text (! replace with your translation and lang ids):
INSERT INTO pm_text (id, lang, name, value) VALUES (162, 1, 'LOAD_MORE', 'Voir plus'), (162, 2, 'LOAD_MORE', 'Load more'), (162, 3, 'LOAD_MORE', 'Load more');
/js/custom.js
/templates/default/models/activities.php
/templates/default/models/blog.php
/templates/default/models/hotels.php
/templates/default/models/page.php
/templates/default/models/gallery.php
FIXED ISSUES
Undefined link on loading more activities
/common/define.php
/templates/default/common/get_activites.php
Undefined amount on booking requests
/templates/default/models/booking-activities.php
/templates/default/models/details.php
Bug on "Read more" button of the featured articles (homepage)
/templates/default/models/home.php