Panda Multi Resorts - 4.3.0 (Jan 15, 2017)
Replace the following files and execute the queries in your SQL manager to perform the updates.
NEW FEATURES/IMPROVEMENTS
New module Taxes
/admin/modules/booking/tax/
/admin/modules/booking/booking/config.xml
/admin/modules/booking/rate/config.xml
/admin/modules/booking/service/config.xml
/admin/modules/booking/activity_session/config.xml
/common/db.sql
>> new tables pm_tax and pm_booking_tax:
-- ================== CREATION OF THE TABLE pm_tax =============== CREATE TABLE pm_tax( id int NOT NULL AUTO_INCREMENT, lang int NOT NULL, name varchar(50), value double DEFAULT 0, checked int DEFAULT 0, rank int DEFAULT 0, PRIMARY KEY(id, lang) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE pm_tax ADD CONSTRAINT tax_lang_fkey FOREIGN KEY (lang) REFERENCES pm_lang(id) ON DELETE CASCADE ON UPDATE NO ACTION; -- ============= CREATION OF THE TABLE pm_booking_tax ============ CREATE TABLE pm_booking_tax( id int NOT NULL AUTO_INCREMENT, id_booking int NOT NULL, id_tax int, name varchar(50), amount double DEFAULT 0, PRIMARY KEY(id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE pm_booking_tax ADD CONSTRAINT booking_tax_fkey FOREIGN KEY (id_booking) REFERENCES pm_booking(id) ON DELETE CASCADE ON UPDATE NO ACTION;
>> new columns "id_tax" and "taxes" in the tables pm_rate, pm_service and pm_activity_session:
ALTER TABLE pm_rate ADD id_tax INT NULL AFTER discount, ADD taxes TEXT NULL AFTER id_tax; ALTER TABLE pm_service ADD id_tax INT NULL AFTER price, ADD taxes TEXT NULL AFTER id_tax; ALTER TABLE pm_activity_session ADD id_tax INT NULL AFTER discount, ADD taxes TEXT NULL AFTER id_tax;
>> New entries in the table pm_text (!replace with your translation and lang ids):
INSERT INTO pm_text (id, lang, name, value) VALUES (156, 1, 'INCL_TAX', 'TTC'), (156, 2, 'INCL_TAX', 'incl. tax'), (156, 3, 'INCL_TAX', 'incl. tax');
>> 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"); $result_lang = $db->query("SELECT id, title FROM pm_lang"); if($result_lang !== false){ $total_lang = $db->last_row_count(); $langs = $result_lang->fetchAll(PDO::FETCH_ASSOC); } $i = 0; $result = $db->query("SELECT distinct vat_rate FROM pm_rate WHERE vat_rate > 0"); if($result !== false){ $count = $db->last_row_count(); foreach($result as $row){ $id = null; $i++; foreach($langs as $lang){ $data = array(); $data['id'] = $id; $data['lang'] = $lang['id']; $data['name'] = "VAT"; $data['value'] = $row['vat_rate']; $data['checked'] = 1; $data['rank'] = $i; $result_insert = db_prepareInsert($db, "pm_tax", $data); if($result_insert !== false){ if($result_insert->execute() !== false){ if(is_null($id)){ $id = $db->lastInsertId(); $db->query("UPDATE pm_rate SET id_tax = ".$id." WHERE vat_rate = ".$row['vat_rate']); $db->query("UPDATE pm_service SET id_tax = ".$id." WHERE vat_rate = ".$row['vat_rate']); $db->query("UPDATE pm_activity_session SET id_tax = ".$id." WHERE vat_rate = ".$row['vat_rate']); } } } } } } echo "$i taxes successfully inserted!";
/templates/default/common/2checkout_notify.php
/templates/default/common/paypal_notify.php
/templates/default/common/booking-popup.php
/templates/default/common/update_booking.php
/templates/default/common/get_activity_sessions.php
/templates/default/models/booking.php
/templates/default/models/booking-activities.php
/templates/default/models/details.php
/templates/default/models/summary.php
/templates/default/models/payment.php
New article status "archived"
/admin/includes/lang.ini
/admin/includes/fn_actions.php
/admin/modules/default/list.php
/admin/modules/default/form.php
/index.php
New model Blog
/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 (157, 1, 'TAGS', 'Tags'), (157, 2, 'TAGS', 'Tags'), (157, 3, 'TAGS', 'Tags'), (158, 1, 'ARCHIVES', 'Archives'), (158, 2, 'ARCHIVES', 'Archives'), (158, 3, 'ARCHIVES', 'Archives');
>> 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"); $result_lang = $db->query("SELECT id, title FROM pm_lang"); if($result_lang !== false){ $total_lang = $db->last_row_count(); $langs = $result_lang->fetchAll(PDO::FETCH_ASSOC); } $i = 0; $id = null; $i++; foreach($langs as $lang){ $data = array(); $data['id'] = $id; $data['lang'] = $lang['id']; $data['name'] = "Blog"; $data['title'] = "Blog"; $data['title_tag'] = "Blog"; $data['alias'] = "blog"; $data['robots'] = "index,follow"; $data['page_model'] = "blog"; $data['article_model'] = "article-blog"; $data['home'] = 0; $data['checked'] = 1; $data['rank'] = 2; $data['add_date'] = 1482486274; $result_insert = db_prepareInsert($db, "pm_page", $data); if($result_insert !== false){ if($result_insert->execute() !== false) $id = $db->lastInsertId(); } } echo "$i pages successfully inserted!"; if(!is_null($id)){ $page_id = $id; $i = 0; $id = null; $i++; foreach($langs as $lang){ $data = array(); $data['id'] = $id; $data['lang'] = $lang['id']; $data['title'] = "Blog side"; $data['showtitle'] = 0; $data['pos'] = "right"; $data['allpages'] = 0; $data['pages'] = $page_id; $data['type'] = "blog_side"; $data['home'] = 0; $data['checked'] = 1; $data['rank'] = 5; $result_insert = db_prepareInsert($db, "pm_widget", $data); if($result_insert !== false){ if($result_insert->execute() !== false) $id = $db->lastInsertId(); } } echo "$i widgets successfully inserted!"; }
/common/lib.php
/templates/default/models/blog.php
/templates/default/models/article-blog.php
/templates/default/common/get_articles_blog.php
/templates/default/widgets/blog_side.php
Modules ranking
/admin/modules/social/config.xml
/admin/includes/config.xsd
/admin/includes/inc_top.php
/admin/includes/inc_header_common.php
/admin/includes/fn_form.php
FIXED ISSUES
Underline missing in CKEditor
/admin/js/plugins/ckeditor/config.js
Special caracters escaped
/admin/setup.php
/admin/settings.php
Latest articles layout in the footer
/templates/default/widgets/latest_articles.php
Bug on Analytics code and Address fields in the Settings section
/admin/settings.php
Then, fill again the field "Google analytics" (admin panel > settings) and save
Bug on empty multiselect
/admin/modules/default/form.php
Wrong column name
/admin/modules/booking/service/config.xml
/admin/modules/booking/activity_session/config.xml