Cookies help us provide better user experience. By using our website, you agree to the use of cookies.

Panda Multi Resorts - 6.0.0 (Nov 9, 2017)

Replace the following files and execute the queries in your SQL manager to perform the updates.

Be careful: Major update with some files which have moved.
Main feature: Possibility to book multiple rooms per booking.
For websites with advanced customization in the PHP files and database structure related to the booking process, it may require a fresh installation.

NEW FEATURES/IMPROVEMENTS

Possibility to book multiple rooms per booking,
New booking summary layout

/common/db.sql
>> New table pm_booking_room

-- ============ CREATION OF THE TABLE pm_booking_room ============

CREATE TABLE pm_booking_room(
    id int NOT NULL AUTO_INCREMENT,
    id_booking int NOT NULL,
    id_room int,
    id_hotel int,
    title varchar(250),
    num varchar(10),
    children int DEFAULT 0,
    adults int DEFAULT 0,
    amount double DEFAULT 0,
    PRIMARY KEY(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE pm_booking_room ADD CONSTRAINT booking_room_fkey FOREIGN KEY (id_booking) REFERENCES pm_booking(id) ON DELETE CASCADE ON UPDATE NO ACTION;

>> New entries in the table pm_text (! as usual, replace with your translation and lang ids):

INSERT INTO pm_text (id, lang, name, value) VALUES
(166, 1, 'ROOMS', 'chambres'),
(166, 2, 'ROOMS', 'rooms'),
(166, 3, 'ROOMS', 'rooms'),
(167, 1, 'ADULT', 'adulte'),
(167, 2, 'ADULT', 'adult'),
(167, 3, 'ADULT', 'adult'),
(168, 1, 'CHILD', 'enfant'),
(168, 2, 'CHILD', 'child'),
(168, 3, 'CHILD', 'child'),
(169, 1, 'ACTIVITY', 'Activité'),
(169, 2, 'ACTIVITY', 'Activity'),
(169, 3, 'ACTIVITY', 'Activity'),
(170, 1, 'DATE', 'Date'),
(170, 2, 'DATE', 'Date'),
(170, 3, 'DATE', 'Date'),
(171, 1, 'QUANTITY', 'Quantité'),
(171, 2, 'QUANTITY', 'Quantity'),
(171, 3, 'QUANTITY', 'Quantity'),
(172, 1, 'SERVICE', 'Service'),
(172, 2, 'SERVICE', 'Service'),
(172, 3, 'SERVICE', 'Service');

>> Emails content modified (BOOKING_CONFIRMATION, BOOKING_REQUEST)

UPDATE pm_email_content SET content = '<p><b>Adresse de facturation</b><br>{firstname} {lastname}<br>{address}<br>{postcode} {city}<br>Société : {company}<br>Téléphone : {phone}<br>Mobile : {mobile}<br>Email : {email}</p><p><strong>Détails de la réservation</strong><br>Arrivée : <b>{Check_in}</b><br>Départ : <b>{Check_out}</b><br><b>{num_nights}</b> nuit(s)<br><b>{num_guests}</b> personne(s) - Adulte(s) : <b>{num_adults}</b> / Enfant(s) : <b>{num_children}</b></p><p><b>Chambres</b></p><p>{rooms}</p><p><b>Services supplémentaires</b></p><p>{extra_services}</p><p><b>Activités</b></p><p>{activities}</p><p><b>Commentaires</b><br>{comments}</p>' WHERE name = 'BOOKING_REQUEST' AND lang = 1;
UPDATE pm_email_content SET content = '<p><b>Billing address</b><br>{firstname} {lastname}<br>{address}<br>{postcode} {city}<br>Company: {company}<br>Phone: {phone}<br>Mobile: {mobile}<br>Email: {email}</p><p><strong>Booking details</strong><br>Check in <b>{Check_in}</b><br>Check out <b>{Check_out}</b><br><b>{num_nights}</b> nights<br><b>{num_guests}</b> persons - Adults: <b>{num_adults}</b> / Children: <b>{num_children}</b></p><p><strong>Rooms</strong></p><p>{rooms}</p><p><b>Extra services</b></p><p>{extra_services}</p><p><b>Activities</b></p><p>{activities}</p><p><b>Comments</b><br>{comments}</p>' WHERE name = 'BOOKING_REQUEST' AND lang = 2;
UPDATE pm_email_content SET content = '<p><b>Billing address</b><br>{firstname} {lastname}<br>{address}<br>{postcode} {city}<br>Company: {company}<br>Phone: {phone}<br>Mobile: {mobile}<br>Email: {email}</p><p><strong>Booking details</strong><br>Check in <b>{Check_in}</b><br>Check out <b>{Check_out}</b><br><b>{num_nights}</b> nights<br><b>{num_guests}</b> persons - Adults: <b>{num_adults}</b> / Children: <b>{num_children}</b></p><p><strong>Rooms</strong></p><p>{rooms}</p><p><b>Extra services</b></p><p>{extra_services}</p><p><b>Activities</b></p><p>{activities}</p><p><b>Comments</b><br>{comments}</p>' WHERE name = 'BOOKING_REQUEST' AND lang = 3;
UPDATE pm_email_content SET content = '<p><b>Adresse de facturation</b><br>{firstname} {lastname}<br>{address}<br>{postcode} {city}<br>Société : {company}<br>Téléphone : {phone}<br>Mobile : {mobile}<br>Email : {email}</p><p><strong>Détails de la réservation</strong><br>Arrivée : <b>{Check_in}</b><br>Départ : <b>{Check_out}</b><br><b>{num_nights}</b> nuit(s)<br><b>{num_guests}</b> personne(s) - Adulte(s) : <b>{num_adults}</b> / Enfant(s) : <b>{num_children}</b></p><p><b>Chambres</b></p><p>{rooms}</p><p><b>Services supplémentaires</b></p><p>{extra_services}</p><p><b>Activités</b></p><p>{activities}</p><p>Taxe de séjour : {tourist_tax}<br>Réduction: {discount}<br>{taxes}<br>Total : <strong>{total} TTC</strong></p><p>Acompte : <strong>{down_payment} TTC</strong></p><p><b>Commentaires</b><br>{comments}</p><p>{payment_notice}</p>' WHERE name = 'BOOKING_CONFIRMATION' AND lang = 1;
UPDATE pm_email_content SET content = '<p><b>Billing address</b><br>{firstname} {lastname}<br>{address}<br>{postcode} {city}<br>Company: {company}<br>Phone: {phone}<br>Mobile: {mobile}<br>Email: {email}</p><p><strong>Booking details</strong><br>Check in <b>{Check_in}</b><br>Check out <b>{Check_out}</b><br><b>{num_nights}</b> nights<br><b>{num_guests}</b> persons - Adults: <b>{num_adults}</b> / Children: <b>{num_children}</b></p><p><strong>Rooms</strong></p><p>{rooms}</p><p><b>Extra services</b></p><p>{extra_services}</p><p><b>Activities</b></p><p>{activities}</p><p>Tourist tax: {tourist_tax}<br>Discount: {discount}<br>{taxes}<br>Total: <strong>{total} incl. VAT</strong></p><p>Down payment: <strong>{down_payment} incl. VAT</strong></p><p><b>Comments</b><br>{comments}</p><p>{payment_notice}</p>' WHERE name = 'BOOKING_CONFIRMATION' AND lang = 2;
UPDATE pm_email_content SET content = '<p><b>Billing address</b><br>{firstname} {lastname}<br>{address}<br>{postcode} {city}<br>Company: {company}<br>Phone: {phone}<br>Mobile: {mobile}<br>Email: {email}</p><p><strong>Booking details</strong><br>Check in <b>{Check_in}</b><br>Check out <b>{Check_out}</b><br><b>{num_nights}</b> nights<br><b>{num_guests}</b> persons - Adults: <b>{num_adults}</b> / Children: <b>{num_children}</b></p><p><strong>Rooms</strong></p><p>{rooms}</p><p><b>Extra services</b></p><p>{extra_services}</p><p><b>Activities</b></p><p>{activities}</p><p>Tourist tax: {tourist_tax}<br>Discount: {discount}<br>{taxes}<br>Total: <strong>{total} incl. VAT</strong></p><p>Down payment: <strong>{down_payment} incl. VAT</strong></p><p><b>Comments</b><br>{comments}</p><p>{payment_notice}</p>' WHERE name = 'BOOKING_CONFIRMATION' AND lang = 3;

/common/lib.php
/js/custom.js
/js/plugins/jquery.event.calendar/
/admin/modules/booking/booking/config.xml
/admin/includes/langs/en.ini (+ other languages)
>> New entry: NUM
/templates/default/common/get_days.php
/templates/default/common/change_num_rooms.php
/templates/default/common/change_num_people.php
/templates/default/common/functions.php
/templates/default/common/search.php
/templates/default/common/booking-popup.php
/templates/default/common/update_booking.php
/templates/default/common/header.php
/includes/payments/paypal_notify.php
/includes/payments/2checkout_notify.php
/includes/change_currency.php
/templates/default/models/booking.php
/templates/default/models/details.php
/templates/default/models/summary.php
/templates/default/models/payment.php
/templates/default/models/account.php
/templates/default/css/main.css (#booking-summary)
/templates/default/css/colors.css (#booking-summary)
/common/js/plugins/magnific-popup/magnific-popup.css

>> 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_booking = $db->query('SELECT * FROM pm_booking');
foreach($result_booking as $row){
    $id_booking = $row['id'];
    $id_room = $row['id_room'];
    $id_hotel = $row['id_hotel'];
    $room_title = $row['room'];
    $amount = $row['amount'];
    $num_adults = $row['adults'];
    $num_children = $row['children'];
    
    $data = array();
    $data['id'] = null;
    $data['id_booking'] = $id_booking;
    $data['id_room'] = $id_room;
    $data['id_hotel'] = $id_hotel;
    $data['title'] = $room_title;
    $data['amount'] = $amount;
    $data['adults'] = $num_adults;
    $data['children'] = $num_children;
    
    $result = db_prepareInsert($db, 'pm_booking_room', $data);
    if($result->execute() !== false) $i++; else die('error');
}
echo $i.' bookings successfully modified!';

Execute the following code in your phpMyAdmin:

ALTER TABLE pm_booking DROP COLUMN id_room;
ALTER TABLE pm_booking DROP COLUMN room;

FIXED ISSUES

Wrong number format on booking activities

/templates/default/models/booking-activities.php
/templates/default/common/get_activity_sessions.php

Character encoding

/common/lib.php
/admin/settings.php

Hotel website URL missing

/templates/default/models/hotel.php

Activity sessions hour format

/templates/default/common/get_activity_sessions.php

Empty multiselect field issue

/admin/modules/default/form.php