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

Panda Resort - 4.6.0 (Apr 3, 2017)

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

NEW FEATURES/IMPROVEMENTS

New service management in the booking module

/common/db.sql
>> New table pm_booking_service

-- ========== CREATION OF THE TABLE pm_booking_service ==========

CREATE TABLE pm_booking_service(
    id int NOT NULL AUTO_INCREMENT,
    id_booking int NOT NULL,
    id_service int,
    title varchar(250),
    qty int DEFAULT 0,
    amount double DEFAULT 0,
    PRIMARY KEY(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

>> 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_booking WHERE extra_services IS NOT NULL OR extra_services != ''");
if($result !== false){
    $count = $db->last_row_count();
    foreach($result as $row){
        if(!empty($row['extra_services'])){
            $extra_services = explode("|", $row['extra_services']);
            if(is_array($extra_services) && !empty($extra_services)){
                
                foreach($extra_services as $extra){
                    $extra = explode(";", $extra);
                    
                    $data = array();
                    $data['id'] = null;
                    $data['id_booking'] = $row['id'];
                    $data['id_service'] = null;
                    $data['title'] = $extra[0];
                    $data['qty'] = $extra[1];
                    $data['amount'] = $extra[2];
                    
                    $result_insert = db_prepareInsert($db, "pm_booking_service", $data);
                    if($result_insert->execute() !== false) $i++;
                }
            }
        }
    }
}
echo "$i extra services successfully added in the bookings!";

/admin/modules/booking/booking/config.xml
/admin/css/layout.css
/admin/includes/inc_header_form.php
/admin/includes/fn_form.php
/templates/default/models/details.php
/templates/default/models/summary.php
/templates/default/models/payment.php
/templates/default/common/update_booking.php
/templates/default/common/2checkout_notify.php
/templates/default/common/paypal_notify.php

Remove / end URL (optional)

/.htaccess
>> Add this code after "RewriteEngine On"

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

/templates/default/common/header.php
/templates/default/common/page_header.php
/templates/default/models/sitemap.php

Possibility to set Num. people = 0 in the module Rates

/templates/default/models/booking.php

FIXED ISSUES

Wrong setting value for currency position

/admin/settings.php