[+] BO : Compatible Stats module are now installed to the qloapps.

[+] BO : Hotel name is shown in the Room Type Booking list and Room Type booking status tables.
[+] FO : Hotel name is shown in the Customer shopping list, Order confirmation and order details booking lists.

[-] CO : Resolved :: When set up the new install, the upload_max_filesize value in the php.ini file less than 16M, but the error message is displaying for memory_limit
This commit is contained in:
Rohit
2018-10-31 20:52:01 +05:30
parent a739332b50
commit 3f49dd4074
2335 changed files with 28898 additions and 149476 deletions

36
.travis.yml Normal file
View File

@@ -0,0 +1,36 @@
language : php
addons:
chrome: stable
apt:
packages:
- apache2
- postfix
- libapache2-mod-fastcgi
- libappindicator1
- fonts-liberation
sudo: required
dist: trusty
php:
- 5.6
- 7.2
before_script:
- sudo cp -f tests/travis-ci-apache-vhost /etc/apache2/sites-available/default
- sudo cp -Rf . /var/www/qloapps.unit.test
- sudo chmod 777 -R /var/www/
- sudo service apache2 restart
script:
- cd /var/www/qloapps.unit.test/tests && bash getcomposer.sh && php composer.phar install && php vendor/bin/phpunit -c .
after_script:
- sudo cat /var/log/apache2/error.log
after_failure:
- curl -L http://localhost/
- cat /etc/apache2/envvars
- cat /etc/apache2/sites-available/000-default.conf
- sudo cat /var/log/php-fpm.log
- sudo ls -l /var/log/apache2
- sudo cat /var/log/apache2/other_vhosts_access.log

View File

@@ -1,3 +1,88 @@
####################################
# V1.3.1
####################################
## Added Features:
[+] BO : All already compatible Stats module are installed to the qloapps now.
## Improved/changed features:
[+] BO : Hotel name is shown in the Room Type Booking list and Room Type booking status tables.
[+] FO : Hotel name is shown in the Customer shopping list, Order confirmation and order details booking lists.
## Bug/Issues Resolved:
[-] CO : Resolved :: When set up the new install, the upload_max_filesize value in the php.ini file less than 16M, but the error message is displaying for memory_limit.
####################################
# V1.3.0
####################################
## Added Features:
[+] CO : Qloapps is compatible with php 7.x.x .
## Improved/changed features:
[+] CO : "create demo data or not" option improved for Qloapps demo data .
[+] CO : System compatibility check for Qloapps installation improved .
####################################
# V1.2.0
####################################
## Added Features:
[+] CO : Qloapps is now GDPR compatible (changes are made in Qloapps according to Qloapps GDPR module).
[+] CO : wkfooterpaymentblock :: Created a controller where admin will be able to create payment Blocks.
[+] CO : wkfooterpaymentblock :: Admin will be able to enter Name , image and status of the payment block.
[+] CO : wkfooterpaymentblock :: Admin will be able to position the payment blocks and payment image blocks will be shown to the customer as per their positions.
[+] CO : Qloapps version compliancy code added for modules' installation
[+] FO : On contact us page, design is changed.
[+] FO : On contact us page contact header, contact content, global address are now dynamic. Enter values from AdminGeneralSettingsController.
[+] BO : Configuration to show/hide only one active hotel is added in location search panel in Hotel General Settings.
## Improved/changed features:
[+] CO : Missing multilang fields added where needed in Qloapps.
[+] CO : Tax name will be shown in the invoices now. (For GST purposes) - (enable tax breakdown is mandatory)
[+] CO : logo.gif needed in the modules (module author:webkul)
[+] CO : Removed prestashop from all the pages and emails of Qloapps.
[+] CO : Changed all links of Qloapps according to the qloapps.com.
[+] CO : Stopped sending info to prestashop while installation.
[+] BO : Seperate configuration panel is made for location search panel in Hotel General Settings.
## Bug/Issues Resolved:
[-] CO : Resolved :: Theme compilation issue on ajax while Qloapps installation
[-] CO : Resolved :: Notice on Calls to functions Product::getProducts() in wkhoteleoom and Product::getSimpleProducts() in HotelHelper.php while installation of Qloapps.[Trying to get property of non-object]
[-] CO : Resolved :: hotelreservationsystem - Parent:: replaced with parent:: in classes/hotelHotelBranchInformation.php which was creating problems in installation.
[-] CO : Resolved :: RecursiveDirectoryIterator::__construct(/var/www/html/themes/hotel-theme/): failed to open dir While installation.
[-] BO : Resolved :: hotelreservationsystem:: Hotel images not saved while saving hotel details.
[-] BO : Resolved :: hotelreservationsystem - $max_phone_digit is undefined issue resolved on hotel creation form.
[-] BO : Resolved :: hotelreservationsystem:: HotelBookingDetail.php : phone number sent as string '0987654321'from 0987654321. Giving error while installing Qloapps with php7.0.0 .
[-] BO : Resolved :: wktestimonialblock:: Error while saving or updating testimonials by admin.
[-] BO : Resolved :: array_column is removed from AdminProductController [php version compatibility issue].
[-] FO : Resolved :: Undefined index: total_rooms_in_cart at blockcart.tpl.
#################################### ####################################
# V1.1.1 # V1.1.1
#################################### ####################################
@@ -47,40 +132,40 @@
[*] MO : hotelreservationsystem->HotelRoomTypeFeaturePricing.php :deleteFeaturePriceByIdProduct(), getFeaturePriceInfo() are added. [*] MO : hotelreservationsystem->HotelRoomTypeFeaturePricing.php :deleteFeaturePriceByIdProduct(), getFeaturePriceInfo() are added.
[*] MO : hotelreservationsystem->HotelBookingDetails.php : getBookingData() ..... $room_type = 0 (default value of room_type added) [*] MO : hotelreservationsystem->HotelBookingDetails.php : getBookingData() ..... $room_type = 0 (default value of room_type added)
[+] MO : hotelreservationsystem::AdminAddHotelController.php - addCategory() is moved at HotelBranchInformation.php and image save changes. [+] CO : hotelreservationsystem::AdminAddHotelController.php - addCategory() is moved at HotelBranchInformation.php and image save changes.
[+] MO : hotelreservationsystem::AdminProductsController.php - ajaxProcessDeleteHotelRoom() changed. [+] CO : hotelreservationsystem::AdminProductsController.php - ajaxProcessDeleteHotelRoom() changed.
[+] MO : hotelreservationsystem::AdminHotelRoomsBookingController.php - renderView() changes for booking data is null. [+] CO : hotelreservationsystem::AdminHotelRoomsBookingController.php - renderView() changes for booking data is null.
[+] MO : hotelreservationsystem::AdminHotelFeaturePricesSettings.php - Below code is removed because impact price can be greater then 100% : if ($priceImpactType == 1) { [+] CO : hotelreservationsystem::AdminHotelFeaturePricesSettings.php - Below code is removed because impact price can be greater then 100% : if ($priceImpactType == 1) {
if ($impactValue > 100) { if ($impactValue > 100) {
$this->errors[] = $this->l('Invalid value of impact percentage.'); $this->errors[] = $this->l('Invalid value of impact percentage.');
} }
} }
[+] MO : wkroomsearchblock::autocompletesearch.php - changes for the hotel search panel(id_hotel sent in the ajax request). [+] CO : wkroomsearchblock::autocompletesearch.php - changes for the hotel search panel(id_hotel sent in the ajax request).
[+] MO : bankwire::bankwire.php - hookPaymentReturn() changed (seller wise order split). [+] CO : bankwire::bankwire.php - hookPaymentReturn() changed (seller wise order split).
[+] MO : cheque::cheque.php - hookPaymentReturn() changed (seller wise order split). [+] CO : cheque::cheque.php - hookPaymentReturn() changed (seller wise order split).
[+] MO : hotelreservationsystem - double codes remove in form.tpl(modules/hotelreservationsystem/views/templates/ admin/ hotel_feature_prices_settings/helpers/form/form.tpl) [+] CO : hotelreservationsystem - double codes remove in form.tpl(modules/hotelreservationsystem/views/templates/ admin/ hotel_feature_prices_settings/helpers/form/form.tpl)
[+] MO : hotelreservationsystem::AdminHotelRoomsBookingController: form.tpl - renderView() changes for booking data is null. [+] CO : hotelreservationsystem::AdminHotelRoomsBookingController: form.tpl - renderView() changes for booking data is null.
[+] MO : hotelreservationsystem::from.tpl :: AdminAddHotelController.php - Changes for tabs (hotel information and images tabs) [+] CO : hotelreservationsystem::from.tpl :: AdminAddHotelController.php - Changes for tabs (hotel information and images tabs)
[+] MO : hotelreservationsystem::roomSearchWrapper.tpl - changes for the hotel search panel (id_hotel sent in the ajax request) [+] CO : hotelreservationsystem::roomSearchWrapper.tpl - changes for the hotel search panel (id_hotel sent in the ajax request)
[+] MO : htlfiltersearchblock::htlfiltersearchblock.tpl - changes for the hotel search panel (id_hotel sent in the ajax request) [+] CO : htlfiltersearchblock::htlfiltersearchblock.tpl - changes for the hotel search panel (id_hotel sent in the ajax request)
[+] MO : hotelreservationsystem::HotelReservationAdmin.css - css added For images save and delete [+] CO : hotelreservationsystem::HotelReservationAdmin.css - css added For images save and delete
[+] MO : hotelreservationsystem::HotelReservationAdmin.js - js added For images save and delete changes [+] CO : hotelreservationsystem::HotelReservationAdmin.js - js added For images save and delete changes
[+] MO : hotelreservationsystem::HotelReservationAdmin.js - For booking Calendar and datepicker changes when booking data is null [+] CO : hotelreservationsystem::HotelReservationAdmin.js - For booking Calendar and datepicker changes when booking data is null
[+] MO : hotelreservationsystem::roomSearchBlock.js - changes for the hotel search panel (id_hotel sent in the ajax request) [+] CO : hotelreservationsystem::roomSearchBlock.js - changes for the hotel search panel (id_hotel sent in the ajax request)
## Bug/Issues Resolved: ## Bug/Issues Resolved:
[-] BO : Resolved :: submitHandler: function(form) removed at line 257 (admin/themes/default/template/controllers/product/form/form.tpl) o resolve Room Type not always saved while saving fron the backoffice. [-] BO : Resolved :: submitHandler: function(form) removed at line 257 (admin/themes/default/template/controllers/product/form/form.tpl) o resolve Room Type not always saved while saving fron the backoffice.
[+] MO : wkhotelroom::WkHotelRoomDisplay.php - deleteRoomByIdProduct() function is turned to static becuase at the time of product delete this function is throwing error. [+] CO : wkhotelroom::WkHotelRoomDisplay.php - deleteRoomByIdProduct() function is turned to static becuase at the time of product delete this function is throwing error.
#################################### ####################################
@@ -102,24 +187,24 @@
[+] FO : OrderConfirmationController, OrderOpcController, OrderDetailsController and ProductControler are modified for feature price functionality. display files of the controllers also modified. [+] FO : OrderConfirmationController, OrderOpcController, OrderDetailsController and ProductControler are modified for feature price functionality. display files of the controllers also modified.
[+] MO : hotelreservationsystem : ChannelManagerServices.php is added. [+] CO : hotelreservationsystem : ChannelManagerServices.php is added.
[+] MO : hotelreservationsystem : ChannelOrderPayment.php is added. [+] CO : hotelreservationsystem : ChannelOrderPayment.php is added.
[+] MO : hotelreservationsystem : HotelCustomerAdvancedProductPayment.php is added. [+] CO : hotelreservationsystem : HotelCustomerAdvancedProductPayment.php is added.
[+] MO : hotelreservationsystem : HotelRoomDisableDates.php is added. [+] CO : hotelreservationsystem : HotelRoomDisableDates.php is added.
[+] MO : hotelreservationsystem : QloWebservice.php is added. [+] CO : hotelreservationsystem : QloWebservice.php is added.
[+] MO : hotelreservationsystem : WebserviceSpecificManagementQlo.php is added. [+] CO : hotelreservationsystem : WebserviceSpecificManagementQlo.php is added.
[+] MO : hotelreservationsystem : ChannelManagerServices.php is added. [+] CO : hotelreservationsystem : ChannelManagerServices.php is added.
[+] MO : hotelreservationsystem : HotelRoomTypeFeaturePricing.php is added. [+] CO : hotelreservationsystem : HotelRoomTypeFeaturePricing.php is added.
[+] MO : hotelreservationsystem : ChannelOrderPayment.php is added. [+] CO : hotelreservationsystem : ChannelOrderPayment.php is added.
[+] MO : hotelreservationsystem : getRoomMinAdvPaymentAmount() is added in HotelAdvancedPayment.php. [+] CO : hotelreservationsystem : getRoomMinAdvPaymentAmount() is added in HotelAdvancedPayment.php.
[+] MO : hotelreservationsystem : createQloAppsBookingByChannels(), createQloCustomerChannelCustomerInfo(), createQloCustomerAddressByChannelCustomerInfo(), createQloCartForBookingFromChannel(), ProcessCreateQloOrderForChannelBooking() are added for Qloapps Api need in HotelBookingDetails.php. [+] CO : hotelreservationsystem : createQloAppsBookingByChannels(), createQloCustomerChannelCustomerInfo(), createQloCustomerAddressByChannelCustomerInfo(), createQloCartForBookingFromChannel(), ProcessCreateQloOrderForChannelBooking() are added for Qloapps Api need in HotelBookingDetails.php.
[+] MO : hotelreservationsystem : 'total_price_tax_excl' and 'total_price_tax_incl' columns are added in `htl_booking_detail` table to store the booking time price. [+] CO : hotelreservationsystem : 'total_price_tax_excl' and 'total_price_tax_incl' columns are added in `htl_booking_detail` table to store the booking time price.
[+] MO : hotelreservationsystem : getProductFeaturePricePlanByDateByPriority(), getHotelCartBookingData() are added in HotelCartBookingData.php. [+] CO : hotelreservationsystem : getProductFeaturePricePlanByDateByPriority(), getHotelCartBookingData() are added in HotelCartBookingData.php.
[+] MO : hotelreservationsystem : 'disabled_dates' column is added in the table `htl_room_information`. [+] CO : hotelreservationsystem : 'disabled_dates' column is added in the table `htl_room_information`.
[+] MO : hotelreservationsystem : getRoomTypeAvailableRoomsForDateRange(), getRoomTypeDisabledRoomsForDateRange(), getRoomTypeBookedRoomsForDateRange() are added in HotelRoomInformation.php. [+] CO : hotelreservationsystem : getRoomTypeAvailableRoomsForDateRange(), getRoomTypeDisabledRoomsForDateRange(), getRoomTypeBookedRoomsForDateRange() are added in HotelRoomInformation.php.
[+] MO : hotelreservationsystem : room status 'Hold For Maintenance is replace with 'Temporary incative'; [+] CO : hotelreservationsystem : room status 'Hold For Maintenance is replace with 'Temporary incative';
[+] MO : hotelreservationsystem : AdminHotelRoomsBookingController.php and AdminOrderRefundRequestsController.php are changed to make compatible with feature price functionality. [+] CO : hotelreservationsystem : AdminHotelRoomsBookingController.php and AdminOrderRefundRequestsController.php are changed to make compatible with feature price functionality.
## Improved/changed features: ## Improved/changed features:
@@ -180,14 +265,14 @@
[+] BO : Order Restrict functionality is added. [+] BO : Order Restrict functionality is added.
[+] BO : Order Edit id added. [+] BO : Order Edit id added.
[+] MO : wkpaypaladaptive : Added Feature Admin can refund full transaction. [+] CO : wkpaypaladaptive : Added Feature Admin can refund full transaction.
[+] MO : wkpaypaladaptive : Order is created by IPN. [+] CO : wkpaypaladaptive : Order is created by IPN.
[+] MO : Added wkhotelroom [+] CO : Added wkhotelroom
[+] MO : Added wkfooteraboutblock [+] CO : Added wkfooteraboutblock
[+] MO : Added wkfooterexploreblock [+] CO : Added wkfooterexploreblock
[+] MO : Added wkfooternotificationblock [+] CO : Added wkfooternotificationblock
[+] MO : Added wkfooterpaymentblock [+] CO : Added wkfooterpaymentblock
[+] MO : hotelreservationsystem : Added Settings tab to centralize all configurations. [+] CO : hotelreservationsystem : Added Settings tab to centralize all configurations.
## Improved/changed features: ## Improved/changed features:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -47,8 +47,8 @@
<button data-dismiss="alert" class="close" type="button">×</button> <button data-dismiss="alert" class="close" type="button">×</button>
<h4>{l s='Disclaimer before creating a new backup'}</h4> <h4>{l s='Disclaimer before creating a new backup'}</h4>
<ol> <ol>
<li>{l s='PrestaShop is not responsible for your database, its backups and/or recovery.'}</li> <li>{l s='Qloapps is not responsible for your database, its backups and/or recovery.'}</li>
<li>{l s='PrestaShop is open-source software. You are using it at your own risk under the license agreement.'}</li> <li>{l s='Qloapps is open-source software. You are using it at your own risk under the license agreement.'}</li>
<li>{l s='You should back up your data on a regular basis (both files and database).'}</li> <li>{l s='You should back up your data on a regular basis (both files and database).'}</li>
<li>{l s='This function only backs up your database, not your files.'}</li> <li>{l s='This function only backs up your database, not your files.'}</li>
<li>{l s='By default, your existing database tables will be dropped during the backup recovery (see "Backup options" below).'}</li> <li>{l s='By default, your existing database tables will be dropped during the backup recovery (see "Backup options" below).'}</li>

View File

@@ -89,43 +89,26 @@
</div> </div>
<div class="col-md-8 col-lg-7" id="hookDashboardZoneTwo"> <div class="col-md-8 col-lg-7" id="hookDashboardZoneTwo">
{$hookDashboardZoneTwo} {$hookDashboardZoneTwo}
<div id="dashaddons" class="row-margin-bottom">
<a href="http://addons.prestashop.com/en/209-dashboards?utm_source=back-office&amp;utm_medium=dashboard&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="_blank">
<i class="icon-plus"></i> {l s='Add more dashboard modules'}
</a>
</div>
</div> </div>
<div class="col-md-12 col-lg-2"> <div class="col-md-12 col-lg-2">
{$hookDashboardZoneThree} {$hookDashboardZoneThree}
<section class="dash_news panel">
<h3><i class="icon-rss"></i> {l s='PrestaShop News'}</h3>
<div class="dash_news_content"></div>
<div class="text-center"><h4><a href="http://www.prestashop.com/blog/" onclick="return !window.open(this.href);">{l s='Find more news'}</a></h4></div>
</section>
<section id="dash_version" class="visible-lg">
<iframe style="overflow:hidden;border:none" src="{$new_version_url|escape:'html':'UTF-8'}" ></iframe>
</section>
<section class="dash_links panel"> <section class="dash_links panel">
<h3><i class="icon-link"></i> {l s="Useful links"}</h3> <h3><i class="icon-link"></i> {l s="Useful links"}</h3>
<dl> <dl>
<dt><a href="http://doc.prestashop.com/display/PS16?utm_source=back-office&amp;utm_medium=dashboard&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="_blank">{l s="Official Documentation"}</a></dt> <dt><a href="https://qloapps.com/qlo-reservation-system/" class="_blank">{l s="Official Documentation"}</a></dt>
<dd>{l s="User, Developer and Designer Guides"}</dd> <dd>{l s="Qloapps User Guide"}</dd>
</dl> </dl>
<dl> <dl>
<dt><a href="http://www.prestashop.com/forums?utm_source=back-office&amp;utm_medium=dashboard&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="_blank">{l s="PrestaShop Forum"}</a></dt> <dt><a href="https://forums.qloapps.com/" class="_blank">{l s="Qloapps Forum"}</a></dt>
<dd>{l s="Connect with the PrestaShop community"}</dd> <dd>{l s="Connect with the Qloapps community"}</dd>
</dl> </dl>
<dl> <dl>
<dt><a href="http://addons.prestashop.com?utm_source=back-office&amp;utm_medium=dashboard&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="_blank">{l s="PrestaShop Addons"}</a></dt> <dt><a href="https://store.webkul.com/Qloapps.html" class="_blank">{l s="Qloapps Addons"}</a></dt>
<dd>{l s="Enhance your store with templates & modules"}</dd> <dd>{l s="Enhance your store Qloapps modules"}</dd>
</dl> </dl>
<dl> <dl>
<dt><a href="http://forge.prestashop.com?utm_source=back-office&amp;utm_medium=dashboard&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="_blank">{l s="The Forge"}</a></dt> <dt><a href="https://qloapps.com/#contact" class="_blank">{l s="Contact Us!"}</a></dt>
<dd>{l s="Report issues in the Bug Tracker"}</dd> <dd>{l s="Contact us for any help"}</dd>
</dl>
<dl>
<dt><a href="http://www.prestashop.com/en/contact-us?utm_source=back-office&amp;utm_medium=dashboard&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="_blank">{l s="Contact Us!"}</a></dt>
<dd></dd>
</dl> </dl>
</section> </section>
</div> </div>

View File

@@ -25,22 +25,7 @@
{extends file="helpers/form/form.tpl"} {extends file="helpers/form/form.tpl"}
{block name="field"} {block name="field"}
{if $input.type == 'prestashop_addons'} {$smarty.block.parent}
<div class="col-lg-{if isset($input.col)}{$input.col|intval}{else}9{/if} {if !isset($input.label)}col-lg-offset-3{/if}">
{if isset($logged_on_addons) && $logged_on_addons}
<p><i class="icon-user"></i>{l s='You are currently connected as %s' sprintf=$username_addons}</p>
<a class="btn btn-default" href="#" id="addons_logout_button">
<i class="icon-signout"></i> {l s='Sign out from PrestaShop Addons'}
</a>
{else}
<a class="btn btn-default" data-toggle="modal" href="#" data-target="#modal_addons_connect">
<i class="icon-signout"></i> {l s='Sign in'}
</a>
{/if}
</div>
{else}
{$smarty.block.parent}
{/if}
{/block} {/block}
{block name="input"} {block name="input"}

View File

@@ -38,9 +38,9 @@
</h3> </h3>
<div class="alert alert-info"> <div class="alert alert-info">
<ul class="list-unstyled"> <ul class="list-unstyled">
<li>{l s='You can read information on CSV import at:'} {* <li>{l s='You can read information on CSV import at:'}
<a href="http://doc.prestashop.com/display/PS16/CSV+Import+Parameters" class="_blank">http://doc.prestashop.com/display/PS16/CSV+Import+Parameters</a> <a href="http://doc.prestashop.com/display/PS16/CSV+Import+Parameters" class="_blank">http://doc.prestashop.com/display/PS16/CSV+Import+Parameters</a>
</li> </li> *}
<li>{l s='Read more about the CSV format at:'} <li>{l s='Read more about the CSV format at:'}
<a href="http://en.wikipedia.org/wiki/Comma-separated_values" class="_blank">http://en.wikipedia.org/wiki/Comma-separated_values</a> <a href="http://en.wikipedia.org/wiki/Comma-separated_values" class="_blank">http://en.wikipedia.org/wiki/Comma-separated_values</a>
</li> </li>

View File

@@ -138,7 +138,7 @@
{l s='Store information'} {l s='Store information'}
</h3> </h3>
<p> <p>
<strong>{l s='PrestaShop version:'}</strong> {$shop.ps|escape:'html':'UTF-8'} <strong>{l s='Qloapps version:'}</strong> {$shop.qloappsV|escape:'html':'UTF-8'}
</p> </p>
<p> <p>
<strong>{l s='Shop URL:'}</strong> {$shop.url|escape:'html':'UTF-8'} <strong>{l s='Shop URL:'}</strong> {$shop.url|escape:'html':'UTF-8'}

View File

@@ -27,7 +27,7 @@
<h1 class="text-center"> <h1 class="text-center">
<img id="logo" src="{$img_dir}prestashop@2x.png" width="123px" alt="PrestaShop" /> <img id="logo" src="{$img_dir}prestashop@2x.png" width="123px" alt="PrestaShop" />
</h1> </h1>
<div class="text-center">{$ps_version}</div> <div class="text-center">{$qloapps_version}</div>
<div id="error" class="hide alert alert-danger"> <div id="error" class="hide alert alert-danger">
{if isset($errors)} {if isset($errors)}
<h4> <h4>
@@ -135,8 +135,8 @@
{hook h="displayAdminLogin"} {hook h="displayAdminLogin"}
<div id="login-footer"> <div id="login-footer">
<p class="text-center text-muted"> <p class="text-center text-muted">
<a href="http://www.prestashop.com/" onclick="return !window.open(this.href);"> <a href="https://webkul.com/" onclick="return !window.open(this.href);">
&copy; PrestaShop&#8482; 2007-{$smarty.now|date_format:"%Y"} - All rights reserved &copy; Webkul&#8482; 2015-{$smarty.now|date_format:"%Y"} - All rights reserved
</a> </a>
</p> </p>
<p class="text-center"> <p class="text-center">

View File

@@ -90,12 +90,12 @@
</li> </li>
{/if} {/if}
{if isset($module_update_link)} {if isset($module_update_link)}
<li> {* <li>
<a id="desc-module-update" class="toolbar_btn" href="{$module_update_link}" title="{l s='Update'}"> <a id="desc-module-update" class="toolbar_btn" href="{$module_update_link}" title="{l s='Update'}">
<i class="process-icon-refresh"></i> <i class="process-icon-refresh"></i>
<div>{l s='Check update'}</div> <div>{l s='Check update'}</div>
</a> </a>
</li> </li> *}
{/if} {/if}
<li> <li>
<a id="desc-module-hook" class="toolbar_btn" href="{$module_hook_link}" title="{l s='Manage hooks'}"> <a id="desc-module-hook" class="toolbar_btn" href="{$module_hook_link}" title="{l s='Manage hooks'}">

View File

@@ -22,17 +22,11 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
{if !isset($logged_on_addons) || !$logged_on_addons}
<div class="alert bg-info"> <div class="alert bg-info">
<div class="row modules-addons-info"> <div class="row modules-addons-info">
<h4>{l s='Addons membership provides access to all our PrestaShop modules.'}</h4> <h4>{l s='Explore all addon of Qloapps '}<a class="btn btn-default _blank" href="https://store.webkul.com/Qloapps.html"> @{l s='Qloapps addons'}</a></h4>
<p>{l s='Once connected, your new modules will be automatically installed.'}</p>
</div>
<div class="row modules-addons-buttons">
<a class="btn btn-default btn-primary _blank" href="{$addons_register_link|escape:'html':'UTF-8'}"><i class="icon-pencil"></i> {l s='Sign up'}</a><a href="#" class="addons_connect btn btn-default" data-toggle="modal" data-target="#modal_addons_connect" title="{l s='Connect to PrestaShop Marketplace account'}"><i class="icon-user"></i> {l s='Log in'}</a>
</div> </div>
</div> </div>
{/if}
{$kpis} {$kpis}
{if $add_permission eq '1'} {if $add_permission eq '1'}
<div id="module_install" class="row" style="{if !isset($smarty.post.downloadflag)}display: none;{/if}"> <div id="module_install" class="row" style="{if !isset($smarty.post.downloadflag)}display: none;{/if}">

View File

@@ -36,26 +36,26 @@
<div class="page-bar toolbarBox"> <div class="page-bar toolbarBox">
<div class="btn-toolbar"> <div class="btn-toolbar">
<ul class="nav nav-pills pull-right"> <ul class="nav nav-pills pull-right">
{if isset($upgrade_available) && $upgrade_available|@count} {* {if isset($upgrade_available) && $upgrade_available|@count}
{assign var='modules' value=''} {assign var='modules' value=''}
{foreach from=$upgrade_available item='module'} {foreach from=$upgrade_available item='module'}
{assign var='modules' value=$modules|cat:$module.name:'|'} {assign var='modules' value=$modules|cat:$module.name:'|'}
{/foreach} {/foreach}
{assign var='modules' value=$modules|substr:0:-1} {assign var='modules' value=$modules|substr:0:-1}
<li> <li>
<a id="desc-module-update-all" class="toolbar_btn" href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;updateAll=1" title="{l s='Update all'}"> <a id="desc-module-update-all" class="toolbar_btn" href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;updateAll=1" title="{l s='Update all'}">
<i class="process-icon-refresh"></i> <i class="process-icon-refresh"></i>
<div>{l s='Update all'}</div> <div>{l s='Update all'}</div>
</a> </a>
</li> </li>
{else} {else}
<li> <li>
<a id="desc-module-check-and-update-all" class="toolbar_btn" href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;check=1" title="{l s='Check for update'}"> <a id="desc-module-check-and-update-all" class="toolbar_btn" href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;check=1" title="{l s='Check for update'}">
<i class="process-icon-refresh"></i> <i class="process-icon-refresh"></i>
<div>{l s='Check for update'}</div> <div>{l s='Check for update'}</div>
</a> </a>
</li> </li>
{/if} {/if} *}
{if $add_permission eq '1' && ($context_mode != Context::MODE_HOST)} {if $add_permission eq '1' && ($context_mode != Context::MODE_HOST)}
<li> <li>
<a id="desc-module-new" class="toolbar_btn anchor" href="#" onclick="$('#module_install').slideToggle();" title="{l s='Add a new module'}"> <a id="desc-module-new" class="toolbar_btn anchor" href="#" onclick="$('#module_install').slideToggle();" title="{l s='Add a new module'}">
@@ -72,12 +72,12 @@
</li> </li>
{/if} {/if}
{if isset($help_link)} {if isset($help_link)}
<li> {* <li>
<a class="toolbar_btn btn-help" href="{$help_link|escape}" title="{l s='Help'}"> <a class="toolbar_btn btn-help" href="{$help_link|escape}" title="{l s='Help'}">
<i class="process-icon-help"></i> <i class="process-icon-help"></i>
<div>{l s='Help'}</div> <div>{l s='Help'}</div>
</a> </a>
</li> </li> *}
{/if} {/if}
</ul> </ul>
</div> </div>

View File

@@ -33,6 +33,11 @@
<td class="text-center"> <td class="text-center">
{$data.room_type} {$data.room_type}
</td> </td>
<td class="text-center">
<a href="{$link->getAdminLink('AdminAddHotel')}&amp;id={$data['id_hotel']}&amp;updatehtl_branch_info" target="_blank">
<span>{$data['hotel_name']}</span>
</a>
</td>
<td class="text-center"> <td class="text-center">
<span class="booking_duration_show">{$data.date_from|date_format:"%d-%m-%Y"}&nbsp-&nbsp {$data.date_to|date_format:"%d-%m-%Y"}</span> <span class="booking_duration_show">{$data.date_from|date_format:"%d-%m-%Y"}&nbsp-&nbsp {$data.date_to|date_format:"%d-%m-%Y"}</span>
@@ -63,7 +68,7 @@
<span class="product_original_price {if $data.feature_price_diff > 0}room_type_old_price{/if}" {if $data.feature_price_diff < 0} style="display:none;"{/if}> <span class="product_original_price {if $data.feature_price_diff > 0}room_type_old_price{/if}" {if $data.feature_price_diff < 0} style="display:none;"{/if}>
{convertPriceWithCurrency price=$data.unit_price_without_reduction_tax_incl currency=$currency->id} {convertPriceWithCurrency price=$data.unit_price_without_reduction_tax_incl currency=$currency->id}
</span>&nbsp; </span>&nbsp;
<span class="room_type_current_price" {if !$data.feature_price_diff}style="display:none;"{/if}> <span class="room_type_current_price" {if !$data.feature_price_diff}style="display:none;"{/if}>
{convertPriceWithCurrency price=$data.paid_unit_price_tax_incl currency=$currency->id} {convertPriceWithCurrency price=$data.paid_unit_price_tax_incl currency=$currency->id}
</span> </span>
</td> </td>
@@ -91,7 +96,7 @@
</div> </div>
{/if} {/if}
</td> </td>
<td class="text-center stage_name"> <td class="text-center stage_name">
<p> <p>
{if isset($data['stage_name']) && $data['stage_name']} {if isset($data['stage_name']) && $data['stage_name']}
@@ -173,6 +178,6 @@
.room_type_old_price { .room_type_old_price {
text-decoration: line-through; text-decoration: line-through;
color:#979797; color:#979797;
font-size:12px; font-size:12px;
} }
</style> </style>

View File

@@ -280,6 +280,7 @@
<table class="table table-responsive"> <table class="table table-responsive">
<tr> <tr>
<th>{l s='Room No.'}</th> <th>{l s='Room No.'}</th>
<th>{l s='Hotel Name'}</th>
<th>{l s='Date From'}</th> <th>{l s='Date From'}</th>
<th>{l s='Date To'}</th> <th>{l s='Date To'}</th>
<th>{l s='Order Status'}</th> <th>{l s='Order Status'}</th>
@@ -290,6 +291,11 @@
<td> <td>
{$data['room_num']} {$data['room_num']}
</td> </td>
<td>
<a href="{$link->getAdminLink('AdminAddHotel')}&amp;id={$data['id_hotel']}&amp;updatehtl_branch_info" target="_blank">
<span>{$data['hotel_name']}</span>
</a>
</td>
<td> <td>
{$data['date_from']|date_format:"%d-%m-%Y"} {$data['date_from']|date_format:"%d-%m-%Y"}
</td> </td>
@@ -301,7 +307,7 @@
<select style="display:inline;width:40%;" name="booking_order_status"> <select style="display:inline;width:40%;" name="booking_order_status">
{foreach from=$hotel_order_status item=state} {foreach from=$hotel_order_status item=state}
<option value="{$state['id']|intval}" {if isset($data.id_status) && $state.id == $data.id_status} selected="selected" disabled="disabled"{/if}>{$state.status|escape}</option> <option value="{$state['id']|intval}" {if isset($data.id_status) && $state.id == $data.id_status} selected="selected" disabled="disabled"{/if}>{$state.status|escape}</option>
{/foreach} {/foreach}
</select> </select>
<input type="hidden" name="date_from" value="{$data['date_from']}" /> <input type="hidden" name="date_from" value="{$data['date_from']}" />
<input type="hidden" name="date_to" value="{$data['date_to']}" /> <input type="hidden" name="date_to" value="{$data['date_to']}" />
@@ -319,7 +325,7 @@
<td>{l s='No data found.'}</td> <td>{l s='No data found.'}</td>
</tr> </tr>
{/if} {/if}
</table> </table>
</div> </div>
</div> </div>
</div> </div>
@@ -969,6 +975,7 @@
<th class="text-center"><span class="title_box">{l s='Room No.'}</span></th> <th class="text-center"><span class="title_box">{l s='Room No.'}</span></th>
<th class="text-center"><span class="title_box">{l s='Room Image'}</th> <th class="text-center"><span class="title_box">{l s='Room Image'}</th>
<th class="text-center"><span class="title_box">{l s='Room Type'}</span></th> <th class="text-center"><span class="title_box">{l s='Room Type'}</span></th>
<th class="text-center"><span class="title_box">{l s='Hotel Name'}</span></th>
<th class="text-center"><span class="title_box">{l s='Duration'}</span></th> <th class="text-center"><span class="title_box">{l s='Duration'}</span></th>
<th class="text-center"><span class="title_box">{l s='Unit Price'}</span></th> <th class="text-center"><span class="title_box">{l s='Unit Price'}</span></th>
<th class="text-center"><span class="title_box">{l s='Total Price'}</span></th> <th class="text-center"><span class="title_box">{l s='Total Price'}</span></th>
@@ -1096,7 +1103,7 @@
{/if} {/if}
</div> </div>
</div> <!-- by webkul to hide unnessary things in the page--> *} </div> <!-- by webkul to hide unnessary things in the page--> *}
<!-- For Due amount submit panel (by webkul) --> <!-- For Due amount submit panel (by webkul) -->
{if isset($order_adv_dtl)} {if isset($order_adv_dtl)}
<div class="col-xs-6"> <div class="col-xs-6">
@@ -1134,17 +1141,17 @@
</div> </div>
</td> </td>
</tr> </tr>
{/if} {/if}
</table> </table>
</div> </div>
{if ($order_adv_dtl['total_order_amount'] - $order_adv_dtl['total_paid_amount'])|round:2 > 0} {if ($order_adv_dtl['total_order_amount'] - $order_adv_dtl['total_paid_amount'])|round:2 > 0}
<button type="submit" class="btn btn-primary" name="payDueAmount" style="margin-top:10px;">{l s="Submit Amount"}</button> <button type="submit" class="btn btn-primary" name="payDueAmount" style="margin-top:10px;">{l s="Submit Amount"}</button>
{/if} {/if}
</form> </form>
</div> </div>
</div> </div>
{/if} {/if}
<div class="col-xs-6 pull-right"> <div class="col-xs-6 pull-right">
<div class="panel panel-vouchers" style="{if !sizeof($discounts)}display:none;{/if}"> <div class="panel panel-vouchers" style="{if !sizeof($discounts)}display:none;{/if}">
{if (sizeof($discounts) || $can_edit)} {if (sizeof($discounts) || $can_edit)}
@@ -1281,9 +1288,9 @@
</td> </td>
</tr> </tr>
{/if} {/if}
{assign var=order_total_price value=$order->total_paid_tax_incl} {assign var=order_total_price value=$order->total_paid_tax_incl}
<tr id="total_order"> <tr id="total_order">
<td class="text-right"><strong>{l s='Total'}</strong></td> <td class="text-right"><strong>{l s='Total'}</strong></td>
<td class="amount text-right nowrap"> <td class="amount text-right nowrap">
@@ -1643,7 +1650,7 @@
$(".realloc_avail_rooms_container").empty().text(no_rm_avail_txt); $(".realloc_avail_rooms_container").empty().text(no_rm_avail_txt);
} }
}); });
/*For reallocating rooms in the modal*/ /*For reallocating rooms in the modal*/
$("#realloc_allocated_rooms").on('click', function(e){ $("#realloc_allocated_rooms").on('click', function(e){
$(".error_text").text(''); $(".error_text").text('');
@@ -1663,7 +1670,7 @@
return false; return false;
} }
}); });
/*END*/ /*END*/
$(".textarea-autosize").autosize(); $(".textarea-autosize").autosize();

View File

@@ -1,806 +0,0 @@
<?php
/*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class InstallModelInstall extends InstallAbstractModel
{
const SETTINGS_FILE = 'config/settings.inc.php';
/**
* @var FileLogger
*/
public $logger;
public function __construct()
{
parent::__construct();
$this->logger = new FileLogger();
if (is_writable(_PS_ROOT_DIR_.'/log/')) {
$this->logger->setFilename(_PS_ROOT_DIR_.'/log/'.@date('Ymd').'_installation.log');
}
}
public function setError($errors)
{
if (!is_array($errors)) {
$errors = array($errors);
}
parent::setError($errors);
foreach ($errors as $error) {
$this->logger->logError($error);
}
}
/**
* Generate settings file
*/
public function generateSettingsFile($database_server, $database_login, $database_password, $database_name, $database_prefix, $database_engine)
{
// Check permissions for settings file
if (file_exists(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE) && !is_writable(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE)) {
$this->setError($this->language->l('%s file is not writable (check permissions)', self::SETTINGS_FILE));
return false;
} elseif (!file_exists(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE) && !is_writable(_PS_ROOT_DIR_.'/'.dirname(self::SETTINGS_FILE))) {
$this->setError($this->language->l('%s folder is not writable (check permissions)', dirname(self::SETTINGS_FILE)));
return false;
}
// Generate settings content and write file
$settings_constants = array(
'_DB_SERVER_' => $database_server,
'_DB_NAME_' => $database_name,
'_DB_USER_' => $database_login,
'_DB_PASSWD_' => $database_password,
'_DB_PREFIX_' => $database_prefix,
'_MYSQL_ENGINE_' => $database_engine,
'_PS_CACHING_SYSTEM_' => 'CacheMemcache',
'_PS_CACHE_ENABLED_' => '0',
'_COOKIE_KEY_' => Tools::passwdGen(56),
'_COOKIE_IV_' => Tools::passwdGen(8),
'_PS_CREATION_DATE_' => date('Y-m-d'),
'_PS_VERSION_' => _PS_INSTALL_VERSION_,
);
// If mcrypt is activated, add Rijndael 128 configuration
if (function_exists('mcrypt_encrypt')) {
$settings_constants['_RIJNDAEL_KEY_'] = Tools::passwdGen(mcrypt_get_key_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB));
$settings_constants['_RIJNDAEL_IV_'] = base64_encode(mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND));
}
$settings_content = "<?php\n";
foreach ($settings_constants as $constant => $value) {
if ($constant == '_PS_VERSION_') {
$settings_content .= 'if (!defined(\''.$constant.'\'))'."\n\t";
}
$settings_content .= "define('$constant', '".str_replace('\'', '\\\'', $value)."');\n";
}
if (!file_put_contents(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE, $settings_content)) {
$this->setError($this->language->l('Cannot write settings file'));
return false;
}
return true;
}
/**
* PROCESS : installDatabase
* Generate settings file and create database structure
*/
public function installDatabase($clear_database = false)
{
// Clear database (only tables with same prefix)
require_once _PS_ROOT_DIR_.'/'.self::SETTINGS_FILE;
if ($clear_database) {
$this->clearDatabase();
}
$allowed_collation = array('utf8_general_ci', 'utf8_unicode_ci');
$collation_database = Db::getInstance()->getValue('SELECT @@collation_database');
// Install database structure
$sql_loader = new InstallSqlLoader();
$sql_loader->setMetaData(array(
'PREFIX_' => _DB_PREFIX_,
'ENGINE_TYPE' => _MYSQL_ENGINE_,
'COLLATION' => (empty($collation_database) || !in_array($collation_database, $allowed_collation)) ? '' : 'COLLATE '.$collation_database
));
try {
$sql_loader->parse_file(_PS_INSTALL_DATA_PATH_.'db_structure.sql');
} catch (PrestashopInstallerException $e) {
$this->setError($this->language->l('Database structure file not found'));
return false;
}
if ($errors = $sql_loader->getErrors()) {
foreach ($errors as $error) {
$this->setError($this->language->l('SQL error on query <i>%s</i>', $error['error']));
}
return false;
}
return true;
}
/**
* Clear database (only tables with same prefix)
*
* @param bool $truncate If true truncate the table, if false drop the table
*/
public function clearDatabase($truncate = false)
{
foreach (Db::getInstance()->executeS('SHOW TABLES') as $row) {
$table = current($row);
if (!_DB_PREFIX_ || preg_match('#^'._DB_PREFIX_.'#i', $table)) {
Db::getInstance()->execute((($truncate) ? 'TRUNCATE' : 'DROP TABLE').' `'.$table.'`');
}
}
}
/**
* PROCESS : installDefaultData
* Create default shop and languages
*/
public function installDefaultData($shop_name, $iso_country = false, $all_languages = false, $clear_database = false)
{
if ($clear_database) {
$this->clearDatabase(true);
}
// Install first shop
if (!$this->createShop($shop_name)) {
return false;
}
// Install languages
try {
if (!$all_languages) {
$iso_codes_to_install = array($this->language->getLanguageIso());
if ($iso_country) {
$version = str_replace('.', '', _PS_VERSION_);
$version = substr($version, 0, 2);
$localization_file_content = $this->getLocalizationPackContent($version, $iso_country);
if ($xml = @simplexml_load_string($localization_file_content)) {
foreach ($xml->languages->language as $language) {
$iso_codes_to_install[] = (string)$language->attributes()->iso_code;
}
}
}
} else {
$iso_codes_to_install = null;
}
$iso_codes_to_install = array_flip(array_flip($iso_codes_to_install));
$languages = $this->installLanguages($iso_codes_to_install);
} catch (PrestashopInstallerException $e) {
$this->setError($e->getMessage());
return false;
}
$flip_languages = array_flip($languages);
$id_lang = (!empty($flip_languages[$this->language->getLanguageIso()])) ? $flip_languages[$this->language->getLanguageIso()] : 1;
Configuration::updateGlobalValue('PS_LANG_DEFAULT', $id_lang);
Configuration::updateGlobalValue('PS_VERSION_DB', _PS_INSTALL_VERSION_);
Configuration::updateGlobalValue('PS_INSTALL_VERSION', _PS_INSTALL_VERSION_);
return true;
}
/**
* PROCESS : populateDatabase
* Populate database with default data
*/
public function populateDatabase($entity = null)
{
$languages = array();
foreach (Language::getLanguages(true) as $lang) {
$languages[$lang['id_lang']] = $lang['iso_code'];
}
// Install XML data (data/xml/ folder)
$xml_loader = new InstallXmlLoader();
$xml_loader->setLanguages($languages);
if (isset($this->xml_loader_ids) && $this->xml_loader_ids) {
$xml_loader->setIds($this->xml_loader_ids);
}
if ($entity) {
$xml_loader->populateEntity($entity);
} else {
$xml_loader->populateFromXmlFiles();
}
if ($errors = $xml_loader->getErrors()) {
$this->setError($errors);
return false;
}
// IDS from xmlLoader are stored in order to use them for fixtures
$this->xml_loader_ids = $xml_loader->getIds();
unset($xml_loader);
// Install custom SQL data (db_data.sql file)
if (file_exists(_PS_INSTALL_DATA_PATH_.'db_data.sql')) {
$sql_loader = new InstallSqlLoader();
$sql_loader->setMetaData(array(
'PREFIX_' => _DB_PREFIX_,
'ENGINE_TYPE' => _MYSQL_ENGINE_,
));
$sql_loader->parse_file(_PS_INSTALL_DATA_PATH_.'db_data.sql', false);
if ($errors = $sql_loader->getErrors()) {
$this->setError($errors);
return false;
}
}
// Copy language default images (we do this action after database in populated because we need image types information)
foreach ($languages as $iso) {
$this->copyLanguageImages($iso);
}
return true;
}
public function createShop($shop_name)
{
// Create default group shop
$shop_group = new ShopGroup();
$shop_group->name = 'Default';
$shop_group->active = true;
if (!$shop_group->add()) {
$this->setError($this->language->l('Cannot create group shop').' / '.Db::getInstance()->getMsgError());
return false;
}
// Create default shop
$shop = new Shop();
$shop->active = true;
$shop->id_shop_group = $shop_group->id;
$shop->id_category = 2;
$shop->id_theme = 1;
$shop->name = $shop_name;
if (!$shop->add()) {
$this->setError($this->language->l('Cannot create shop').' / '.Db::getInstance()->getMsgError());
return false;
}
Context::getContext()->shop = $shop;
// Create default shop URL
$shop_url = new ShopUrl();
$shop_url->domain = Tools::getHttpHost();
$shop_url->domain_ssl = Tools::getHttpHost();
$shop_url->physical_uri = __PS_BASE_URI__;
$shop_url->id_shop = $shop->id;
$shop_url->main = true;
$shop_url->active = true;
if (!$shop_url->add()) {
$this->setError($this->language->l('Cannot create shop URL').' / '.Db::getInstance()->getMsgError());
return false;
}
return true;
}
/**
* Install languages
*
* @return array Association between ID and iso array(id_lang => iso, ...)
*/
public function installLanguages($languages_list = null)
{
if ($languages_list == null || !is_array($languages_list) || !count($languages_list)) {
$languages_list = $this->language->getIsoList();
}
$languages_available = $this->language->getIsoList();
$languages = array();
foreach ($languages_list as $iso) {
if (!in_array($iso, $languages_available)) {
continue;
}
if (!file_exists(_PS_INSTALL_LANGS_PATH_.$iso.'/language.xml')) {
throw new PrestashopInstallerException($this->language->l('File "language.xml" not found for language iso "%s"', $iso));
}
if (!$xml = @simplexml_load_file(_PS_INSTALL_LANGS_PATH_.$iso.'/language.xml')) {
throw new PrestashopInstallerException($this->language->l('File "language.xml" not valid for language iso "%s"', $iso));
}
$params_lang = array(
'name' => (string)$xml->name,
'iso_code' => substr((string)$xml->language_code, 0, 2),
'allow_accented_chars_url' => (string)$xml->allow_accented_chars_url
);
if (InstallSession::getInstance()->safe_mode) {
Language::checkAndAddLanguage($iso, false, true, $params_lang);
} else {
Language::downloadAndInstallLanguagePack($iso, _PS_INSTALL_VERSION_, $params_lang);
}
Language::loadLanguages();
Tools::clearCache();
if (!$id_lang = Language::getIdByIso($iso, true)) {
throw new PrestashopInstallerException($this->language->l('Cannot install language "%s"', ($xml->name) ? $xml->name : $iso));
}
$languages[$id_lang] = $iso;
// Copy language flag
if (is_writable(_PS_IMG_DIR_.'l/')) {
if (!copy(_PS_INSTALL_LANGS_PATH_.$iso.'/flag.jpg', _PS_IMG_DIR_.'l/'.$id_lang.'.jpg')) {
throw new PrestashopInstallerException($this->language->l('Cannot copy flag language "%s"', _PS_INSTALL_LANGS_PATH_.$iso.'/flag.jpg => '._PS_IMG_DIR_.'l/'.$id_lang.'.jpg'));
}
}
}
return $languages;
}
public function copyLanguageImages($iso)
{
$img_path = _PS_INSTALL_LANGS_PATH_.$iso.'/img/';
if (!is_dir($img_path)) {
return;
}
$list = array(
'products' => _PS_PROD_IMG_DIR_,
'categories' => _PS_CAT_IMG_DIR_,
'manufacturers' => _PS_MANU_IMG_DIR_,
'suppliers' => _PS_SUPP_IMG_DIR_,
'scenes' => _PS_SCENE_IMG_DIR_,
'stores' => _PS_STORE_IMG_DIR_,
null => _PS_IMG_DIR_.'l/', // Little trick to copy images in img/l/ path with all types
);
foreach ($list as $cat => $dst_path) {
if (!is_writable($dst_path)) {
continue;
}
copy($img_path.$iso.'.jpg', $dst_path.$iso.'.jpg');
$types = ImageType::getImagesTypes($cat);
foreach ($types as $type) {
if (file_exists($img_path.$iso.'-default-'.$type['name'].'.jpg')) {
copy($img_path.$iso.'-default-'.$type['name'].'.jpg', $dst_path.$iso.'-default-'.$type['name'].'.jpg');
} else {
ImageManager::resize($img_path.$iso.'.jpg', $dst_path.$iso.'-default-'.$type['name'].'.jpg', $type['width'], $type['height']);
}
}
}
}
private static $_cache_localization_pack_content = null;
public function getLocalizationPackContent($version, $country)
{
if (InstallModelInstall::$_cache_localization_pack_content === null || array_key_exists($country, InstallModelInstall::$_cache_localization_pack_content)) {
$path_cache_file = _PS_CACHE_DIR_.'sandbox'.DIRECTORY_SEPARATOR.$version.$country.'.xml';
if (is_file($path_cache_file)) {
$localization_file_content = file_get_contents($path_cache_file);
} else {
$localization_file_content = @Tools::file_get_contents('http://api.prestashop.com/localization/'.$version.'/'.$country.'.xml');
if (!@simplexml_load_string($localization_file_content)) {
$localization_file_content = false;
}
if (!$localization_file_content) {
$localization_file = _PS_ROOT_DIR_.'/localization/default.xml';
if (file_exists(_PS_ROOT_DIR_.'/localization/'.$country.'.xml')) {
$localization_file = _PS_ROOT_DIR_.'/localization/'.$country.'.xml';
}
$localization_file_content = file_get_contents($localization_file);
}
file_put_contents($path_cache_file, $localization_file_content);
}
InstallModelInstall::$_cache_localization_pack_content[$country] = $localization_file_content;
}
return isset(InstallModelInstall::$_cache_localization_pack_content[$country]) ? InstallModelInstall::$_cache_localization_pack_content[$country] : false;
}
/**
* PROCESS : configureShop
* Set default shop configuration
*/
public function configureShop(array $data = array())
{
//clear image cache in tmp folder
if (file_exists(_PS_TMP_IMG_DIR_)) {
foreach (scandir(_PS_TMP_IMG_DIR_) as $file) {
if ($file[0] != '.' && $file != 'index.php') {
Tools::deleteFile(_PS_TMP_IMG_DIR_.$file);
}
}
}
$default_data = array(
'shop_name' => 'My Shop',
'shop_activity' => '',
'shop_country' => 'us',
'shop_timezone' => 'US/Eastern',
'use_smtp' => false,
'smtp_encryption' => 'off',
'smtp_port' => 25,
'rewrite_engine' => false,
);
foreach ($default_data as $k => $v) {
if (!isset($data[$k])) {
$data[$k] = $v;
}
}
Context::getContext()->shop = new Shop(1);
Configuration::loadConfiguration();
// use the old image system if the safe_mod is enabled otherwise the installer will fail with the fixtures installation
if (InstallSession::getInstance()->safe_mode) {
Configuration::updateGlobalValue('PS_LEGACY_IMAGES', 1);
}
$id_country = (int)Country::getByIso($data['shop_country']);
// Set default configuration
Configuration::updateGlobalValue('PS_SHOP_DOMAIN', Tools::getHttpHost());
Configuration::updateGlobalValue('PS_SHOP_DOMAIN_SSL', Tools::getHttpHost());
Configuration::updateGlobalValue('PS_INSTALL_VERSION', _PS_INSTALL_VERSION_);
Configuration::updateGlobalValue('PS_LOCALE_LANGUAGE', $this->language->getLanguageIso());
Configuration::updateGlobalValue('PS_SHOP_NAME', $data['shop_name']);
Configuration::updateGlobalValue('PS_SHOP_ACTIVITY', $data['shop_activity']);
Configuration::updateGlobalValue('PS_COUNTRY_DEFAULT', $id_country);
Configuration::updateGlobalValue('PS_LOCALE_COUNTRY', $data['shop_country']);
Configuration::updateGlobalValue('PS_TIMEZONE', $data['shop_timezone']);
Configuration::updateGlobalValue('PS_CONFIGURATION_AGREMENT', (int)$data['configuration_agrement']);
// Set mails configuration
Configuration::updateGlobalValue('PS_MAIL_METHOD', ($data['use_smtp']) ? 2 : 1);
Configuration::updateGlobalValue('PS_MAIL_SMTP_ENCRYPTION', $data['smtp_encryption']);
Configuration::updateGlobalValue('PS_MAIL_SMTP_PORT', $data['smtp_port']);
// Set default rewriting settings
Configuration::updateGlobalValue('PS_REWRITING_SETTINGS', $data['rewrite_engine']);
// Activate rijndael 128 encrypt algorihtm if mcrypt is activated
Configuration::updateGlobalValue('PS_CIPHER_ALGORITHM', function_exists('mcrypt_encrypt') ? 1 : 0);
$groups = Group::getGroups((int)Configuration::get('PS_LANG_DEFAULT'));
$groups_default = Db::getInstance()->executeS('SELECT `name` FROM '._DB_PREFIX_.'configuration WHERE `name` LIKE "PS_%_GROUP" ORDER BY `id_configuration`');
foreach ($groups_default as &$group_default) {
if (is_array($group_default) && isset($group_default['name'])) {
$group_default = $group_default['name'];
}
}
if (is_array($groups) && count($groups)) {
foreach ($groups as $key => $group) {
if (Configuration::get($groups_default[$key]) != $groups[$key]['id_group']) {
Configuration::updateGlobalValue($groups_default[$key], (int)$groups[$key]['id_group']);
}
}
}
$states = Db::getInstance()->executeS('SELECT `id_order_state` FROM '._DB_PREFIX_.'order_state ORDER by `id_order_state`');
$states_default = Db::getInstance()->executeS('SELECT MIN(`id_configuration`), `name` FROM '._DB_PREFIX_.'configuration WHERE `name` LIKE "PS_OS_%" GROUP BY `value` ORDER BY`id_configuration`');
foreach ($states_default as &$state_default) {
if (is_array($state_default) && isset($state_default['name'])) {
$state_default = $state_default['name'];
}
}
if (is_array($states) && count($states)) {
foreach ($states as $key => $state) {
if (Configuration::get($states_default[$key]) != $states[$key]['id_order_state']) {
Configuration::updateGlobalValue($states_default[$key], (int)$states[$key]['id_order_state']);
}
}
/* deprecated order state */
Configuration::updateGlobalValue('PS_OS_OUTOFSTOCK_PAID', (int)Configuration::get('PS_OS_OUTOFSTOCK'));
}
// Set logo configuration
if (file_exists(_PS_IMG_DIR_.'logo.png')) {
list($width, $height) = getimagesize(_PS_IMG_DIR_.'logo.png');
Configuration::updateGlobalValue('SHOP_LOGO_WIDTH', round($width));
Configuration::updateGlobalValue('SHOP_LOGO_HEIGHT', round($height));
}
// Disable cache for debug mode
if (_PS_MODE_DEV_) {
Configuration::updateGlobalValue('PS_SMARTY_CACHE', 1);
}
// Active only the country selected by the merchant
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'country SET active = 0 WHERE id_country != '.(int)$id_country);
// Set localization configuration
$version = str_replace('.', '', _PS_VERSION_);
$version = substr($version, 0, 2);
$localization_file_content = $this->getLocalizationPackContent($version, $data['shop_country']);
$locale = new LocalizationPackCore();
$locale->loadLocalisationPack($localization_file_content, '', true);
// Create default employee
if (isset($data['admin_firstname']) && isset($data['admin_lastname']) && isset($data['admin_password']) && isset($data['admin_email'])) {
$employee = new Employee();
$employee->firstname = Tools::ucfirst($data['admin_firstname']);
$employee->lastname = Tools::ucfirst($data['admin_lastname']);
$employee->email = $data['admin_email'];
$employee->passwd = md5(_COOKIE_KEY_.$data['admin_password']);
$employee->last_passwd_gen = date('Y-m-d h:i:s', strtotime('-360 minutes'));
$employee->bo_theme = 'default';
$employee->default_tab = 1;
$employee->active = true;
$employee->optin = true;
$employee->id_profile = 1;
$employee->id_lang = Configuration::get('PS_LANG_DEFAULT');
$employee->bo_menu = 1;
if (!$employee->add()) {
$this->setError($this->language->l('Cannot create admin account'));
return false;
}
} else {
$this->setError($this->language->l('Cannot create admin account'));
return false;
}
// Update default contact
if (isset($data['admin_email'])) {
Configuration::updateGlobalValue('PS_SHOP_EMAIL', $data['admin_email']);
$contacts = new PrestaShopCollection('Contact');
foreach ($contacts as $contact) {
$contact->email = $data['admin_email'];
$contact->update();
}
}
if (!@Tools::generateHtaccess(null, $data['rewrite_engine'])) {
Configuration::updateGlobalValue('PS_REWRITING_SETTINGS', 0);
}
return true;
}
public function getModulesList()
{
$modules = array();
if (false) {
foreach (scandir(_PS_MODULE_DIR_) as $module) {
if ($module[0] != '.' && is_dir(_PS_MODULE_DIR_.$module) && file_exists(_PS_MODULE_DIR_.$module.'/'.$module.'.php')) {
$modules[] = $module;
}
}
} else {
$modules = array(
'hotelreservationsystem',
'blocknavigationmenu',
'blocknewsletter',
'blocksocial',
'wkfooterblock',
'wkroomsearchblock',
'wkhotelfiltersearchblock',
'wkhotelfilterblock',
'wkabouthotelblock',
'wkhotelfeaturesblock',
'wktestimonialblock',
'wkthemeconfigurator',
'bankwire',
'blockcart',
'blockmyaccount',
'blockuserinfo',
'cheque',
'blockcurrencies',
'blocklanguages',
);
}
return $modules;
}
public function getAddonsModulesList($params = array())
{
$addons_modules = array();
$content = Tools::addonsRequest('install-modules', $params);
$xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
if ($xml !== false and isset($xml->module)) {
foreach ($xml->module as $modaddons) {
$addons_modules[] = array('id_module' => $modaddons->id, 'name' => $modaddons->name);
}
}
return $addons_modules;
}
/**
* PROCESS : installModules
* Download module from addons and Install all modules in ~/modules/ directory
*/
public function installModulesAddons($module = null)
{
$addons_modules = $module ? array($module) : $this->getAddonsModulesList();
$modules = array();
if (!InstallSession::getInstance()->safe_mode) {
foreach ($addons_modules as $addons_module) {
if (file_put_contents(_PS_MODULE_DIR_.$addons_module['name'].'.zip', Tools::addonsRequest('module', array('id_module' => $addons_module['id_module'])))) {
if (Tools::ZipExtract(_PS_MODULE_DIR_.$addons_module['name'].'.zip', _PS_MODULE_DIR_)) {
$modules[] = (string)$addons_module['name'];//if the module has been unziped we add the name in the modules list to install
unlink(_PS_MODULE_DIR_.$addons_module['name'].'.zip');
}
}
}
}
return count($modules) ? $this->installModules($modules) : true;
}
/**
* PROCESS : installModules
* Download module from addons and Install all modules in ~/modules/ directory
*/
public function installModules($module = null)
{
if ($module && !is_array($module)) {
$module = array($module);
}
$modules = $module ? $module : $this->getModulesList();
Module::updateTranslationsAfterInstall(false);
$errors = array();
foreach ($modules as $module_name) {
if (!file_exists(_PS_MODULE_DIR_.$module_name.'/'.$module_name.'.php')) {
continue;
}
$module = Module::getInstanceByName($module_name);
if (!$module->install()) {
$errors[] = $this->language->l('Cannot install module "%s"', $module_name);
}
}
if ($errors) {
$this->setError($errors);
return false;
}
Module::updateTranslationsAfterInstall(true);
Language::updateModulesTranslations($modules);
return true;
}
/**
* PROCESS : installFixtures
* Install fixtures (E.g. demo products)
*/
public function installFixtures($entity = null, array $data = array())
{
$fixtures_path = _PS_INSTALL_FIXTURES_PATH_.'fashion/';
$fixtures_name = 'fashion';
$zip_file = _PS_ROOT_DIR_.'/download/fixtures.zip';
$temp_dir = _PS_ROOT_DIR_.'/download/fixtures/';
// try to download fixtures if no low memory mode
if ($entity === null) {
if (Tools::copy('http://api.prestashop.com/fixtures/'.$data['shop_country'].'/'.$data['shop_activity'].'/fixtures.zip', $zip_file)) {
Tools::deleteDirectory($temp_dir, true);
if (Tools::ZipTest($zip_file)) {
if (Tools::ZipExtract($zip_file, $temp_dir)) {
$files = scandir($temp_dir);
if (count($files)) {
foreach ($files as $file) {
if (!preg_match('/^\./', $file) && is_dir($temp_dir.$file.'/')) {
$fixtures_path = $temp_dir.$file.'/';
$fixtures_name = $file;
break;
}
}
}
}
}
}
}
// Load class (use fixture class if one exists, or use InstallXmlLoader)
if (file_exists($fixtures_path.'/install.php')) {
require_once $fixtures_path.'/install.php';
$class = 'InstallFixtures'.Tools::toCamelCase($fixtures_name);
if (!class_exists($class, false)) {
$this->setError($this->language->l('Fixtures class "%s" not found', $class));
return false;
}
$xml_loader = new $class();
if (!$xml_loader instanceof InstallXmlLoader) {
$this->setError($this->language->l('"%s" must be an instance of "InstallXmlLoader"', $class));
return false;
}
} else {
$xml_loader = new InstallXmlLoader();
}
// Install XML data (data/xml/ folder)
$xml_loader->setFixturesPath($fixtures_path);
if (isset($this->xml_loader_ids) && $this->xml_loader_ids) {
$xml_loader->setIds($this->xml_loader_ids);
}
$languages = array();
foreach (Language::getLanguages(false) as $lang) {
$languages[$lang['id_lang']] = $lang['iso_code'];
}
$xml_loader->setLanguages($languages);
if ($entity) {
$xml_loader->populateEntity($entity);
} else {
$xml_loader->populateFromXmlFiles();
Tools::deleteDirectory($temp_dir, true);
@unlink($zip_file);
}
if ($errors = $xml_loader->getErrors()) {
$this->setError($errors);
return false;
}
// IDS from xmlLoader are stored in order to use them for fixtures
$this->xml_loader_ids = $xml_loader->getIds();
unset($xml_loader);
// Index products in search tables
Search::indexation(true);
return true;
}
/**
* PROCESS : installTheme
* Install theme
*/
public function installTheme()
{
// @todo do a real install of the theme
$sql_loader = new InstallSqlLoader();
$sql_loader->setMetaData(array(
'PREFIX_' => _DB_PREFIX_,
'ENGINE_TYPE' => _MYSQL_ENGINE_,
));
$sql_loader->parse_file(_PS_INSTALL_DATA_PATH_.'theme.sql', false);
if ($errors = $sql_loader->getErrors()) {
$this->setError($errors);
return false;
}
}
}

View File

@@ -335,7 +335,7 @@ $(document).ready(function () {
</div> </div>
</div> </div>
</div> </div>
<div class="row" id="type_amount"> <div class="row" id="type_amount">
<label class="control-label col-sm-2">{l s='Amount'}</label> <label class="control-label col-sm-2">{l s='Amount'}</label>
<div class="col-sm-4 col-lg-3"> <div class="col-sm-4 col-lg-3">
@@ -400,7 +400,7 @@ $(document).ready(function () {
{foreach $productFeaturePrices as $featurePlan} {foreach $productFeaturePrices as $featurePlan}
<tr> <tr>
<td> <td>
{$featurePlan['id']} {$featurePlan['id_feature_price']}
</td> </td>
<td> <td>
{$featurePlan['feature_price_name']} {$featurePlan['feature_price_name']}
@@ -637,19 +637,19 @@ $(document).ready(function () {
$(".adv_payment_active").on('change',function() $(".adv_payment_active").on('change',function()
{ {
var adv_payment = $(".adv_payment_active:checked").val(); var adv_payment = $(".adv_payment_active:checked").val();
if (adv_payment == 1) if (adv_payment == 1)
$(".adv_payment_field").show(); $(".adv_payment_field").show();
else if (adv_payment == 0) else if (adv_payment == 0)
$(".adv_payment_field").hide(); $(".adv_payment_field").hide();
}); });
var payment_type = $(".payment_type:checked").val(); var payment_type = $(".payment_type:checked").val();
if (payment_type == 1) if (payment_type == 1)
{ {
$("#type_percent").show(); $("#type_percent").show();
$("#type_amount").hide(); $("#type_amount").hide();
} }
else if (payment_type == 2) else if (payment_type == 2)
{ {
$("#type_percent").hide(); $("#type_percent").hide();
$("#type_amount").show(); $("#type_amount").show();
@@ -658,12 +658,12 @@ $(document).ready(function () {
$(".payment_type").on('change',function() $(".payment_type").on('change',function()
{ {
var payment_type = $(".payment_type:checked").val(); var payment_type = $(".payment_type:checked").val();
if (payment_type == 1) if (payment_type == 1)
{ {
$("#type_percent").show(); $("#type_percent").show();
$("#type_amount").hide(); $("#type_amount").hide();
} }
else if (payment_type == 2) else if (payment_type == 2)
{ {
$("#type_percent").hide(); $("#type_percent").hide();
$("#type_amount").show(); $("#type_amount").show();

View File

@@ -159,27 +159,7 @@
{block name="after"} {block name="after"}
<div class="panel clearfix" id="prestastore-content"></div>
<script type="text/javascript"> <script type="text/javascript">
$.ajax({
type: 'POST',
headers: { "cache-control": "no-cache" },
url: 'ajax-tab.php?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType : "html",
data: {
tab: 'AdminThemes',
token: '{$token|escape:'html':'UTF-8'}',
ajax: '1',
action:'getAddonsThemes',
page:'themes'
},
success: function(htmlData) {
$("#prestastore-content").html("<h3><i class='icon-picture-o'></i> {l s='Live from PrestaShop Addons!'}</h3>"+htmlData);
}
});
// These variable will move the form to another location // These variable will move the form to another location
var formToMove = "appearance"; var formToMove = "appearance";
var formDestination = "js_theme_form_container"; var formDestination = "js_theme_form_container";

View File

@@ -79,7 +79,7 @@
{l s='Modify translations'} {l s='Modify translations'}
</h3> </h3>
<p class="alert alert-info"> <p class="alert alert-info">
{l s='Here you can modify translations for every line of text inside PrestaShop.'}<br /> {l s='Here you can modify translations for every line of text inside Qloapps.'}<br />
{l s='First, select a type of translation (such as "Back office" or "Installed modules"), and then select the language you want to translate strings in.'} {l s='First, select a type of translation (such as "Back office" or "Installed modules"), and then select the language you want to translate strings in.'}
</p> </p>
<div class="form-group"> <div class="form-group">
@@ -136,7 +136,7 @@
</h3> </h3>
<div id="submitAddLangContent" class="form-group"> <div id="submitAddLangContent" class="form-group">
<p class="alert alert-info"> <p class="alert alert-info">
{l s='You can add or update a language directly from the PrestaShop website here.'}<br/> {l s='You can add or update a language directly from the Qloapps website here.'}<br/>
{l s='If you choose to update an existing language pack, all of your previous customizations in the theme named "Default-bootstrap" will be lost. This includes front office expressions and default email templates.'} {l s='If you choose to update an existing language pack, all of your previous customizations in the theme named "Default-bootstrap" will be lost. This includes front office expressions and default email templates.'}
</p> </p>
{if $packs_to_update || $packs_to_install} {if $packs_to_update || $packs_to_install}
@@ -161,7 +161,7 @@
</div> </div>
{else} {else}
<p class="text-danger">{l s='Cannot connect to the PrestaShop website to get the language list.'}</p> <p class="text-danger">{l s='Cannot connect to the Qloapps website to get the language list.'}</p>
{/if} {/if}
</div> </div>
<div class="panel-footer"> <div class="panel-footer">

View File

@@ -29,50 +29,50 @@
<div id="footer" class="bootstrap hide"> <div id="footer" class="bootstrap hide">
<div class="col-sm-2 hidden-xs"> <div class="col-sm-2 hidden-xs">
<a href="http://www.prestashop.com/" class="_blank">PrestaShop&trade;</a> <a href="https://webkul.com/" class="_blank">Webkul&trade;</a>
- -
<span id="footer-load-time"><i class="icon-time" title="{l s='Load time: '}"></i> {number_format(microtime(true) - $timer_start, 3, '.', '')}s</span> <span id="footer-load-time"><i class="icon-time" title="{l s='Load time: '}"></i> {number_format(microtime(true) - $timer_start, 3, '.', '')}s</span>
</div> </div>
<div class="col-sm-2 hidden-xs"> <div class="col-sm-2 hidden-xs">
<div class="social-networks"> <div class="social-networks">
<a class="link-social link-twitter _blank" href="https://twitter.com/PrestaShop" title="Twitter"> <a class="link-social link-twitter _blank" href="https://twitter.com/qloapps" title="Twitter">
<i class="icon-twitter"></i> <i class="icon-twitter"></i>
</a> </a>
<a class="link-social link-facebook _blank" href="https://www.facebook.com/prestashop" title="Facebook"> <a class="link-social link-facebook _blank" href="https://www.facebook.com/qloapps" title="Facebook">
<i class="icon-facebook"></i> <i class="icon-facebook"></i>
</a> </a>
<a class="link-social link-github _blank" href="https://www.prestashop.com/github" title="Github"> <a class="link-social link-github _blank" href="https://github.com/webkul/hotelcommerce" title="Github">
<i class="icon-github"></i> <i class="icon-github"></i>
</a> </a>
<a class="link-social link-google _blank" href="https://plus.google.com/+prestashop/" title="Google"> <a class="link-social link-google _blank" href="https://plus.google.com/110221570427070809661" title="Google">
<i class="icon-google-plus"></i> <i class="icon-google-plus"></i>
</a> </a>
</div> </div>
</div> </div>
<div class="col-sm-5"> <div class="col-sm-5">
<div class="footer-contact"> <div class="footer-contact">
<a href="http://www.prestashop.com/en/contact_us?utm_source=back-office&amp;utm_medium=footer&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="footer_link _blank"> <a href="https://qloapps.com/#contact" class="footer_link _blank">
<i class="icon-envelope"></i> <i class="icon-envelope"></i>
{l s='Contact'} {l s='Contact'}
</a> </a>
/&nbsp; /&nbsp;
<a href="http://forge.prestashop.com/?utm_source=back-office&amp;utm_medium=footer&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="footer_link _blank"> <a href="https://forums.qloapps.com/category/7/bug-report" class="footer_link _blank">
<i class="icon-bug"></i> <i class="icon-bug"></i>
{l s='Bug Tracker'} {l s='Bug Tracker'}
</a> </a>
/&nbsp; /&nbsp;
<a href="http://www.prestashop.com/forums/?utm_source=back-office&amp;utm_medium=footer&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="footer_link _blank"> <a href="https://forums.qloapps.com/" class="footer_link _blank">
<i class="icon-comments"></i> <i class="icon-comments"></i>
{l s='Forum'} {l s='Forum'}
</a> </a>
/&nbsp; /&nbsp;
<a href="http://addons.prestashop.com/?utm_source=back-office&amp;utm_medium=footer&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="footer_link _blank"> <a href="https://store.webkul.com/Qloapps.html" class="footer_link _blank">
<i class="icon-puzzle-piece"></i> <i class="icon-puzzle-piece"></i>
{l s='Addons'} {l s='Addons'}
</a> </a>
/&nbsp; /&nbsp;
<a href="http://www.prestashop.com/en/training-prestashop?utm_source=back-office&amp;utm_medium=footer&amp;utm_campaign=back-office-{$lang_iso|upper}&amp;utm_content={if $host_mode}cloud{else}download{/if}" class="footer_link _blank"> <a href="https://qloapps.com/qlo-reservation-system/" class="footer_link _blank">
<i class="icon-book"></i> <i class="icon-book"></i>
{l s='Training'} {l s='Training'}
</a> </a>

View File

@@ -114,7 +114,7 @@
<i class="icon-reorder"></i> <i class="icon-reorder"></i>
</button> </button>
<a id="header_shopversion" href="{$default_tab_link|escape:'html':'UTF-8'}"> <a id="header_shopversion" href="{$default_tab_link|escape:'html':'UTF-8'}">
<span id="shop_version">{$version}</span> <span id="shop_version">{$qloapps_version}</span>
</a> </a>
{* Shop *} {* Shop *}
{if isset($is_multishop) && $is_multishop && $shop_list && (isset($multishop_context) && $multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)} {if isset($is_multishop) && $is_multishop && $shop_list && (isset($multishop_context) && $multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)}
@@ -288,16 +288,13 @@
</script> </script>
{/if} {/if}
<ul id="header_employee_box"> <ul id="header_employee_box">
{if (!isset($logged_on_addons) || !$logged_on_addons) && (isset($display_addons_connection) && $display_addons_connection)} <li class="hidden-sm hidden-xs">
<li class="hidden-sm hidden-xs"> <a target="_blank" href="https://store.webkul.com/Qloapps.html" class="toolbar_btn" title="{l s='Explore Qloapps Addons'}">
<a href="#" class="addons_connect toolbar_btn" data-toggle="modal" data-target="#modal_addons_connect" title="{l s='Connect to PrestaShop Marketplace account'}"> <i class="icon-chain-broken"></i>
<i class="icon-chain-broken"></i> {l s='Explore Qloapps Addons'}
<span class="string-long">{l s='Connect to PrestaShop Marketplace account'}</span> </a>
<span class="string-short">{l s='PrestaShop Marketplace'}</span> </li>
</a> {if {$base_url}}
</li>
{/if}
{if {$base_url}}
<li> <li>
<a href="{if isset($base_url_tc)}{$base_url_tc|escape:'html':'UTF-8'}{else}{$base_url|escape:'html':'UTF-8'}{/if}" id="header_foaccess" class="_blank" title="{l s='View my shop'}"> <a href="{if isset($base_url_tc)}{$base_url_tc|escape:'html':'UTF-8'}{else}{$base_url|escape:'html':'UTF-8'}{/if}" id="header_foaccess" class="_blank" title="{l s='View my shop'}">
<span class="string-long">{l s='My shop'}</span> <span class="string-long">{l s='My shop'}</span>

View File

@@ -96,14 +96,14 @@
</a> </a>
</li> </li>
{/if} {/if}
{if isset($help_link)} {* {if isset($help_link)}
<li> <li>
<a class="toolbar_btn btn-help" href="{$help_link|escape}" title="{l s='Help'}"> <a class="toolbar_btn btn-help" href="{$help_link|escape}" title="{l s='Help'}">
<i class="process-icon-help"></i> <i class="process-icon-help"></i>
<div>{l s='Help'}</div> <div>{l s='Help'}</div>
</a> </a>
</li> </li>
{/if} {/if} *}
</ul> </ul>
{if (isset($tab_modules_open) && $tab_modules_open) || isset($tab_modules_list)} {if (isset($tab_modules_open) && $tab_modules_open) || isset($tab_modules_list)}
<script type="text/javascript"> <script type="text/javascript">

View File

@@ -87,9 +87,14 @@ class ConfigurationTestCore
'config_dir' => 'config', 'config_dir' => 'config',
'files' => false, 'files' => false,
'mails_dir' => 'mails', 'mails_dir' => 'mails',
'curl' => false,
'soap' => false,
'simplexml' => false,
'memory_limit' => false,
'upload_max_filesize' => false,
'max_execution_time' => false,
)); ));
} }
return $tests; return $tests;
} }
@@ -139,7 +144,7 @@ class ConfigurationTestCore
public static function test_phpversion() public static function test_phpversion()
{ {
return version_compare(substr(phpversion(), 0, 5), '5.2.0', '>='); return version_compare(substr(phpversion(), 0, 5), '5.4.0', '>=');
} }
public static function test_new_phpversion() public static function test_new_phpversion()
@@ -157,6 +162,21 @@ class ConfigurationTestCore
return extension_loaded('pdo_mysql'); return extension_loaded('pdo_mysql');
} }
public static function test_curl()
{
return extension_loaded('curl');
}
public static function test_soap()
{
return extension_loaded('soap');
}
public static function test_simplexml()
{
return extension_loaded('simplexml');
}
public static function test_magicquotes() public static function test_magicquotes()
{ {
return !get_magic_quotes_gpc(); return !get_magic_quotes_gpc();
@@ -167,6 +187,33 @@ class ConfigurationTestCore
return ini_get('file_uploads'); return ini_get('file_uploads');
} }
public static function test_upload_max_filesize()
{
$upload_max_filesize = preg_replace('/[^0-9\.-]/', '', ini_get('upload_max_filesize'));
if ($upload_max_filesize >= 16) {
return true;
}
return false;
}
public static function test_max_execution_time()
{
$max_execution_time = preg_replace('/[^0-9\.-]/', '', ini_get('max_execution_time'));
if ($max_execution_time == 0 || $max_execution_time >= 500) {
return true;
}
return false;
}
public static function test_memory_limit()
{
$memoryLimit = preg_replace('/[^0-9\.-]/', '', ini_get('memory_limit'));
if ($memoryLimit == -1 || $memoryLimit >= 128) {
return true;
}
return false;
}
public static function test_fopen() public static function test_fopen()
{ {
return ini_get('allow_url_fopen'); return ini_get('allow_url_fopen');

View File

@@ -466,8 +466,14 @@ class HookCore extends ObjectModel
if ($disable_non_native_modules && !isset(Hook::$native_module)) { if ($disable_non_native_modules && !isset(Hook::$native_module)) {
Hook::$native_module = Module::getNativeModuleList(); Hook::$native_module = Module::getNativeModuleList();
if (Module::isInstalled('hotelreservationsystem')) {
include_once _PS_MODULE_DIR_.'hotelreservationsystem/classes/HotelHelper.php';
$qloNativeMods = array();
if ($qloNativeMods = HotelHelper::getQloNativeModules()) {
Hook::$native_module = array_merge(Hook::$native_module, $qloNativeMods);
}
}
} }
$different_shop = false; $different_shop = false;
if ($id_shop !== null && Validate::isUnsignedId($id_shop) && $id_shop != $context->shop->getContextShopID()) { if ($id_shop !== null && Validate::isUnsignedId($id_shop) && $id_shop != $context->shop->getContextShopID()) {
$old_context = $context->shop->getContext(); $old_context = $context->shop->getContext();
@@ -486,7 +492,11 @@ class HookCore extends ObjectModel
continue; continue;
} }
if ((bool)$disable_non_native_modules && Hook::$native_module && count(Hook::$native_module) && !in_array($array['module'], self::$native_module)) { if ((bool)$disable_non_native_modules
&& Hook::$native_module
&& count(Hook::$native_module)
&& !in_array($array['module'], self::$native_module)
) {
continue; continue;
} }

View File

@@ -996,7 +996,7 @@ class LanguageCore extends ObjectModel
} }
copy($directory.$file, $mail_to_path.$file); copy($directory.$file, $mail_to_path.$file);
} }
closedir($d_open); closedir($d_open);
} }
} }
} }

View File

@@ -60,8 +60,8 @@ abstract class ObjectModelCore implements Core_Foundation_Database_EntityInterfa
/** @var int Shop ID */ /** @var int Shop ID */
protected $id_shop = null; protected $id_shop = null;
/** @var array|null List of shop IDs */ /** @var array List of shop IDs */
public $id_shop_list = null; public $id_shop_list = array();
/** @var bool */ /** @var bool */
protected $get_shop_from_context = true; protected $get_shop_from_context = true;
@@ -751,7 +751,7 @@ abstract class ObjectModelCore implements Core_Foundation_Database_EntityInterfa
// Remove association to multishop table // Remove association to multishop table
if (Shop::isTableAssociated($this->def['table'])) { if (Shop::isTableAssociated($this->def['table'])) {
$id_shop_list = Shop::getContextListShopID(); $id_shop_list = Shop::getContextListShopID();
if (count($this->id_shop_list)) { if (count($this->id_shop_list) > 0) {
$id_shop_list = $this->id_shop_list; $id_shop_list = $this->id_shop_list;
} }
@@ -1146,9 +1146,18 @@ abstract class ObjectModelCore implements Core_Foundation_Database_EntityInterfa
// Checking for fields validity // Checking for fields validity
// Hack for postcode required for country which does not have postcodes // Hack for postcode required for country which does not have postcodes
if (!empty($value) || $value === '0' || ($field == 'postcode' && $value == '0')) { if (!empty($value) || $value === '0' || ($field == 'postcode' && $value == '0')) {
if (isset($data['validate']) && !Validate::$data['validate']($value) && (!empty($value) || $data['required'])) {
$errors[$field] = '<b>'.self::displayFieldName($field, get_class($this), $htmlentities).'</b> '.Tools::displayError('is invalid.'); $validation_error = false;
} else { if (isset($data['validate'])) {
$data_validate = $data['validate'];
if (!Validate::$data_validate($value) && (!empty($value) || $data['required'])) {
$errors[$field] = '<b>'.self::displayFieldName($field, get_class($this), $htmlentities).
'</b> '.Tools::displayError('is invalid.');
$validation_error = true;
}
}
if (!$validation_error) {
if (isset($data['copy_post']) && !$data['copy_post']) { if (isset($data['copy_post']) && !$data['copy_post']) {
continue; continue;
} }

View File

@@ -563,6 +563,10 @@ class TabCore extends ObjectModel
public static function getTabModulesList($id_tab) public static function getTabModulesList($id_tab)
{ {
$modules_list = array('default_list' => array(), 'slider_list' => array()); $modules_list = array('default_list' => array(), 'slider_list' => array());
//@TODO in future we will show Qloapps recommended addons as per the tabs
// for not we will not show any recommended addons of prestashop
return $modules_list;
$xml_tab_modules_list = false; $xml_tab_modules_list = false;
if (file_exists(_PS_ROOT_DIR_.Module::CACHE_FILE_TAB_MODULES_LIST)) { if (file_exists(_PS_ROOT_DIR_.Module::CACHE_FILE_TAB_MODULES_LIST)) {

View File

@@ -172,7 +172,7 @@ class TranslateCore
$default_key = strtolower('<{'.$name.'}prestashop>'.$source).'_'.$key; $default_key = strtolower('<{'.$name.'}prestashop>'.$source).'_'.$key;
if ('controller' == substr($source, -10, 10)) { if ('controller' == substr($source, -10, 10)) {
+ $file = substr($source, 0, -10); $file = substr($source, 0, -10);
$current_key_file = strtolower('<{'.$name.'}'._THEME_NAME_.'>'.$file).'_'.$key; $current_key_file = strtolower('<{'.$name.'}'._THEME_NAME_.'>'.$file).'_'.$key;
$default_key_file = strtolower('<{'.$name.'}prestashop>'.$file).'_'.$key; $default_key_file = strtolower('<{'.$name.'}prestashop>'.$file).'_'.$key;
} }

View File

@@ -111,19 +111,25 @@ class UploaderCore
public function getPostMaxSizeBytes() public function getPostMaxSizeBytes()
{ {
$post_max_size = ini_get('post_max_size'); $postMaxSize = ini_get('post_max_size');
$bytes = trim($post_max_size); $bytes = (int) trim($postMaxSize);
$last = strtolower($post_max_size[strlen($post_max_size) - 1]); $last = strtolower($postMaxSize[strlen($postMaxSize) - 1]);
switch ($last) { switch ($last) {
case 'g': $bytes *= 1024; case 'g':
case 'm': $bytes *= 1024; $bytes *= 1024;
case 'k': $bytes *= 1024; // no break
case 'm':
$bytes *= 1024;
// no break
case 'k':
$bytes *= 1024;
} }
if ($bytes == '') { if ($bytes == '') {
$bytes = null; $bytes = null;
} }
return $bytes; return $bytes;
} }

View File

@@ -498,9 +498,9 @@ class AdminControllerCore extends Controller
// Check if logged on Addons // Check if logged on Addons
$this->logged_on_addons = false; $this->logged_on_addons = false;
if (isset($this->context->cookie->username_addons) && isset($this->context->cookie->password_addons) && !empty($this->context->cookie->username_addons) && !empty($this->context->cookie->password_addons)) { // if (isset($this->context->cookie->username_addons) && isset($this->context->cookie->password_addons) && !empty($this->context->cookie->username_addons) && !empty($this->context->cookie->password_addons)) {
$this->logged_on_addons = true; // $this->logged_on_addons = true;
} // }
// Set context mode // Set context mode
if (defined('_PS_HOST_MODE_') && _PS_HOST_MODE_) { if (defined('_PS_HOST_MODE_') && _PS_HOST_MODE_) {
@@ -536,7 +536,7 @@ class AdminControllerCore extends Controller
*/ */
public function initBreadcrumbs($tab_id = null, $tabs = null) public function initBreadcrumbs($tab_id = null, $tabs = null)
{ {
if (is_array($tabs) || count($tabs)) { if (is_array($tabs)) {
$tabs = array(); $tabs = array();
} }
@@ -1359,7 +1359,7 @@ class AdminControllerCore extends Controller
// Check if field is required // Check if field is required
if ((!Shop::isFeatureActive() && isset($values['required']) && $values['required']) if ((!Shop::isFeatureActive() && isset($values['required']) && $values['required'])
|| (Shop::isFeatureActive() && isset($_POST['multishopOverrideOption'][$field]) && isset($values['required']) && $values['required'])) { || (Shop::isFeatureActive() && isset($_POST['multishopOverrideOption'][$field]) && isset($values['required']) && $values['required'])) {
if (isset($values['type']) && $values['type'] == 'textLang') { if (isset($values['type']) && in_array($values['type'], array('textLang', 'textareaLang'))) {
foreach ($languages as $language) { foreach ($languages as $language) {
if (($value = Tools::getValue($field.'_'.$language['id_lang'])) == false && (string)$value != '0') { if (($value = Tools::getValue($field.'_'.$language['id_lang'])) == false && (string)$value != '0') {
$this->errors[] = sprintf(Tools::displayError('field %s is required.'), $values['title']); $this->errors[] = sprintf(Tools::displayError('field %s is required.'), $values['title']);
@@ -1371,16 +1371,18 @@ class AdminControllerCore extends Controller
} }
// Check field validator // Check field validator
if (isset($values['type']) && $values['type'] == 'textLang') { if (isset($values['type']) && in_array($values['type'], array('textLang', 'textareaLang'))) {
foreach ($languages as $language) { foreach ($languages as $language) {
if (Tools::getValue($field.'_'.$language['id_lang']) && isset($values['validation'])) { if (Tools::getValue($field.'_'.$language['id_lang']) && isset($values['validation'])) {
if (!Validate::$values['validation'](Tools::getValue($field.'_'.$language['id_lang']))) { $values_validation = $values['validation'];
if (!Validate::$values_validation(Tools::getValue($field.'_'.$language['id_lang']))) {
$this->errors[] = sprintf(Tools::displayError('field %s is invalid.'), $values['title']); $this->errors[] = sprintf(Tools::displayError('field %s is invalid.'), $values['title']);
} }
} }
} }
} elseif (Tools::getValue($field) && isset($values['validation'])) { } elseif (Tools::getValue($field) && isset($values['validation'])) {
if (!Validate::$values['validation'](Tools::getValue($field))) { $values_validation = $values['validation'];
if (!Validate::$values_validation(Tools::getValue($field))) {
$this->errors[] = sprintf(Tools::displayError('field %s is invalid.'), $values['title']); $this->errors[] = sprintf(Tools::displayError('field %s is invalid.'), $values['title']);
} }
} }
@@ -1930,6 +1932,7 @@ class AdminControllerCore extends Controller
'iso_user' => $this->context->language->iso_code, 'iso_user' => $this->context->language->iso_code,
'country_iso_code' => $this->context->country->iso_code, 'country_iso_code' => $this->context->country->iso_code,
'version' => _PS_VERSION_, 'version' => _PS_VERSION_,
'qloapps_version' => _QLOAPPS_VERSION_,
'lang_iso' => $this->context->language->iso_code, 'lang_iso' => $this->context->language->iso_code,
'full_language_code' => $this->context->language->language_code, 'full_language_code' => $this->context->language->language_code,
'link' => $this->context->link, 'link' => $this->context->link,
@@ -2200,6 +2203,7 @@ class AdminControllerCore extends Controller
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'ps_version' => _PS_VERSION_, 'ps_version' => _PS_VERSION_,
'qloapps_version' => _QLOAPPS_VERSION_,
'timer_start' => $this->timer_start, 'timer_start' => $this->timer_start,
'iso_is_fr' => strtoupper($this->context->language->iso_code) == 'FR', 'iso_is_fr' => strtoupper($this->context->language->iso_code) == 'FR',
'modals' => $this->renderModal(), 'modals' => $this->renderModal(),
@@ -3244,7 +3248,7 @@ class AdminControllerCore extends Controller
$filter_modules_list = array($filter_modules_list); $filter_modules_list = array($filter_modules_list);
} }
if (!count($filter_modules_list)) { if (is_null($filter_modules_list) || !count($filter_modules_list)) {
return false; return false;
} //if there is no modules to display just return false; } //if there is no modules to display just return false;
@@ -3637,7 +3641,8 @@ class AdminControllerCore extends Controller
if (isset($field['validation'])) { if (isset($field['validation'])) {
$valid_method_exists = method_exists('Validate', $field['validation']); $valid_method_exists = method_exists('Validate', $field['validation']);
if ((!isset($field['empty']) || !$field['empty'] || (isset($field['empty']) && $field['empty'] && $value)) && $valid_method_exists) { if ((!isset($field['empty']) || !$field['empty'] || (isset($field['empty']) && $field['empty'] && $value)) && $valid_method_exists) {
if (!Validate::$field['validation']($value)) { $field_validation = $field['validation'];
if (!Validate::$field_validation($value)) {
$this->errors[] = Tools::displayError($field['title'].' : Incorrect value'); $this->errors[] = Tools::displayError($field['title'].' : Incorrect value');
return false; return false;
} }

View File

@@ -709,7 +709,7 @@ class FrontControllerCore extends Controller
'errors' => $this->errors, 'errors' => $this->errors,
'display_header' => $this->display_header, 'display_header' => $this->display_header,
'display_footer' => $this->display_footer, 'display_footer' => $this->display_footer,
)); ));
$layout = $this->getLayout(); $layout = $this->getLayout();
@@ -980,7 +980,7 @@ class FrontControllerCore extends Controller
} }
} }
} }
if (Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee'))) { if (Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee'))) {
$this->addJqueryUI('ui.sortable'); $this->addJqueryUI('ui.sortable');
$this->addjqueryPlugin('fancybox'); $this->addjqueryPlugin('fancybox');

View File

@@ -93,9 +93,11 @@ class DbQueryCore
public function from($table, $alias = null) public function from($table, $alias = null)
{ {
if (!empty($table)) { if (!empty($table)) {
if (empty($this->query['from'])) {
$this->query['from'] = array();
}
$this->query['from'][] = '`'._DB_PREFIX_.$table.'`'.($alias ? ' '.$alias : ''); $this->query['from'][] = '`'._DB_PREFIX_.$table.'`'.($alias ? ' '.$alias : '');
} }
return $this; return $this;
} }

View File

@@ -195,7 +195,7 @@ class HelperListCore extends Helper
$position_group_identifier = Category::getRootCategory()->id; $position_group_identifier = Category::getRootCategory()->id;
} }
$positions = array_map(create_function('$elem', 'return (int)($elem[\'position\']);'), $this->_list); $positions = array_map(function($elem) { return (int)($elem['position']); }, $this->_list);
sort($positions); sort($positions);
} }

View File

@@ -158,6 +158,7 @@ class HelperOptionsCore extends Helper
// Fill values for all languages for all lang fields // Fill values for all languages for all lang fields
if (substr($field['type'], -4) == 'Lang') { if (substr($field['type'], -4) == 'Lang') {
$field['value'] = array();
foreach ($languages as $language) { foreach ($languages as $language) {
if ($field['type'] == 'textLang') { if ($field['type'] == 'textLang') {
$value = Tools::getValue($key.'_'.$language['id_lang'], Configuration::get($key, $language['id_lang'])); $value = Tools::getValue($key.'_'.$language['id_lang'], Configuration::get($key, $language['id_lang']));
@@ -166,7 +167,11 @@ class HelperOptionsCore extends Helper
} elseif ($field['type'] == 'selectLang') { } elseif ($field['type'] == 'selectLang') {
$value = Configuration::get($key, $language['id_lang']); $value = Configuration::get($key, $language['id_lang']);
} }
$field['languages'][$language['id_lang']] = $value; if (isset($value)) {
$field['languages'][$language['id_lang']] = $value;
} else {
$field['languages'][$language['id_lang']] = '';
}
$field['value'][$language['id_lang']] = $this->getOptionValue($key.'_'.strtoupper($language['iso_code']), $field); $field['value'][$language['id_lang']] = $this->getOptionValue($key.'_'.strtoupper($language['iso_code']), $field);
} }
} }

View File

@@ -42,6 +42,9 @@ abstract class ModuleCore
/** @var array filled with known compliant PS versions */ /** @var array filled with known compliant PS versions */
public $ps_versions_compliancy = array(); public $ps_versions_compliancy = array();
/** @var array filled with known compliant Qloapps versions */
public $qloapps_versions_compliancy = array();
/** @var array filled with modules needed for install */ /** @var array filled with modules needed for install */
public $dependencies = array(); public $dependencies = array();
@@ -231,6 +234,7 @@ abstract class ModuleCore
*/ */
public function __construct($name = null, Context $context = null) public function __construct($name = null, Context $context = null)
{ {
// for Prestashop version compliancy
if (isset($this->ps_versions_compliancy) && !isset($this->ps_versions_compliancy['min'])) { if (isset($this->ps_versions_compliancy) && !isset($this->ps_versions_compliancy['min'])) {
$this->ps_versions_compliancy['min'] = '1.4.0.0'; $this->ps_versions_compliancy['min'] = '1.4.0.0';
} }
@@ -247,6 +251,31 @@ abstract class ModuleCore
$this->ps_versions_compliancy['max'] .= '.999.999'; $this->ps_versions_compliancy['max'] .= '.999.999';
} }
// for Qloapps version compliancy
if (isset($this->qloapps_versions_compliancy) && !isset($this->qloapps_versions_compliancy['min'])) {
$this->qloapps_versions_compliancy['min'] = '0.9.0.0';
}
if (isset($this->qloapps_versions_compliancy) && !isset($this->qloapps_versions_compliancy['max'])) {
$this->qloapps_versions_compliancy['max'] = _QLOAPPS_VERSION_;
}
if (strlen($this->qloapps_versions_compliancy['min']) == 3) {
$this->qloapps_versions_compliancy['min'] .= '.0.0';
}
if (strlen($this->qloapps_versions_compliancy['max']) == 3) {
$this->qloapps_versions_compliancy['max'] .= '.999.999';
}
if (strlen($this->qloapps_versions_compliancy['min']) == 5) {
$this->qloapps_versions_compliancy['min'] .= '.0';
}
if (strlen($this->qloapps_versions_compliancy['max']) == 5) {
$this->qloapps_versions_compliancy['max'] .= '.999';
}
// Load context and smarty // Load context and smarty
$this->context = $context ? $context : Context::getContext(); $this->context = $context ? $context : Context::getContext();
if (is_object($this->context->smarty)) { if (is_object($this->context->smarty)) {
@@ -314,7 +343,7 @@ abstract class ModuleCore
// Check PS version compliancy // Check PS version compliancy
if (!$this->checkCompliancy()) { if (!$this->checkCompliancy()) {
$this->_errors[] = Tools::displayError('The version of your module is not compliant with your PrestaShop version.'); $this->_errors[] = Tools::displayError('The version of your module is not compliant with your Qloapps version.');
return false; return false;
} }
@@ -397,7 +426,11 @@ abstract class ModuleCore
public function checkCompliancy() public function checkCompliancy()
{ {
if (version_compare(_PS_VERSION_, $this->ps_versions_compliancy['min'], '<') || version_compare(_PS_VERSION_, $this->ps_versions_compliancy['max'], '>')) { if (version_compare(_PS_VERSION_, $this->ps_versions_compliancy['min'], '<')
|| version_compare(_PS_VERSION_, $this->ps_versions_compliancy['max'], '>')
// || version_compare(_QLOAPPS_VERSION_, $this->qloapps_versions_compliancy['min'], '<')
// || version_compare(_QLOAPPS_VERSION_, $this->qloapps_versions_compliancy['max'], '>')
) {
return false; return false;
} else { } else {
return true; return true;
@@ -1441,102 +1474,7 @@ abstract class ModuleCore
} }
} }
} }
//INFO:: addons module are removed from the module lists
// Get Default Country Modules and customer module
$files_list = array(
array('type' => 'addonsNative', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0),
array('type' => 'addonsMustHave', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_MUST_HAVE_MODULES_LIST, 'loggedOnAddons' => 0),
array('type' => 'addonsBought', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1),
);
foreach ($files_list as $f) {
if (file_exists($f['file']) && ($f['loggedOnAddons'] == 0 || $logged_on_addons)) {
if (Module::useTooMuchMemory()) {
$errors[] = Tools::displayError('All modules cannot be loaded due to memory limit restrictions, please increase your memory_limit value on your server configuration');
break;
}
$file = $f['file'];
$content = Tools::file_get_contents($file);
$xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
if ($xml && isset($xml->module)) {
foreach ($xml->module as $modaddons) {
$flag_found = 0;
// foreach ($module_list as $k => &$m) {
// if (Tools::strtolower($m->name) == Tools::strtolower($modaddons->name) && !isset($m->available_on_addons)) {
// $flag_found = 1;
// if ($m->version != $modaddons->version && version_compare($m->version, $modaddons->version) === -1) {
// $module_list[$k]->version_addons = $modaddons->version;
// }
// }
// }
if ($flag_found == 0) {
$item = new stdClass();
$item->id = 0;
$item->warning = '';
$item->type = strip_tags((string)$f['type']);
$item->name = strip_tags((string)$modaddons->name);
$item->version = strip_tags((string)$modaddons->version);
$item->tab = strip_tags((string)$modaddons->tab);
$item->displayName = strip_tags((string)$modaddons->displayName);
$item->description = stripslashes(strip_tags((string)$modaddons->description));
$item->description_full = stripslashes(strip_tags((string)$modaddons->description_full));
$item->author = strip_tags((string)$modaddons->author);
$item->limited_countries = array();
$item->parent_class = '';
$item->onclick_option = false;
$item->is_configurable = 0;
$item->need_instance = 0;
$item->not_on_disk = 1;
$item->available_on_addons = 1;
$item->trusted = Module::isModuleTrusted($item->name);
$item->active = 0;
$item->description_full = stripslashes($modaddons->description_full);
$item->additional_description = isset($modaddons->additional_description) ? stripslashes($modaddons->additional_description) : null;
$item->compatibility = isset($modaddons->compatibility) ? (array)$modaddons->compatibility : null;
$item->nb_rates = isset($modaddons->nb_rates) ? (array)$modaddons->nb_rates : null;
$item->avg_rate = isset($modaddons->avg_rate) ? (array)$modaddons->avg_rate : null;
$item->badges = isset($modaddons->badges) ? (array)$modaddons->badges : null;
$item->url = isset($modaddons->url) ? $modaddons->url : null;
if (isset($modaddons->img)) {
if (!file_exists(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg')) {
if (!file_put_contents(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg', Tools::file_get_contents($modaddons->img))) {
copy(_PS_IMG_DIR_.'404.gif', _PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg');
}
}
if (file_exists(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg')) {
$item->image = '../img/tmp/'.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg';
}
}
if ($item->type == 'addonsMustHave') {
$item->addons_buy_url = strip_tags((string)$modaddons->url);
$prices = (array)$modaddons->price;
$id_default_currency = Configuration::get('PS_CURRENCY_DEFAULT');
foreach ($prices as $currency => $price) {
if ($id_currency = Currency::getIdByIsoCode($currency)) {
$item->price = (float)$price;
$item->id_currency = (int)$id_currency;
if ($id_default_currency == $id_currency) {
break;
}
}
}
}
$module_list[$modaddons->id.'-'.$item->name] = $item;
}
}
}
}
}
foreach ($module_list as $key => &$module) { foreach ($module_list as $key => &$module) {
if (defined('_PS_HOST_MODE_') && in_array($module->name, self::$hosted_modules_blacklist)) { if (defined('_PS_HOST_MODE_') && in_array($module->name, self::$hosted_modules_blacklist)) {
unset($module_list[$key]); unset($module_list[$key]);
@@ -1551,8 +1489,7 @@ abstract class ModuleCore
$module->interest = 0; $module->interest = 0;
} }
} }
usort($module_list, function ($a, $b) { return strnatcasecmp($a->displayName, $b->displayName); });
usort($module_list, create_function('$a,$b', 'return strnatcasecmp($a->displayName, $b->displayName);'));
if ($errors) { if ($errors) {
if (!isset(Context::getContext()->controller) && !Context::getContext()->controller->controller_name) { if (!isset(Context::getContext()->controller) && !Context::getContext()->controller->controller_name) {
echo '<div class="alert error"><h3>'.Tools::displayError('The following module(s) could not be loaded').':</h3><ol>'; echo '<div class="alert error"><h3>'.Tools::displayError('The following module(s) could not be loaded').':</h3><ol>';
@@ -1641,7 +1578,7 @@ abstract class ModuleCore
} }
$modules = array(); $modules = array();
if (is_array($native_modules)) { if (is_object($native_modules)) {
foreach ($native_modules as $native_modules_type) { foreach ($native_modules as $native_modules_type) {
if (in_array($native_modules_type['type'], array('native', 'partner'))) { if (in_array($native_modules_type['type'], array('native', 'partner'))) {
foreach ($native_modules_type->module as $module) { foreach ($native_modules_type->module as $module) {
@@ -1683,6 +1620,10 @@ abstract class ModuleCore
*/ */
final public static function isModuleTrusted($module_name) final public static function isModuleTrusted($module_name)
{ {
// return currently always trusted as 1 because we will not chcek trust according to prestshop
// @TODO in future trust will be checked according to Qloapps addons
return 1;
static $trusted_modules_list_content = null; static $trusted_modules_list_content = null;
static $modules_list_content = null; static $modules_list_content = null;
static $default_country_modules_list_content = null; static $default_country_modules_list_content = null;

View File

@@ -60,9 +60,11 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
public function getHeader() public function getHeader()
{ {
$this->assignCommonHeaderData(); $this->assignCommonHeaderData();
$this->smarty->assign(array( $this->smarty->assign(
'header' => $this->l('INVOICE'), array(
)); 'header' => $this->l('INVOICE'),
)
);
return $this->smarty->fetch($this->getTemplate('header')); return $this->smarty->fetch($this->getTemplate('header'));
} }
@@ -481,9 +483,28 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
&& $address->id_country != Configuration::get('VATNUMBER_COUNTRY'); && $address->id_country != Configuration::get('VATNUMBER_COUNTRY');
$carrier = new Carrier($this->order->id_carrier); $carrier = new Carrier($this->order->id_carrier);
$tax_breakdowns = $this->getTaxBreakdown(); // code to send name of the taxes applied on the order to show names od taxes in the invoice for GST
$showTaxName = 0;
if ($tax_breakdowns = $this->getTaxBreakdown()) {
if (Configuration::get('PS_INVOICE_TAXES_BREAKDOWN')) {
$showTaxName = 1;
foreach ($tax_breakdowns as $taxType => &$taxDetails) {
if ($taxType = 'product_tax') {
foreach ($taxDetails as $taxRate => &$tax) {
if (isset($tax['id_tax'])) {
if (Validate::isLoadedObject($objTax = new Tax($tax['id_tax']))) {
// add tax name in the tax details of the order
$tax['name'] = $objTax->name[$this->order->id_lang];
}
}
}
}
}
}
}
$data = array( $data = array(
'showTaxName' => $showTaxName,
'tax_exempt' => $tax_exempt, 'tax_exempt' => $tax_exempt,
'use_one_after_another_method' => $this->order_invoice->useOneAfterAnotherTaxComputationMethod(), 'use_one_after_another_method' => $this->order_invoice->useOneAfterAnotherTaxComputationMethod(),
'display_tax_bases_in_breakdowns' => $this->order_invoice->displayTaxBasesInProductTaxesBreakdown(), 'display_tax_bases_in_breakdowns' => $this->order_invoice->displayTaxBasesInProductTaxesBreakdown(),

View File

@@ -539,7 +539,8 @@ class WebserviceOutputBuilderCore
unset($field['xlink_resource']); unset($field['xlink_resource']);
} }
} elseif (isset($field['getter']) && $object != null && method_exists($object, $field['getter'])) { } elseif (isset($field['getter']) && $object != null && method_exists($object, $field['getter'])) {
$field['value'] = $object->$field['getter'](); $field_getter = $field['getter'];
$field['value'] = $object->$field_getter();
} elseif (!isset($field['value'])) { } elseif (!isset($field['value'])) {
$field['value'] = $object->$field_name; $field['value'] = $object->$field_name;
} }

View File

@@ -324,7 +324,7 @@ class WebserviceRequestCore
'customizations' => array('description' => 'Customization values', 'class' => 'Customization'), 'customizations' => array('description' => 'Customization values', 'class' => 'Customization'),
); );
// Code from Prestashop 1.7.0.2 // Code from Prestashop 1.7.0.2
$extra_resources = Hook::exec('addWebserviceResources', array('resources' => $resources), null, true, false); $extra_resources = Hook::exec('addWebserviceResources', array('resources' => $resources), null, true, false);
if (is_array($extra_resources) && count($extra_resources)) { if (is_array($extra_resources) && count($extra_resources)) {
foreach ($extra_resources as $new_resources) { foreach ($extra_resources as $new_resources) {
@@ -1439,7 +1439,8 @@ class WebserviceRequestCore
$this->setError(400, 'parameter "'.$fieldName.'" not writable. Please remove this attribute of this XML', 93); $this->setError(400, 'parameter "'.$fieldName.'" not writable. Please remove this attribute of this XML', 93);
return false; return false;
} else { } else {
$object->$fieldProperties['setter']((string)$attributes->$fieldName); $setter = $fieldProperties['setter'];
$object->$setter((string)$attributes->$fieldName);
} }
} elseif (property_exists($object, $sqlId)) { } elseif (property_exists($object, $sqlId)) {
$object->$sqlId = (string)$attributes->$fieldName; $object->$sqlId = (string)$attributes->$fieldName;

View File

@@ -26,7 +26,7 @@
/* Debug only */ /* Debug only */
if (!defined('_PS_MODE_DEV_')) { if (!defined('_PS_MODE_DEV_')) {
define('_PS_MODE_DEV_', false); define('_PS_MODE_DEV_', false);
} }
/* Compatibility warning */ /* Compatibility warning */
define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false); define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false);

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<modules_list>
<modules type="native">
<module name="hotelreservationsystem"/>
<module name="wkabouthotelblock"/>
<module name="wkfooteraboutblock"/>
<module name="wkfooterexploreblock"/>
<module name="wkfooterlangcurrencyblock"/>
<module name="wkfooternotificationblock"/>
<module name="wkfooterpaymentblock"/>
<module name="wkfooterpaymentinfoblockcontainer"/>
<module name="wkhotelfeaturesblock"/>
<module name="wkhotelfilterblock"/>
<module name="wkhotelfiltersearchblock"/>
<module name="wkhotelroom"/>
<module name="wkpaypaladaptive"/>
<module name="wkroomsearchblock"/>
<module name="wktestimonialblock"/>
</modules>
</modules_list>

View File

@@ -77,7 +77,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
), ),
'PS_COOKIE_LIFETIME_BO' => array( 'PS_COOKIE_LIFETIME_BO' => array(
'title' => $this->l('Lifetime of back office cookies'), 'title' => $this->l('Lifetime of back office cookies'),
'hint' => $this->l('Set the amount of hours during which the back office cookies are valid. After that amount of time, the PrestaShop user will have to log in again.'), 'hint' => $this->l('Set the amount of hours during which the back office cookies are valid. After that amount of time, the Qloapps user will have to log in again.'),
'validation' => 'isInt', 'validation' => 'isInt',
'cast' => 'intval', 'cast' => 'intval',
'type' => 'text', 'type' => 'text',

View File

@@ -266,7 +266,7 @@ class AdminCountriesControllerCore extends AdminController
'label' => $this->l('Zip/postal code format'), 'label' => $this->l('Zip/postal code format'),
'name' => 'zip_code_format', 'name' => 'zip_code_format',
'required' => true, 'required' => true,
'desc' => $this->l('Indicate the format of the postal code: use L for a letter, N for a number, and C for the country\'s ISO 3166-1 alpha-2 code. For example, NNNNN for the United States, France, Poland and many other; LNNNNLLL for Argentina, etc. If you do not want PrestaShop to verify the postal code for this country, leave it blank.') 'desc' => $this->l('Indicate the format of the postal code: use L for a letter, N for a number, and C for the country\'s ISO 3166-1 alpha-2 code. For example, NNNNN for the United States, France, Poland and many other; LNNNNLLL for Argentina, etc. If you do not want Qloapps to verify the postal code for this country, leave it blank.')
), ),
array( array(
'type' => 'address_layout', 'type' => 'address_layout',

View File

@@ -242,12 +242,6 @@ class AdminEmployeesControllerCore extends AdminController
'name' => 'lastname', 'name' => 'lastname',
'required' => true 'required' => true
), ),
array(
'type' => 'html',
'name' => 'employee_avatar',
'html_content' => '<div id="employee-thumbnail"><a href="http://www.prestashop.com/forums/index.php?app=core&amp;module=usercp" target="_blank" style="background-image:url('.$obj->getImage().')"></a></div>
<div class="alert alert-info">'.sprintf($this->l('Your avatar in PrestaShop 1.6.x is your profile picture on %1$s. To change your avatar, log in to PrestaShop.com with your email %2$s and follow the on-screen instructions.'), '<a href="http://www.prestashop.com/forums/index.php?app=core&amp;module=usercp" class="alert-link" target="_blank">PrestaShop.com</a>', $obj->email).'</div>',
),
array( array(
'type' => 'text', 'type' => 'text',
'class'=> 'fixed-width-xxl', 'class'=> 'fixed-width-xxl',
@@ -265,15 +259,7 @@ class AdminEmployeesControllerCore extends AdminController
'type' => 'change-password', 'type' => 'change-password',
'label' => $this->l('Password'), 'label' => $this->l('Password'),
'name' => 'passwd' 'name' => 'passwd'
); );
if (Tab::checkTabRights(Tab::getIdFromClassName('AdminModulesController'))) {
$this->fields_form['input'][] = array(
'type' => 'prestashop_addons',
'label' => 'PrestaShop Addons',
'name' => 'prestashop_addons',
);
}
} else { } else {
$this->fields_form['input'][] = array( $this->fields_form['input'][] = array(
'type' => 'password', 'type' => 'password',
@@ -286,7 +272,7 @@ class AdminEmployeesControllerCore extends AdminController
$this->fields_form['input'] = array_merge($this->fields_form['input'], array( $this->fields_form['input'] = array_merge($this->fields_form['input'], array(
array( array(
'type' => 'switch', 'type' => 'switch',
'label' => $this->l('Subscribe to PrestaShop newsletter'), 'label' => $this->l('Subscribe to Qloapps newsletter'),
'name' => 'optin', 'name' => 'optin',
'required' => false, 'required' => false,
'is_bool' => true, 'is_bool' => true,
@@ -302,7 +288,7 @@ class AdminEmployeesControllerCore extends AdminController
'label' => $this->l('No') 'label' => $this->l('No')
) )
), ),
'hint' => $this->l('PrestaShop can provide you with guidance on a regular basis by sending you tips on how to optimize the management of your store which will help you grow your business. If you do not wish to receive these tips, you can disable this option.') 'hint' => $this->l('Qloapps can provide you with guidance on a regular basis by sending you tips on how to optimize the management of your store which will help you grow your business. If you do not wish to receive these tips, you can disable this option.')
), ),
array( array(
'type' => 'default_tab', 'type' => 'default_tab',

View File

@@ -588,7 +588,7 @@ class AdminGroupsControllerCore extends AdminController
'<b>'.$default->name[$this->context->language->id].'</b>' '<b>'.$default->name[$this->context->language->id].'</b>'
); );
$this->displayInformation($this->l('PrestaShop has three default customer groups:')); $this->displayInformation($this->l('Qloapps has three default customer groups:'));
$this->displayInformation($unidentified_group_information); $this->displayInformation($unidentified_group_information);
$this->displayInformation($guest_group_information); $this->displayInformation($guest_group_information);
$this->displayInformation($default_group_information); $this->displayInformation($default_group_information);

View File

@@ -79,6 +79,7 @@ class AdminInformationControllerCore extends AdminController
$shop_vars = array( $shop_vars = array(
'shop' => array( 'shop' => array(
'ps' => _PS_VERSION_, 'ps' => _PS_VERSION_,
'qloappsV' => _QLOAPPS_VERSION_,
'url' => $this->context->shop->getBaseURL(), 'url' => $this->context->shop->getBaseURL(),
'theme' => $this->context->shop->theme_name, 'theme' => $this->context->shop->theme_name,
), ),

View File

@@ -337,7 +337,7 @@ class AdminLocalizationControllerCore extends AdminController
array( array(
'type' => 'radio', 'type' => 'radio',
'label' => $this->l('Download pack data'), 'label' => $this->l('Download pack data'),
'desc' => $this->l('If set to yes then the localization pack will be downloaded from prestashop.com. Otherwise the local xml file found in the localization folder of your PrestaShop installation will be used.'), 'desc' => $this->l('If set to yes then the localization pack will be downloaded from prestashop.com. Otherwise the local xml file found in the localization folder of your Qloapps installation will be used.'),
'name' => 'download_updated_pack', 'name' => 'download_updated_pack',
'is_bool'=> true, 'is_bool'=> true,
'values' => array( 'values' => array(

View File

@@ -151,7 +151,7 @@ class AdminLoginControllerCore extends AdminController
* *
* @return bool * @return bool
*/ */
public function viewAccess() public function viewAccess($disable = false)
{ {
return true; return true;
} }

View File

@@ -116,7 +116,7 @@ class AdminMetaControllerCore extends AdminController
$general_fields['PS_HTACCESS_DISABLE_MODSEC'] = array( $general_fields['PS_HTACCESS_DISABLE_MODSEC'] = array(
'title' => $this->l('Disable Apache\'s mod_security module'), 'title' => $this->l('Disable Apache\'s mod_security module'),
'hint' => $this->l('Some of PrestaShop\'s features might not work correctly with a specific configuration of Apache\'s mod_security module. We recommend to turn it off.'), 'hint' => $this->l('Some of Qloapps\'s features might not work correctly with a specific configuration of Apache\'s mod_security module. We recommend to turn it off.'),
'validation' => 'isBool', 'validation' => 'isBool',
'cast' => 'intval', 'cast' => 'intval',
'type' => 'bool', 'type' => 'bool',
@@ -198,20 +198,21 @@ class AdminMetaControllerCore extends AdminController
if (!defined('_PS_HOST_MODE_')) { if (!defined('_PS_HOST_MODE_')) {
$this->fields_options['shop_url'] = $shop_url_options; $this->fields_options['shop_url'] = $shop_url_options;
} else {
$this->fields_options['manage_domain_name'] = array(
'title' => $this->l('Manage domain name'),
'description' => $this->l('You can search for a new domain name or add a domain name that you already own. You will be redirected to your PrestaShop account.'),
'buttons' => array(
array(
'title' => $this->l('Add a domain name'),
'href' => 'https://www.prestashop.com/cloud/',
'class' => 'pull-right', 'icon' => 'process-icon-new',
'js' => 'return !window.open(this.href);'
)
)
);
} }
// else {
// $this->fields_options['manage_domain_name'] = array(
// 'title' => $this->l('Manage domain name'),
// 'description' => $this->l('You can search for a new domain name or add a domain name that you already own. You will be redirected to your PrestaShop account.'),
// 'buttons' => array(
// array(
// 'title' => $this->l('Add a domain name'),
// 'href' => 'https://www.prestashop.com/cloud/',
// 'class' => 'pull-right', 'icon' => 'process-icon-new',
// 'js' => 'return !window.open(this.href);'
// )
// )
// );
// }
// Add display route options to options form // Add display route options to options form
if (Configuration::get('PS_REWRITING_SETTINGS') || Tools::getValue('PS_REWRITING_SETTINGS')) { if (Configuration::get('PS_REWRITING_SETTINGS') || Tools::getValue('PS_REWRITING_SETTINGS')) {
@@ -219,7 +220,7 @@ class AdminMetaControllerCore extends AdminController
$this->addAllRouteFields(); $this->addAllRouteFields();
} }
$this->fields_options['routes']['title'] = $this->l('Schema of URLs'); $this->fields_options['routes']['title'] = $this->l('Schema of URLs');
$this->fields_options['routes']['description'] = $this->l('This section enables you to change the default pattern of your links. In order to use this functionality, PrestaShop\'s "Friendly URL" option must be enabled, and Apache\'s URL rewriting module (mod_rewrite) must be activated on your web server.').'<br />'.$this->l('There are several available keywords for each route listed below; note that keywords with * are required!').'<br />'.$this->l('To add a keyword in your URL, use the {keyword} syntax. If the keyword is not empty, you can add text before or after the keyword with syntax {prepend:keyword:append}. For example {-hey-:meta_title} will add "-hey-my-title" in the URL if the meta title is set.'); $this->fields_options['routes']['description'] = $this->l('This section enables you to change the default pattern of your links. In order to use this functionality, Qloapps\'s "Friendly URL" option must be enabled, and Apache\'s URL rewriting module (mod_rewrite) must be activated on your web server.').'<br />'.$this->l('There are several available keywords for each route listed below; note that keywords with * are required!').'<br />'.$this->l('To add a keyword in your URL, use the {keyword} syntax. If the keyword is not empty, you can add text before or after the keyword with syntax {prepend:keyword:append}. For example {-hey-:meta_title} will add "-hey-my-title" in the URL if the meta title is set.');
$this->fields_options['routes']['submit'] = array('title' => $this->l('Save')); $this->fields_options['routes']['submit'] = array('title' => $this->l('Save'));
} }
@@ -467,8 +468,8 @@ class AdminMetaControllerCore extends AdminController
)); ));
// PS Comments // PS Comments
fwrite($write_fd, "# robots.txt automaticaly generated by PrestaShop e-commerce open-source solution\n"); fwrite($write_fd, "# robots.txt automaticaly generated by qloapps e-commerce open-source solution\n");
fwrite($write_fd, "# http://www.prestashop.com - http://www.prestashop.com/forums\n"); fwrite($write_fd, "# https://www.qloapps.com - https://forums.qloapps.com/\n");
fwrite($write_fd, "# This file is to prevent the crawling and indexing of certain parts\n"); fwrite($write_fd, "# This file is to prevent the crawling and indexing of certain parts\n");
fwrite($write_fd, "# of your site by web crawlers and spiders run by sites like Yahoo!\n"); fwrite($write_fd, "# of your site by web crawlers and spiders run by sites like Yahoo!\n");
fwrite($write_fd, "# and Google. By telling these \"robots\" where not to go on your site,\n"); fwrite($write_fd, "# and Google. By telling these \"robots\" where not to go on your site,\n");

View File

@@ -1892,11 +1892,20 @@ class AdminOrdersControllerCore extends AdminController
$htl_booking_data_order_id = $obj_bookin_detail->getBookingDataByOrderId(Tools::getValue('id_order')); $htl_booking_data_order_id = $obj_bookin_detail->getBookingDataByOrderId(Tools::getValue('id_order'));
if ($htl_booking_data_order_id) { if ($htl_booking_data_order_id) {
$obj_htl_rm_info = new HotelRoomInformation(); $obj_htl_rm_info = new HotelRoomInformation();
$objHtlBranchInfo = new HotelBranchInformation();
foreach ($htl_booking_data_order_id as $key => $value) { foreach ($htl_booking_data_order_id as $key => $value) {
$htl_booking_data_order_id[$key]['room_num'] = $obj_htl_rm_info->getHotelRoomInfoById($value['id_room']); $htl_booking_data_order_id[$key]['room_num'] = $obj_htl_rm_info->getHotelRoomInfoById($value['id_room']);
$htl_booking_data_order_id[$key]['order_status'] = $value['id_status']; $htl_booking_data_order_id[$key]['order_status'] = $value['id_status'];
$htl_booking_data_order_id[$key]['date_from'] = $value['date_from']; $htl_booking_data_order_id[$key]['date_from'] = $value['date_from'];
$htl_booking_data_order_id[$key]['date_to'] = $value['date_to']; $htl_booking_data_order_id[$key]['date_to'] = $value['date_to'];
//enter hotel name
$hotelInfo = $objHtlBranchInfo->hotelBranchesInfo(
Configuration::get('PS_LANG_DEFAULT'),
2,
0,
$value['id_hotel']
);
$htl_booking_data_order_id[$key]['hotel_name'] = $hotelInfo['hotel_name'];
} }
} }
$htl_order_status = HotelOrderStatus::getAllHotelOrderStatus(); $htl_order_status = HotelOrderStatus::getAllHotelOrderStatus();
@@ -2897,7 +2906,7 @@ class AdminOrdersControllerCore extends AdminController
/*By webkul to edit the Hotel Cart and Hotel Order tables when editing the room for the order detail page*/ /*By webkul to edit the Hotel Cart and Hotel Order tables when editing the room for the order detail page*/
$update_htl_tables = $obj_booking_detail->UpdateHotelCartHotelOrderOnOrderEdit($id_order, $id_room, $old_date_from, $old_date_to, $new_date_from, $new_date_to); $update_htl_tables = $obj_booking_detail->UpdateHotelCartHotelOrderOnOrderEdit($id_order, $id_room, $old_date_from, $old_date_to, $new_date_from, $new_date_to);
//Update Order Info in Customer Advance payment table //Update Order Info in Customer Advance payment table
$obj_customer_adv = new HotelCustomerAdvancedPayment(); $obj_customer_adv = new HotelCustomerAdvancedPayment();
$obj_customer_adv->updateAdvancePaymentInfoOnOrderEdit($id_order); $obj_customer_adv->updateAdvancePaymentInfoOnOrderEdit($id_order);

View File

@@ -151,7 +151,7 @@ class AdminPerformanceControllerCore extends AdminController
'input' => array( 'input' => array(
array( array(
'type' => 'switch', 'type' => 'switch',
'label' => $this->l('Disable non PrestaShop modules'), 'label' => $this->l('Disable non Native modules'),
'name' => 'native_module', 'name' => 'native_module',
'class' => 't', 'class' => 't',
'is_bool' => true, 'is_bool' => true,
@@ -167,7 +167,7 @@ class AdminPerformanceControllerCore extends AdminController
'label' => $this->l('Disabled') 'label' => $this->l('Disabled')
) )
), ),
'hint' => $this->l('Enable or disable non PrestaShop Modules.') 'hint' => $this->l('Enable or disable non Native Modules.')
), ),
array( array(
'type' => 'switch', 'type' => 'switch',
@@ -290,7 +290,7 @@ class AdminPerformanceControllerCore extends AdminController
'title' => $this->l('CCC (Combine, Compress and Cache)'), 'title' => $this->l('CCC (Combine, Compress and Cache)'),
'icon' => 'icon-fullscreen' 'icon' => 'icon-fullscreen'
), ),
'description' => $this->l('CCC allows you to reduce the loading time of your page. With these settings you will gain performance without even touching the code of your theme. Make sure, however, that your theme is compatible with PrestaShop 1.4+. Otherwise, CCC will cause problems.'), 'description' => $this->l('CCC allows you to reduce the loading time of your page. With these settings you will gain performance without even touching the code of your theme.'),
'input' => array( 'input' => array(
array( array(
'type' => 'hidden', 'type' => 'hidden',

View File

@@ -117,7 +117,7 @@ class AdminPreferencesControllerCore extends AdminController
$fields = array_merge($fields, array( $fields = array_merge($fields, array(
'PS_TOKEN_ENABLE' => array( 'PS_TOKEN_ENABLE' => array(
'title' => $this->l('Increase front office security'), 'title' => $this->l('Increase front office security'),
'desc' => $this->l('Enable or disable token in the Front Office to improve PrestaShop\'s security.'), 'desc' => $this->l('Enable or disable token in the Front Office to improve Qloapps\'s security.'),
'validation' => 'isBool', 'validation' => 'isBool',
'cast' => 'intval', 'cast' => 'intval',
'type' => 'bool', 'type' => 'bool',

View File

@@ -3374,7 +3374,7 @@ class AdminProductsControllerCore extends AdminController
$room_comment = Tools::getValue('room_comment'); $room_comment = Tools::getValue('room_comment');
$disable_dates = Tools::getValue('disableDatesJSON'); $disable_dates = Tools::getValue('disableDatesJSON');
$room_status = Tools::getValue('room_status'); $room_status = Tools::getValue('room_status');
if (count($room_num) != count($room_status)) { if (count($room_num) != count($room_status)) {
$this->errors[] = Tools::displayError('There is some problem while setting room information'); $this->errors[] = Tools::displayError('There is some problem while setting room information');
} else { } else {
@@ -3407,7 +3407,10 @@ class AdminProductsControllerCore extends AdminController
$hotelIdCategory = $objHotelInfo->id_category; $hotelIdCategory = $objHotelInfo->id_category;
$category = new Category($hotelIdCategory); $category = new Category($hotelIdCategory);
$hotelCategories = $category->getParentsCategories(); $hotelCategories = $category->getParentsCategories();
$categoryIds = array_column($hotelCategories, 'id_category'); $categoryIds = array();
foreach ($hotelCategories as $rowCateg) {
$categoryIds[] = $rowCateg['id_category'];
}
$product->updateCategories($categoryIds); $product->updateCategories($categoryIds);
// Associate categories to Room Type // Associate categories to Room Type
@@ -3506,7 +3509,7 @@ class AdminProductsControllerCore extends AdminController
$cal_date_to = date('Y-m-d', strtotime($cal_date_from) + 86400); $cal_date_to = date('Y-m-d', strtotime($cal_date_from) + 86400);
$booking_calendar_data[$cal_date_from] = $obj_booking_dtl->getBookingData($date_from, $date_to, $rm_info['id_hotel'], $obj->id, $rm_info['adult'], $rm_info['children'], 0, 1); $booking_calendar_data[$cal_date_from] = $obj_booking_dtl->getBookingData($date_from, $date_to, $rm_info['id_hotel'], $obj->id, $rm_info['adult'], $rm_info['children'], 0, 1);
// if product is inactive then booking_details will be false // if product is inactive then booking_details will be false
if (!$booking_calendar_data[$cal_date_from]) { if (!$booking_calendar_data[$cal_date_from]) {
$booking_calendar_data[$cal_date_from]['stats']['num_avail'] = 0; $booking_calendar_data[$cal_date_from]['stats']['num_avail'] = 0;

View File

@@ -74,7 +74,7 @@ class AdminSearchConfControllerCore extends AdminController
'title' => $this->l('Indexing'), 'title' => $this->l('Indexing'),
'icon' => 'icon-cogs', 'icon' => 'icon-cogs',
'info' => '<p> 'info' => '<p>
'.$this->l('The "indexed" products have been analyzed by PrestaShop and will appear in the results of a front office search.').'<br /> '.$this->l('The "indexed" products have been analyzed by Qloapps and will appear in the results of a front office search.').'<br />
'.$this->l('Indexed products').' <strong>'.(int)$indexed.' / '.(int)$total.'</strong>. '.$this->l('Indexed products').' <strong>'.(int)$indexed.' / '.(int)$total.'</strong>.
</p> </p>
<p> <p>
@@ -303,7 +303,7 @@ class AdminSearchConfControllerCore extends AdminController
'name' => 'alias', 'name' => 'alias',
'required' => true, 'required' => true,
'hint' => array( 'hint' => array(
$this->l('Enter each alias separated by a comma (e.g. \'prestshop,preztashop,prestasohp\').'), $this->l('Enter each alias separated by a comma (e.g. \'qloapps,preztashop,prestasohp\').'),
$this->l('Forbidden characters: &lt;&gt;;=#{}') $this->l('Forbidden characters: &lt;&gt;;=#{}')
) )
), ),

View File

@@ -212,17 +212,6 @@ class AdminThemesControllerCore extends AdminController
'cur_theme' => Theme::getThemeInfo($this->context->shop->id_theme), 'cur_theme' => Theme::getThemeInfo($this->context->shop->id_theme),
), ),
'submit' => array('title' => $this->l('Save')), 'submit' => array('title' => $this->l('Save')),
'buttons' => array(
'storeLink' => array(
'title' => $this->l('Visit the theme catalog'),
'icon' => 'process-icon-themes',
'href' => 'http://addons.prestashop.com/en/3-templates-prestashop'
.'?utm_source=back-office&utm_medium=theme-button'
.'&utm_campaign=back-office-'.$iso_lang_uc
.'&utm_content='.(defined('_PS_HOST_MODE_') ? 'cloud' : 'download'),
'js' => 'return !window.open(this.href)'
)
)
), ),
); );

View File

@@ -75,7 +75,7 @@ class AdminWebserviceControllerCore extends AdminController
'general' => array( 'general' => array(
'title' => $this->l('Configuration'), 'title' => $this->l('Configuration'),
'fields' => array( 'fields' => array(
'PS_WEBSERVICE' => array('title' => $this->l('Enable PrestaShop\'s webservice'), 'PS_WEBSERVICE' => array('title' => $this->l('Enable Qloapps\'s webservice'),
'desc' => $this->l('Before activating the webservice, you must be sure to: '). 'desc' => $this->l('Before activating the webservice, you must be sure to: ').
'<ol> '<ol>
<li>'.$this->l('Check that URL rewriting is available on this server.').'</li> <li>'.$this->l('Check that URL rewriting is available on this server.').'</li>

View File

@@ -26,222 +26,219 @@
class ContactControllerCore extends FrontController class ContactControllerCore extends FrontController
{ {
public $php_self = 'contact'; public $php_self = 'contact';
public $ssl = true; public $ssl = true;
/** /**
* Start forms process * Start forms process
* @see FrontController::postProcess() * @see FrontController::postProcess()
*/ */
public function postProcess() public function postProcess()
{ {
if (Tools::isSubmit('submitMessage')) if (Tools::isSubmit('submitMessage')) {
{ $extension = array('.txt', '.rtf', '.doc', '.docx', '.pdf', '.zip', '.png', '.jpeg', '.gif', '.jpg');
$extension = array('.txt', '.rtf', '.doc', '.docx', '.pdf', '.zip', '.png', '.jpeg', '.gif', '.jpg'); $file_attachment = Tools::fileAttachment('fileUpload');
$file_attachment = Tools::fileAttachment('fileUpload'); $message = Tools::getValue('message'); // Html entities is not usefull, iscleanHtml check there is no bad html tags.
$message = Tools::getValue('message'); // Html entities is not usefull, iscleanHtml check there is no bad html tags. if (!($from = trim(Tools::getValue('from'))) || !Validate::isEmail($from)) {
if (!($from = trim(Tools::getValue('from'))) || !Validate::isEmail($from)) $this->errors[] = Tools::displayError('Invalid email address.');
$this->errors[] = Tools::displayError('Invalid email address.'); } elseif (!$message) {
elseif (!$message) $this->errors[] = Tools::displayError('The message cannot be blank.');
$this->errors[] = Tools::displayError('The message cannot be blank.'); } elseif (!Validate::isCleanHtml($message)) {
elseif (!Validate::isCleanHtml($message)) $this->errors[] = Tools::displayError('Invalid message');
$this->errors[] = Tools::displayError('Invalid message'); } elseif (!($id_contact = (int)Tools::getValue('id_contact')) || !(Validate::isLoadedObject($contact = new Contact($id_contact, $this->context->language->id)))) {
elseif (!($id_contact = (int)Tools::getValue('id_contact')) || !(Validate::isLoadedObject($contact = new Contact($id_contact, $this->context->language->id)))) $this->errors[] = Tools::displayError('Please select a subject from the list provided. ');
$this->errors[] = Tools::displayError('Please select a subject from the list provided. '); } elseif (!empty($file_attachment['name']) && $file_attachment['error'] != 0) {
elseif (!empty($file_attachment['name']) && $file_attachment['error'] != 0) $this->errors[] = Tools::displayError('An error occurred during the file-upload process.');
$this->errors[] = Tools::displayError('An error occurred during the file-upload process.'); } elseif (!empty($file_attachment['name']) && !in_array(Tools::strtolower(substr($file_attachment['name'], -4)), $extension) && !in_array(Tools::strtolower(substr($file_attachment['name'], -5)), $extension)) {
elseif (!empty($file_attachment['name']) && !in_array(Tools::strtolower(substr($file_attachment['name'], -4)), $extension) && !in_array(Tools::strtolower(substr($file_attachment['name'], -5)), $extension)) $this->errors[] = Tools::displayError('Bad file extension');
$this->errors[] = Tools::displayError('Bad file extension'); } else {
else $customer = $this->context->customer;
{ if (!$customer->id) {
$customer = $this->context->customer; $customer->getByEmail($from);
if (!$customer->id) }
$customer->getByEmail($from);
$id_order = (int)$this->getOrder(); $id_order = (int)$this->getOrder();
if (!(( if (!((
($id_customer_thread = (int)Tools::getValue('id_customer_thread')) ($id_customer_thread = (int)Tools::getValue('id_customer_thread'))
&& (int)Db::getInstance()->getValue(' && (int)Db::getInstance()->getValue('
SELECT cm.id_customer_thread FROM '._DB_PREFIX_.'customer_thread cm SELECT cm.id_customer_thread FROM '._DB_PREFIX_.'customer_thread cm
WHERE cm.id_customer_thread = '.(int)$id_customer_thread.' AND cm.id_shop = '.(int)$this->context->shop->id.' AND token = \''.pSQL(Tools::getValue('token')).'\'') WHERE cm.id_customer_thread = '.(int)$id_customer_thread.' AND cm.id_shop = '.(int)$this->context->shop->id.' AND token = \''.pSQL(Tools::getValue('token')).'\'')
) || ( ) || (
$id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($from, $id_order) $id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($from, $id_order)
))) ))) {
{ $fields = Db::getInstance()->executeS('
$fields = Db::getInstance()->executeS('
SELECT cm.id_customer_thread, cm.id_contact, cm.id_customer, cm.id_order, cm.id_product, cm.email SELECT cm.id_customer_thread, cm.id_contact, cm.id_customer, cm.id_order, cm.id_product, cm.email
FROM '._DB_PREFIX_.'customer_thread cm FROM '._DB_PREFIX_.'customer_thread cm
WHERE email = \''.pSQL($from).'\' AND cm.id_shop = '.(int)$this->context->shop->id.' AND ('. WHERE email = \''.pSQL($from).'\' AND cm.id_shop = '.(int)$this->context->shop->id.' AND ('.
($customer->id ? 'id_customer = '.(int)$customer->id.' OR ' : '').' ($customer->id ? 'id_customer = '.(int)$customer->id.' OR ' : '').'
id_order = '.(int)$id_order.')'); id_order = '.(int)$id_order.')');
$score = 0; $score = 0;
foreach ($fields as $key => $row) foreach ($fields as $key => $row) {
{ $tmp = 0;
$tmp = 0; if ((int)$row['id_customer'] && $row['id_customer'] != $customer->id && $row['email'] != $from) {
if ((int)$row['id_customer'] && $row['id_customer'] != $customer->id && $row['email'] != $from) continue;
continue; }
if ($row['id_order'] != 0 && $id_order != $row['id_order']) if ($row['id_order'] != 0 && $id_order != $row['id_order']) {
continue; continue;
if ($row['email'] == $from) }
$tmp += 4; if ($row['email'] == $from) {
if ($row['id_contact'] == $id_contact) $tmp += 4;
$tmp++; }
if (Tools::getValue('id_product') != 0 && $row['id_product'] == Tools::getValue('id_product')) if ($row['id_contact'] == $id_contact) {
$tmp += 2; $tmp++;
if ($tmp >= 5 && $tmp >= $score) }
{ if (Tools::getValue('id_product') != 0 && $row['id_product'] == Tools::getValue('id_product')) {
$score = $tmp; $tmp += 2;
$id_customer_thread = $row['id_customer_thread']; }
} if ($tmp >= 5 && $tmp >= $score) {
} $score = $tmp;
} $id_customer_thread = $row['id_customer_thread'];
$old_message = Db::getInstance()->getValue(' }
}
}
$old_message = Db::getInstance()->getValue('
SELECT cm.message FROM '._DB_PREFIX_.'customer_message cm SELECT cm.message FROM '._DB_PREFIX_.'customer_message cm
LEFT JOIN '._DB_PREFIX_.'customer_thread cc on (cm.id_customer_thread = cc.id_customer_thread) LEFT JOIN '._DB_PREFIX_.'customer_thread cc on (cm.id_customer_thread = cc.id_customer_thread)
WHERE cc.id_customer_thread = '.(int)$id_customer_thread.' AND cc.id_shop = '.(int)$this->context->shop->id.' WHERE cc.id_customer_thread = '.(int)$id_customer_thread.' AND cc.id_shop = '.(int)$this->context->shop->id.'
ORDER BY cm.date_add DESC'); ORDER BY cm.date_add DESC');
if ($old_message == $message) if ($old_message == $message) {
{ $this->context->smarty->assign('alreadySent', 1);
$this->context->smarty->assign('alreadySent', 1); $contact->email = '';
$contact->email = ''; $contact->customer_service = 0;
$contact->customer_service = 0; }
}
if ($contact->customer_service) if ($contact->customer_service) {
{ if ((int)$id_customer_thread) {
if ((int)$id_customer_thread) $ct = new CustomerThread($id_customer_thread);
{ $ct->status = 'open';
$ct = new CustomerThread($id_customer_thread); $ct->id_lang = (int)$this->context->language->id;
$ct->status = 'open'; $ct->id_contact = (int)$id_contact;
$ct->id_lang = (int)$this->context->language->id; $ct->id_order = (int)$id_order;
$ct->id_contact = (int)$id_contact; if ($id_product = (int)Tools::getValue('id_product')) {
$ct->id_order = (int)$id_order; $ct->id_product = $id_product;
if ($id_product = (int)Tools::getValue('id_product')) }
$ct->id_product = $id_product; $ct->update();
$ct->update(); } else {
} $ct = new CustomerThread();
else if (isset($customer->id)) {
{ $ct->id_customer = (int)$customer->id;
$ct = new CustomerThread(); }
if (isset($customer->id)) $ct->id_shop = (int)$this->context->shop->id;
$ct->id_customer = (int)$customer->id; $ct->id_order = (int)$id_order;
$ct->id_shop = (int)$this->context->shop->id; if ($id_product = (int)Tools::getValue('id_product')) {
$ct->id_order = (int)$id_order; $ct->id_product = $id_product;
if ($id_product = (int)Tools::getValue('id_product')) }
$ct->id_product = $id_product; $ct->id_contact = (int)$id_contact;
$ct->id_contact = (int)$id_contact; $ct->id_lang = (int)$this->context->language->id;
$ct->id_lang = (int)$this->context->language->id; $ct->email = $from;
$ct->email = $from; $ct->status = 'open';
$ct->status = 'open'; $ct->token = Tools::passwdGen(12);
$ct->token = Tools::passwdGen(12); $ct->add();
$ct->add(); }
}
if ($ct->id) if ($ct->id) {
{ $cm = new CustomerMessage();
$cm = new CustomerMessage(); $cm->id_customer_thread = $ct->id;
$cm->id_customer_thread = $ct->id; $cm->message = $message;
$cm->message = $message; if (isset($file_attachment['rename']) && !empty($file_attachment['rename']) && rename($file_attachment['tmp_name'], _PS_UPLOAD_DIR_.basename($file_attachment['rename']))) {
if (isset($file_attachment['rename']) && !empty($file_attachment['rename']) && rename($file_attachment['tmp_name'], _PS_UPLOAD_DIR_.basename($file_attachment['rename']))) $cm->file_name = $file_attachment['rename'];
{ @chmod(_PS_UPLOAD_DIR_.basename($file_attachment['rename']), 0664);
$cm->file_name = $file_attachment['rename']; }
@chmod(_PS_UPLOAD_DIR_.basename($file_attachment['rename']), 0664); $cm->ip_address = (int)ip2long(Tools::getRemoteAddr());
} $cm->user_agent = $_SERVER['HTTP_USER_AGENT'];
$cm->ip_address = (int)ip2long(Tools::getRemoteAddr()); if (!$cm->add()) {
$cm->user_agent = $_SERVER['HTTP_USER_AGENT']; $this->errors[] = Tools::displayError('An error occurred while sending the message.');
if (!$cm->add()) }
$this->errors[] = Tools::displayError('An error occurred while sending the message.'); } else {
} $this->errors[] = Tools::displayError('An error occurred while sending the message.');
else }
$this->errors[] = Tools::displayError('An error occurred while sending the message.'); }
}
if (!count($this->errors)) if (!count($this->errors)) {
{ $var_list = array(
$var_list = array( '{order_name}' => '-',
'{order_name}' => '-', '{attached_file}' => '-',
'{attached_file}' => '-', '{message}' => Tools::nl2br(stripslashes($message)),
'{message}' => Tools::nl2br(stripslashes($message)), '{email}' => $from,
'{email}' => $from, '{product_name}' => '',
'{product_name}' => '', );
);
if (isset($file_attachment['name'])) if (isset($file_attachment['name'])) {
$var_list['{attached_file}'] = $file_attachment['name']; $var_list['{attached_file}'] = $file_attachment['name'];
}
$id_product = (int)Tools::getValue('id_product'); $id_product = (int)Tools::getValue('id_product');
if (isset($ct) && Validate::isLoadedObject($ct) && $ct->id_order) if (isset($ct) && Validate::isLoadedObject($ct) && $ct->id_order) {
{ $order = new Order((int)$ct->id_order);
$order = new Order((int)$ct->id_order); $var_list['{order_name}'] = $order->getUniqReference();
$var_list['{order_name}'] = $order->getUniqReference(); $var_list['{id_order}'] = (int)$order->id;
$var_list['{id_order}'] = (int)$order->id; }
}
if ($id_product) if ($id_product) {
{ $product = new Product((int)$id_product);
$product = new Product((int)$id_product); if (Validate::isLoadedObject($product) && isset($product->name[Context::getContext()->language->id])) {
if (Validate::isLoadedObject($product) && isset($product->name[Context::getContext()->language->id])) $var_list['{product_name}'] = $product->name[Context::getContext()->language->id];
$var_list['{product_name}'] = $product->name[Context::getContext()->language->id]; }
} }
if (empty($contact->email)) if (empty($contact->email)) {
Mail::Send($this->context->language->id, 'contact_form', ((isset($ct) && Validate::isLoadedObject($ct)) ? sprintf(Mail::l('Your message has been correctly sent #ct%1$s #tc%2$s'), $ct->id, $ct->token) : Mail::l('Your message has been correctly sent')), $var_list, $from, null, null, null, $file_attachment); Mail::Send($this->context->language->id, 'contact_form', ((isset($ct) && Validate::isLoadedObject($ct)) ? sprintf(Mail::l('Your message has been correctly sent #ct%1$s #tc%2$s'), $ct->id, $ct->token) : Mail::l('Your message has been correctly sent')), $var_list, $from, null, null, null, $file_attachment);
else } else {
{ if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form').' [no_sync]',
if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form').' [no_sync]', $var_list, $contact->email, $contact->name, null, null,
$var_list, $contact->email, $contact->name, null, null, $file_attachment, null, _PS_MAIL_DIR_, false, null, null, $from) ||
$file_attachment, null, _PS_MAIL_DIR_, false, null, null, $from) || !Mail::Send($this->context->language->id, 'contact_form', ((isset($ct) && Validate::isLoadedObject($ct)) ? sprintf(Mail::l('Your message has been correctly sent #ct%1$s #tc%2$s'), $ct->id, $ct->token) : Mail::l('Your message has been correctly sent')), $var_list, $from, null, null, null, $file_attachment, null, _PS_MAIL_DIR_, false, null, null, $contact->email)) {
!Mail::Send($this->context->language->id, 'contact_form', ((isset($ct) && Validate::isLoadedObject($ct)) ? sprintf(Mail::l('Your message has been correctly sent #ct%1$s #tc%2$s'), $ct->id, $ct->token) : Mail::l('Your message has been correctly sent')), $var_list, $from, null, null, null, $file_attachment, null, _PS_MAIL_DIR_, false, null, null, $contact->email)) $this->errors[] = Tools::displayError('An error occurred while sending the message.');
$this->errors[] = Tools::displayError('An error occurred while sending the message.'); }
} }
} }
if (count($this->errors) > 1) if (count($this->errors) > 1) {
array_unique($this->errors); array_unique($this->errors);
elseif (!count($this->errors)) } elseif (!count($this->errors)) {
$this->context->smarty->assign('confirmation', 1); $this->context->smarty->assign('confirmation', 1);
} }
} }
} }
}
public function setMedia() public function setMedia()
{ {
parent::setMedia(); parent::setMedia();
$this->addCSS(_THEME_CSS_DIR_.'contact-form.css'); $this->addCSS(_THEME_CSS_DIR_.'contact-form.css');
$this->addJS(_THEME_JS_DIR_.'contact-form.js'); $this->addJS(_THEME_JS_DIR_.'contact-form.js');
$this->addJS(_PS_JS_DIR_.'validate.js'); $this->addJS(_PS_JS_DIR_.'validate.js');
// GOOGLE MAP // GOOGLE MAP
$language = $this->context->language; $language = $this->context->language;
$country = $this->context->country; $country = $this->context->country;
$WK_GOOGLE_API_KEY = Configuration::get('WK_GOOGLE_API_KEY'); $WK_GOOGLE_API_KEY = Configuration::get('WK_GOOGLE_API_KEY');
$this->addJs("https://maps.googleapis.com/maps/api/js?key=$WK_GOOGLE_API_KEY&libraries=places&language=$language->iso_code&region=$country->iso_code"); $this->addJs("https://maps.googleapis.com/maps/api/js?key=$WK_GOOGLE_API_KEY&libraries=places&language=$language->iso_code&region=$country->iso_code");
} }
/** /**
* Assign template vars related to page content * Assign template vars related to page content
* @see FrontController::initContent() * @see FrontController::initContent()
*/ */
public function initContent() public function initContent()
{ {
parent::initContent(); parent::initContent();
$this->assignOrderList(); $this->assignOrderList();
$email = Tools::safeOutput(Tools::getValue('from', $email = Tools::safeOutput(Tools::getValue('from',
((isset($this->context->cookie) && isset($this->context->cookie->email) && Validate::isEmail($this->context->cookie->email)) ? $this->context->cookie->email : ''))); ((isset($this->context->cookie) && isset($this->context->cookie->email) && Validate::isEmail($this->context->cookie->email)) ? $this->context->cookie->email : '')));
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'errors' => $this->errors, 'errors' => $this->errors,
'email' => $email, 'email' => $email,
'fileupload' => Configuration::get('PS_CUSTOMER_SERVICE_FILE_UPLOAD'), 'fileupload' => Configuration::get('PS_CUSTOMER_SERVICE_FILE_UPLOAD'),
'max_upload_size' => (int)Tools::getMaxUploadSize() 'max_upload_size' => (int)Tools::getMaxUploadSize()
)); ));
if (($id_customer_thread = (int)Tools::getValue('id_customer_thread')) && $token = Tools::getValue('token')) if (($id_customer_thread = (int)Tools::getValue('id_customer_thread')) && $token = Tools::getValue('token')) {
{ $customer_thread = Db::getInstance()->getRow('
$customer_thread = Db::getInstance()->getRow('
SELECT cm.* SELECT cm.*
FROM '._DB_PREFIX_.'customer_thread cm FROM '._DB_PREFIX_.'customer_thread cm
WHERE cm.id_customer_thread = '.(int)$id_customer_thread.' WHERE cm.id_customer_thread = '.(int)$id_customer_thread.'
@@ -249,81 +246,107 @@ class ContactControllerCore extends FrontController
AND token = \''.pSQL($token).'\' AND token = \''.pSQL($token).'\'
'); ');
$order = new Order((int)$customer_thread['id_order']); $order = new Order((int)$customer_thread['id_order']);
if (Validate::isLoadedObject($order)) if (Validate::isLoadedObject($order)) {
$customer_thread['reference'] = $order->getUniqReference(); $customer_thread['reference'] = $order->getUniqReference();
$this->context->smarty->assign('customerThread', $customer_thread); }
} $this->context->smarty->assign('customerThread', $customer_thread);
$global_phone_num = Configuration::get('WK_HOTEL_GLOBAL_CONTACT_NUMBER'); }
$global_email = Configuration::get('WK_HOTEL_GLOBAL_CONTACT_EMAIL'); // Send Hotel location information
$this->context->smarty->assign(array( $gblHtlAddress = Configuration::get('WK_HOTEL_GLOBAL_ADDRESS');
'global_phone_num' => $global_phone_num, $gblHtlPhone = Configuration::get('WK_HOTEL_GLOBAL_CONTACT_NUMBER');
'global_email' => $global_email, $gblHtlEmail = Configuration::get('WK_HOTEL_GLOBAL_CONTACT_EMAIL');
'contacts' => Contact::getContacts($this->context->language->id), $objHotelInfo = new HotelBranchInformation();
'message' => html_entity_decode(Tools::getValue('message')) if ($hotelsInfo = $objHotelInfo->hotelBranchesInfo(false, 1, 1)) {
)); foreach ($hotelsInfo as &$hotel) {
if (isset($hotel['id_cover_img'])
&& $hotel['id_cover_img']
&& Validate::isLoadedObject(
$objHtlImg = new HotelImage($hotel['id_cover_img'])
)
) {
if (file_exists(
_PS_MODULE_DIR_.'hotelreservationsystem/views/img/hotel_img/'.$objHtlImg->hotel_image_id.'.jpg'
)) {
$hotel['image_url'] = _MODULE_DIR_.'hotelreservationsystem/views/img/hotel_img/'.
$objHtlImg->hotel_image_id.'.jpg';
} else {
$hotel['image_url'] = _MODULE_DIR_.'hotelreservationsystem/views/img/Slices/black-opacity-5.png';
}
} else {
$hotel['image_url'] = _MODULE_DIR_.'hotelreservationsystem/views/img/Slices/black-opacity-5.png';
}
}
}
$this->context->smarty->assign(
array(
'hotelsInfo' => $hotelsInfo,
'gblHtlPhone' => $gblHtlPhone,
'gblHtlEmail' => $gblHtlEmail,
'gblHtlAddress' => $gblHtlAddress,
'contacts' => Contact::getContacts($this->context->language->id),
'message' => html_entity_decode(Tools::getValue('message'))
)
);
//By webkul to send hotels Map Informations for google Map. //By webkul to send hotels Map Informations for google Map.
if (Configuration::get('WK_GOOGLE_ACTIVE_MAP')) { if (Configuration::get('WK_GOOGLE_ACTIVE_MAP')) {
$hotel_branch = new HotelBranchInformation(); $hotelLocationArray = $objHotelInfo->getMapFormatHotelsInfo(Configuration::get('WK_MAP_HOTEL_ACTIVE_ONLY'));
$hotelLocationArray = $hotel_branch->getMapFormatHotelsInfo(Configuration::get('WK_MAP_HOTEL_ACTIVE_ONLY')); if ($hotelLocationArray) {
if ($hotelLocationArray) { $this->context->smarty->assign('hotelLocationArray', Tools::jsonEncode($hotelLocationArray));
$this->context->smarty->assign('hotelLocationArray', Tools::jsonEncode($hotelLocationArray)); }
} }
} //End
//End $this->setTemplate(_PS_THEME_DIR_.'contact-form.tpl');
$this->setTemplate(_PS_THEME_DIR_.'contact-form.tpl'); }
}
/** /**
* Assign template vars related to order list and product list ordered by the customer * Assign template vars related to order list and product list ordered by the customer
*/ */
protected function assignOrderList() protected function assignOrderList()
{ {
if ($this->context->customer->isLogged()) if ($this->context->customer->isLogged()) {
{ $this->context->smarty->assign('isLogged', 1);
$this->context->smarty->assign('isLogged', 1);
$products = array(); $products = array();
$result = Db::getInstance()->executeS(' $result = Db::getInstance()->executeS('
SELECT id_order SELECT id_order
FROM '._DB_PREFIX_.'orders FROM '._DB_PREFIX_.'orders
WHERE id_customer = '.(int)$this->context->customer->id.Shop::addSqlRestriction(Shop::SHARE_ORDER).' ORDER BY date_add'); WHERE id_customer = '.(int)$this->context->customer->id.Shop::addSqlRestriction(Shop::SHARE_ORDER).' ORDER BY date_add');
$orders = array(); $orders = array();
foreach ($result as $row) foreach ($result as $row) {
{ $order = new Order($row['id_order']);
$order = new Order($row['id_order']); $date = explode(' ', $order->date_add);
$date = explode(' ', $order->date_add); $tmp = $order->getProducts();
$tmp = $order->getProducts(); foreach ($tmp as $key => $val) {
foreach ($tmp as $key => $val) $products[$row['id_order']][$val['product_id']] = array('value' => $val['product_id'], 'label' => $val['product_name']);
$products[$row['id_order']][$val['product_id']] = array('value' => $val['product_id'], 'label' => $val['product_name']); }
$orders[] = array('value' => $order->id, 'label' => $order->getUniqReference().' - '.Tools::displayDate($date[0], null) , 'selected' => (int)$this->getOrder() == $order->id); $orders[] = array('value' => $order->id, 'label' => $order->getUniqReference().' - '.Tools::displayDate($date[0], null) , 'selected' => (int)$this->getOrder() == $order->id);
} }
$this->context->smarty->assign('orderList', $orders); $this->context->smarty->assign('orderList', $orders);
$this->context->smarty->assign('orderedProductList', $products); $this->context->smarty->assign('orderedProductList', $products);
} }
} }
protected function getOrder() protected function getOrder()
{ {
$id_order = false; $id_order = false;
if (!is_numeric($reference = Tools::getValue('id_order'))) if (!is_numeric($reference = Tools::getValue('id_order'))) {
{ $reference = ltrim($reference, '#');
$reference = ltrim($reference, '#'); $orders = Order::getByReference($reference);
$orders = Order::getByReference($reference); if ($orders) {
if ($orders) foreach ($orders as $order) {
foreach ($orders as $order) $id_order = $order->id;
{ break;
$id_order = $order->id; }
break; }
} } else {
} $id_order = Tools::getValue('id_order');
else }
$id_order = Tools::getValue('id_order'); return (int)$id_order;
return (int)$id_order; }
}
} }

View File

@@ -1,487 +0,0 @@
<?php
class HotelRoomTypeFeaturePricing extends ObjectModel
{
public $id_product;
public $feature_price_name;
public $date_selection_type;
public $date_from;
public $date_to;
public $is_special_days_exists;
public $special_days;
public $impact_way;
public $impact_type;
public $impact_value;
public $active;
public $date_add;
public $date_upd;
public static $definition = array(
'table' => 'htl_room_type_feature_pricing',
'primary' => 'id',
'fields' => array(
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'feature_price_name' => array('type' => self::TYPE_STRING),
'date_from' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'date_to' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'impact_way' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'is_special_days_exists' => array('type' => self::TYPE_INT),
'date_selection_type' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'special_days' => array('type' => self::TYPE_STRING),
'impact_type' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'impact_value' => array('type' => self::TYPE_FLOAT),
'active' => array('type' => self::TYPE_INT),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
));
public function __construct($id = null, $id_lang = null, $id_shop = null)
{
$this->moduleInstance = Module::getInstanceByName('hotelreservationsystem');
parent::__construct($id);
}
/**
* [getRoomTypeActiveFeaturePrices returns room type active feature price plans]
* @param [int] $id_product [id of the product]
* @return [array|false] [returns array of all active feature plans of the room type if found else returns false]
*/
public static function getRoomTypeActiveFeaturePrices($id_product)
{
return Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` WHERE `id_product`='.(int) $id_product.' AND `active`=1');
}
/**
* [getRoomTypeActiveFeaturePricesByDateRange returns room type active feature price plans by supplied date Range]
* @param [int] $id_product [id of the product]
* @param [date] $date_from [start date of the date range]
* @param [date] $date_to [end date of the date range]
* @return [array|false] [returns array of all active feature plans of the room type if found else returns false]
*/
public static function getRoomTypeActiveFeaturePricesByDateRange($id_product, $date_from, $date_to)
{
return Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` WHERE (`id_product`=0 OR `id_product`='.(int) $id_product.') AND `active`=1 AND `date_from` <= \''.$date_to.'\' AND `date_to` >= \''.$date_from.'\'');
}
/**
* [checkRoomTypeFeaturePriceExistance returns room type active feature price plan by supplied date Range and supplied feature price plan type else returns false]
* @param [int] $id_product [id of the product]
* @param [date] $date_from [start date of the date range]
* @param [date] $date_to [end date of the date range]
* @param [type] $type [Type of the feature price plan must be among 'specific_date', 'special_day' and 'date_range']
* @return [array|false] [returns room type active feature price plan by supplied date Range and supplied feature price plan type else returns false]
*/
public function checkRoomTypeFeaturePriceExistance($id_product, $date_from, $date_to, $type='date_range', $current_Special_days=false, $id_feature_price=0)
{
if ($type == 'specific_date') {
return Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` WHERE `id_product`='.(int) $id_product.' AND `date_selection_type`=2 AND `date_from` = \''.$date_from.'\' AND `id`!='.(int)$id_feature_price);
} else if ($type == 'special_day') {
$featurePrice = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` WHERE `id_product`='.(int) $id_product.' AND `is_special_days_exists`=1 AND `active`=1 AND `date_from` < \''.$date_to.'\' AND `date_to` > \''.$date_from.'\' AND `id`!='.(int)$id_feature_price);
if ($featurePrice) {
$specialDays = Tools::jsonDecode($featurePrice['special_days']);
$currentSpecialDays = Tools::jsonDecode($current_Special_days);
$commonValues = array_intersect ($specialDays , $currentSpecialDays);
if ($commonValues) {
return $featurePrice;
}
}
return false;
} else if ($type == 'date_range') {
return Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` WHERE `id_product`='.(int) $id_product.' AND `date_selection_type`=1 AND `is_special_days_exists`=0 AND `date_from` < \''.$date_to.'\' AND `date_to` > \''.$date_from.'\' AND `id`!='.(int)$id_feature_price);
}
}
/**
* [countFeaturePriceSpecialDays returns number of special days between a date range]
* @param [array] $specialDays [array containing special days to be counted]
* @param [date] $date_from [start date of the date range]
* @param [date] $date_to [end date of the date range]
* @return [int] [number of special days]
*/
public static function countFeaturePriceSpecialDays($specialDays, $date_from, $date_to)
{
$totalDaySeconds = 24*60*60;
$specialDaysCount = 0;
for ($date = strtotime($date_from); $date <= strtotime($date_to)-$totalDaySeconds; $date = ($date + $totalDaySeconds)) {
if (in_array(strtolower(Date('D', $date)), $specialDays)) {
$specialDaysCount++;
}
}
return $specialDaysCount;
}
/**
* [getHotelRoomTypesRatesByDate returns hotel room types rates accrding to feature price plans]
* @param [int] $id_hotel [id of th hotel]
* @param integer $id_product [id of the product if supplied only rates of this room type will be returned]
* @param [date] $date_from [start date of the date range]
* @param [date] $date_to [end date of the date range]
* @return [array|false] [returns array containing rates of room type of a hotel if found else returns false]
*/
public function getHotelRoomTypesRatesAndInventoryByDate($id_hotel, $id_product=0, $date_from, $date_to)
{
$totalDaySeconds = 24*60*60;
$hotelRoomType = new HotelRoomType();
$context = Context::getContext();
$roomTypeRatesAndInventory = array();
$hotelCartBookingData = new HotelCartBookingData();
$objBookingDetail = new HotelBookingDetail();
$incr = 0;
for ($date = strtotime($date_from); $date <= strtotime($date_to); $date = ($date + $totalDaySeconds)) {
$currentDate = date('Y-m-d', $date);
$nextDayDate = date('Y-m-d', strtotime($currentDate) + 86400);
if ($id_product) {
$roomTypeAvailabilityInfo = $objBookingDetail->DataForFrontSearch($currentDate, $nextDayDate, $id_hotel, $id_product, 1, 0, 0, -1, 0, 0);
if (isset($roomTypeAvailabilityInfo['stats']['num_avail'])) {
$totalAvailableRooms = $roomTypeAvailabilityInfo['stats']['num_avail'];
} else {
$totalAvailableRooms = 0;
}
$roomTypePrice = $hotelCartBookingData->getRoomTypeTotalPrice($id_product, $currentDate, $nextDayDate);
$roomTypeRatesAndInventory[$incr]['date'] = $currentDate;
$roomTypeRatesAndInventory[$incr]['room_types'][0]['id'] = $id_product;
$roomTypeRatesAndInventory[$incr]['room_types'][0]['rates'] = $roomTypePrice;
$roomTypeRatesAndInventory[$incr]['room_types'][0]['available_rooms'] = $totalAvailableRooms;
} else {
$hotelRoomTypes = $hotelRoomType->getRoomTypeByHotelId($id_hotel, $context->language->id);
if ($hotelRoomTypes) {
$roomTypeRatesAndInventory[$incr]['date'] = $currentDate;
foreach ($hotelRoomTypes as $key => $product) {
$roomTypePrice = $hotelCartBookingData->getRoomTypeTotalPrice($product['id_product'], $currentDate, $nextDayDate);
$roomTypeAvailabilityInfo = $objBookingDetail->DataForFrontSearch($currentDate, $nextDayDate, $id_hotel, $product['id_product'], 1, 0, 0, -1, 0, 0);
if (isset($roomTypeAvailabilityInfo['stats']['num_avail'])) {
$totalAvailableRooms = $roomTypeAvailabilityInfo['stats']['num_avail'];
} else {
$totalAvailableRooms = 0;
}
$roomTypeRatesAndInventory[$incr]['room_types'][$key]['id'] = $product['id_product'];
$roomTypeRatesAndInventory[$incr]['room_types'][$key]['rates'] = $roomTypePrice;
$roomTypeRatesAndInventory[$incr]['room_types'][$key]['available_rooms'] = $totalAvailableRooms;
}
} else {
return false;
}
}
$incr++;
}
return $roomTypeRatesAndInventory;
}
/**
* [updateRoomTypesFeaturePrices update and creates feature price plans by supplied information]
* @param [array] $featurePricePlans [feature price plans sent from channel manager]
* @return [array] [success if process is finished successfully else fasiled with errors]
* @information [if any feature price plan for the same date_from and date_to(supplied in the $featurePricePlans array) it will be updated otherwise it is added. While adding date range type rate plans if any plan already exist then feature price for all specific dates in the date range will be created (or updated if specific date feature price plan exists)]
*/
public function updateRoomTypesFeaturePricesAvailability($featurePricePlans)
{
$moduleInstance = new HotelReservationSystem();
$this->errors = array();
if ($featurePricePlans) {
$totalDaySeconds = 24*60*60;
if (isset($featurePricePlans['data']) && $featurePricePlans['data']) {
foreach ($featurePricePlans['data'] as $roomTypeRatesData) {
$dateFrom = date('Y-m-d', strtotime($roomTypeRatesData['dateFrom']));
$dateTo = date('Y-m-d', strtotime($roomTypeRatesData['dateTo']) + 86400);
if ($roomTypeRatesData['roomType']) {
foreach ($roomTypeRatesData['roomType'] as $key => $roomTypeRates) {
$id_product = $key;
// feature price rates create and updates
if (isset($roomTypeRates['rate'])) {
//$productPriceTE = Product::getPriceStatic((int) $id_product, false);
$productPriceTE = 1000;
if ($productPriceTE != $roomTypeRates['rate']) {
if ($productPriceTE > $roomTypeRates['rate']) {
$priceImpactWay = 1;
$impactValue = $productPriceTE - $roomTypeRates['rate'];
} else {
$priceImpactWay = 2;
$impactValue = $roomTypeRates['rate'] - $productPriceTE;
}
$params = array();
$params['roomTypeId'] = $id_product;
$params['featurePriceName'] = 'Test Feature Price';
$params['dateFrom'] = $dateFrom;
$params['dateTo'] = $dateTo;
$params['priceImpactWay'] = $priceImpactWay;
$params['isSpecialDaysExists'] = 0;
$params['jsonSpecialDays'] = null;
$params['priceImpactType'] = 2;
$params['impactValue'] = $impactValue;
$params['enableFeaturePrice'] = 1;
$nextDate = date('Y-m-d', strtotime($dateFrom) + 86400);
if ($nextDate == $dateTo) {
$params['dateSelectionType'] = 2;
$featurePriceExists = $this->checkRoomTypeFeaturePriceExistance($id_product, $dateFrom, $dateTo, $type='specific_date');
if ($featurePriceExists) {
if (!$this->saveFeaturePricePlan($featurePriceExists['id'], 2, $params)) {
$this->errors[] = $this->moduleInstance->l('Some error occured while saving Feature Price Plan Info:: Date From : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Date To : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Room Type Id : ', 'HotelRoomTypeFeaturePricing').$params['roomTypeId'];
}
} else {
if (!$this->saveFeaturePricePlan(0, 2, $params)) {
$this->errors[] = $this->moduleInstance->l('Some error occured while saving Feature Price Plan Info:: Date From : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Date To : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Room Type Id : ', 'HotelRoomTypeFeaturePricing').$params['roomTypeId'];
}
}
} else {
$params['dateSelectionType'] = 1;
$featurePriceExists = $this->checkRoomTypeFeaturePriceExistance($id_product, $dateFrom, $dateTo, $type='date_range');
if ($featurePriceExists) {
if ($featurePriceExists['date_from'] == $dateFrom && $featurePriceExists['date_to'] == $dateTo) {
if (!$this->saveFeaturePricePlan($featurePriceExists['id'], 1, $params)) {
$this->errors[] = $this->moduleInstance->l('Some error occured while saving Feature Price Plan Info:: Date From : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Date To : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Room Type Id : ', 'HotelRoomTypeFeaturePricing').$params['roomTypeId'];
}
} else {
for ($date = strtotime($dateFrom); $date <= strtotime($dateTo)-$totalDaySeconds; $date = ($date + $totalDaySeconds)) {
$currentDate = date('Y-m-d', $date);
$nextDayDate = date('Y-m-d', strtotime($currentDate) + 86400);
$params['dateFrom'] = $currentDate;
$params['dateTo'] = $nextDayDate;
$params['dateSelectionType'] = 2;
$featurePriceExists = $this->checkRoomTypeFeaturePriceExistance($id_product, $currentDate, $nextDayDate, $type='specific_date');
if ($featurePriceExists) {
if (!$this->saveFeaturePricePlan($featurePriceExists['id'], 2, $params)) {
$this->errors[] = $this->moduleInstance->l('Some error occured while saving Feature Price Plan Info:: Date From : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Date To : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Room Type Id : ', 'HotelRoomTypeFeaturePricing').$params['roomTypeId'];
}
} else {
if (!$this->saveFeaturePricePlan(0, 2, $params)) {
$this->errors[] = $this->moduleInstance->l('Some error occured while saving Feature Price Plan Info:: Date From : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Date To : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Room Type Id : ', 'HotelRoomTypeFeaturePricing').$params['roomTypeId'];
}
}
}
}
} else {
if (!$this->saveFeaturePricePlan(0, 1, $params)) {
$this->errors[] = $this->moduleInstance->l('Some error occured while saving Feature Price Plan Info:: Date From : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Date To : ', 'HotelRoomTypeFeaturePricing').$params['dateFrom'].$this->moduleInstance->l(' Room Type Id : ', 'HotelRoomTypeFeaturePricing').$params['roomTypeId'];
}
}
}
}
}
if (isset($roomTypeRates['inventory'])) {
$totalAvailableNotBooked = 0;
$totalAvailableRooms = 0;
$totalRooms = 0;
$hotelRoomType = new HotelRoomType();
$hotelBookingDetail = new HotelBookingDetail();
$hotelRoomInformation = new HotelRoomInformation();
$roomTypeInfo = $hotelRoomType->getRoomTypeInfoByIdProduct($id_product);
$id_hotel = $roomTypeInfo['id_hotel'];
if ($id_hotel) {
$roomTypeAvailabilityInfo = $hotelBookingDetail->DataForFrontSearch($dateFrom, $dateTo, $id_hotel, $id_product, 1, 0, 0, -1, 0, 0);
$bookedRoomsInfo = $hotelRoomInformation->getRoomTypeBookedRoomsForDateRange($id_hotel, $id_product, $dateFrom, $dateTo);
$countBookedRooms = count($bookedRoomsInfo);
if (isset($roomTypeAvailabilityInfo['stats']['total_rooms'])) {
$totalRooms = $roomTypeAvailabilityInfo['stats']['total_rooms'];
$totalAvailableNotBooked = $roomTypeAvailabilityInfo['stats']['total_rooms'] - $countBookedRooms;
$totalAvailableRooms = $roomTypeAvailabilityInfo['stats']['num_avail'];
}
p($totalAvailableRooms);
p($roomTypeRates['inventory']);
p($totalAvailableNotBooked);
die;
if ($roomTypeRates['inventory'] <= $totalAvailableNotBooked) {
if ($roomTypeRates['inventory'] < $totalAvailableRooms) {
$numDisabledRooms = $totalAvailableRooms - $roomTypeRates['inventory'];
$availableRooms = $hotelRoomInformation->getRoomTypeAvailableRoomsForDateRange($id_hotel, $id_product, $dateFrom, $dateTo);
if ($availableRooms) {
foreach ($availableRooms as $room_k => $room) {
$disabledDates = array();
$hotelRoomInformation = new HotelRoomInformation($room['id']);
if ($hotelRoomInformation->id_status == 3) {
$disabledDates = Tools::jsonDecode($hotelRoomInformation->disabled_dates, true);
for ($date = strtotime($dateFrom); $date <= strtotime($dateTo)-$totalDaySeconds; $date = ($date + $totalDaySeconds)) {
$currentDate = date('Y-m-d', $date);
/*if ($numDisabledRooms > 0) {
if (isset($disabledDates[$currentDate])) {
unset($disabledDates[$currentDate]);
}
}*/
$disabledDates[$currentDate]['reason'] = 'Disabled from channel manager.';
}
} else {
if ($numDisabledRooms > 0) {
for ($date = strtotime($dateFrom); $date <= strtotime($dateTo)-$totalDaySeconds; $date = ($date + $totalDaySeconds)) {
$currentDate = date('Y-m-d', $date);
$disabledDates[$currentDate]['reason'] = 'Disabled from channel manager.';
}
$hotelRoomInformation->id_status = 3;
}
}
$hotelRoomInformation->disabled_dates = Tools::jsonEncode($disabledDates);
$hotelRoomInformation->save();
$numDisabledRooms--;
}
}
} else if ($roomTypeRates['inventory'] >= $totalAvailableRooms) {
$roomsToEnable = $roomTypeRates['inventory'] - $totalAvailableRooms;
$disabledRooms = $hotelRoomInformation->getRoomTypeDisabledRoomsForDateRange($id_hotel, $id_product, $dateFrom, $dateTo);
if ($disabledRooms) {
foreach ($disabledRooms as $k_rm => $disableRoom) {
$hotelRoomInformation = new HotelRoomInformation($disableRoom['id']);
$disabledDates = Tools::jsonDecode($hotelRoomInformation->disabled_dates, true);
for ($date = strtotime($dateFrom); $date <= strtotime($dateTo)-$totalDaySeconds; $date = ($date + $totalDaySeconds)) {
$currentDate = date('Y-m-d', $date);
$disabledDates[$currentDate]['reason'] = 'Disabled from channel manager.';
if ($roomsToEnable > 0) {
if (isset($disabledDates[$currentDate])) {
unset($disabledDates[$currentDate]);
}
}
}
$hotelRoomInformation->disabled_dates = Tools::jsonEncode($disabledDates);
if (!count($disabledDates)) {
$hotelRoomInformation->id_status = 1;
$hotelRoomInformation->disabled_dates = null;
}
$hotelRoomInformation->save();
$roomsToEnable--;
}
}
}
}
}
} else {
$this->errors[] = $this->moduleInstance->l('Requested rooms inventory is not available.');
}
}
} else {
$this->errors[] = $this->moduleInstance->l('Room Types for which Feature prices to be updated are not found.', 'HotelRoomTypeFeaturePricing');
}
}
} else {
$this->errors[] = $this->moduleInstance->l('Update Information not found.', 'HotelRoomTypeFeaturePricing');
}
} else {
$this->errors[] = $this->moduleInstance->l('Update Information not found.', 'HotelRoomTypeFeaturePricing');
}
if (count($this->errors)) {
$result['status'] = 'failed';
$result['errors'] = $this->errors;
} else {
$result['status'] = 'success';
}
return $result;
}
/**
* [saveFeaturePricePlan add or update feature price plan]
* @param integer $id [id of the feature price plan if 0 means to add else to update the feature price plan]
* @param [int] $dateSelectionType [date selection type 1 or 2 (date range or specific date)]
* @param [array] $params [Room type rate plan info]
* @return [bool] [returns true is successfuly added or updated else returns false]
*/
public function saveFeaturePricePlan($id=0, $dateSelectionType, $params)
{
if ($id) {
$roomTypeFeaturePricing = new HotelRoomTypeFeaturePricing($id);
} else {
$roomTypeFeaturePricing = new HotelRoomTypeFeaturePricing();
}
$roomTypeFeaturePricing->id_product = $params['roomTypeId'];
$roomTypeFeaturePricing->feature_price_name = $params['featurePriceName'];
$roomTypeFeaturePricing->date_selection_type = $params['dateSelectionType'];
if ($dateSelectionType == 1) {
$roomTypeFeaturePricing->date_from = $params['dateFrom'];
$roomTypeFeaturePricing->date_to = $params['dateTo'];
} else {
$roomTypeFeaturePricing->date_from = $params['dateFrom'];
$roomTypeFeaturePricing->date_to = $params['dateTo'];
}
$roomTypeFeaturePricing->impact_way = $params['priceImpactWay'];
$roomTypeFeaturePricing->is_special_days_exists = $params['isSpecialDaysExists'];
$roomTypeFeaturePricing->special_days = $params['jsonSpecialDays'];
$roomTypeFeaturePricing->impact_type = $params['priceImpactType'];
$roomTypeFeaturePricing->impact_value = $params['impactValue'];
$roomTypeFeaturePricing->active = $params['enableFeaturePrice'];
return $roomTypeFeaturePricing->save();
}
/**
* [getRoomTypeTotalPrice Returns Total price of the room type according to supplied dates].
*
* @param [int] $id_product [id of the room type]
* @param [date] $date_from [date from]
* @param [date] $date_to [date to]
*
* @return [float] [Returns Total price of the room type]
*/
public static function getRoomTypeTotalPrice($id_product, $date_from, $date_to)
{
$totalDaySeconds = 24 * 60 * 60;
$totalPrice = array();
$totalPrice['total_price_tax_incl'] = 0;
$totalPrice['total_price_tax_excl'] = 0;
$featureImpactPriceTE = 0;
$featureImpactPriceTI = 0;
$productPriceTI = Product::getPriceStatic((int) $id_product, true);
$productPriceTE = Product::getPriceStatic((int) $id_product, false);
//$productPriceTI = 1000;
//$productPriceTE = 1000;
$hotelCartBookingData = new HotelCartBookingData();
for ($date = strtotime($date_from); $date <= (strtotime($date_to)-$totalDaySeconds); $date = ($date+$totalDaySeconds)) {
$currentDate = date('Y-m-d', $date);
$featurePrice = $hotelCartBookingData->getProductFeaturePricePlanByDateByPriority($id_product, $currentDate);
if ($featurePrice) {
if ($featurePrice['impact_type'] == 1) {
//percentage
$featureImpactPriceTE = $productPriceTE * ($featurePrice['impact_value'] / 100);
$featureImpactPriceTI = $productPriceTI * ($featurePrice['impact_value'] / 100);
} else {
//Fixed Price
$featureImpactPriceTE = $featurePrice['impact_value'];
$featureImpactPriceTI = $featurePrice['impact_value'];
}
if ($featurePrice['impact_way'] == 1) {
// Decrease
$priceWithFeatureTE = ($productPriceTE - $featureImpactPriceTE);
$priceWithFeatureTI = ($productPriceTI - $featureImpactPriceTI);
} else {
// Increase
$priceWithFeatureTE = ($productPriceTE + $featureImpactPriceTE);
$priceWithFeatureTI = ($productPriceTI + $featureImpactPriceTI);
}
if ($priceWithFeatureTI < 0) {
$priceWithFeatureTI = 0;
$priceWithFeatureTE = 0;
}
$totalPrice['total_price_tax_incl'] += $priceWithFeatureTI;
$totalPrice['total_price_tax_excl'] += $priceWithFeatureTE;
} else {
$totalPrice['total_price_tax_incl'] += $productPriceTI;
$totalPrice['total_price_tax_excl'] += $productPriceTE;
}
}
return $totalPrice;
}
/**
* [getRoomTypeFeaturePricePerDay returns per day feature price od the Room Type]
* @param [int] $id_product [id of the product]
* @param [date] $date_from [start date]
* @param [date] $date_to [end date]
* @return [float] [returns per day feature price od the Room Type]
*/
public static function getRoomTypeFeaturePricesPerDay($id_product, $date_from, $date_to, $use_tax=true)
{
$dateFrom = date('Y-m-d', strtotime($date_from));
$dateTo = date('Y-m-d', strtotime($date_to));
$totalDurationPrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($id_product, $dateFrom, $dateTo);
$totalDurationPriceTE = $totalDurationPrice['total_price_tax_incl'];
$totalDurationPriceTI = $totalDurationPrice['total_price_tax_excl'];
$objHotelBookingDetail = new HotelBookingDetail();
$numDaysInDuration = $objHotelBookingDetail->getNumberOfDays($dateFrom, $dateTo);
if ($use_tax) {
$pricePerDay = $totalDurationPriceTI/$numDaysInDuration;
} else {
$pricePerDay = $totalDurationPriceTE/$numDaysInDuration;
}
return $pricePerDay;
}
}

View File

@@ -109,6 +109,7 @@ class OrderConfirmationControllerCore extends FrontController
$cartOrders = Order::getAllOrdersByCartId($order->id_cart); $cartOrders = Order::getAllOrdersByCartId($order->id_cart);
if ($cartOrders) { if ($cartOrders) {
$objHtlBranchInfo = new HotelBranchInformation();
$obj_cart_bk_data = new HotelCartBookingData(); $obj_cart_bk_data = new HotelCartBookingData();
$obj_htl_bk_dtl = new HotelBookingDetail(); $obj_htl_bk_dtl = new HotelBookingDetail();
$obj_rm_type = new HotelRoomType(); $obj_rm_type = new HotelRoomType();
@@ -222,6 +223,15 @@ class OrderConfirmationControllerCore extends FrontController
$feature_price_diff = (float)($cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] - $cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl']); $feature_price_diff = (float)($cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] - $cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl']);
$cart_htl_data[$type_key]['date_diff'][$date_join]['feature_price_diff'] = $feature_price_diff; $cart_htl_data[$type_key]['date_diff'][$date_join]['feature_price_diff'] = $feature_price_diff;
//enter hotel name
$hotelInfo = $objHtlBranchInfo->hotelBranchesInfo(
Configuration::get('PS_LANG_DEFAULT'),
2,
0,
$data_v['id_hotel']
);
$cart_htl_data[$type_key]['hotel_name'] = $hotelInfo['hotel_name'];
} }
} }
} }

View File

@@ -323,7 +323,7 @@ class OrderDetailControllerCore extends FrontController
//by webkul to show order details properly on order history page //by webkul to show order details properly on order history page
if (Module::isInstalled('hotelreservationsystem')) { if (Module::isInstalled('hotelreservationsystem')) {
require_once _PS_MODULE_DIR_.'hotelreservationsystem/define.php'; require_once _PS_MODULE_DIR_.'hotelreservationsystem/define.php';
$objHtlBranchInfo = new HotelBranchInformation();
$obj_cart_bk_data = new HotelCartBookingData(); $obj_cart_bk_data = new HotelCartBookingData();
$obj_htl_bk_dtl = new HotelBookingDetail(); $obj_htl_bk_dtl = new HotelBookingDetail();
$obj_rm_type = new HotelRoomType(); $obj_rm_type = new HotelRoomType();
@@ -427,6 +427,15 @@ class OrderDetailControllerCore extends FrontController
$feature_price_diff = (float)($cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] - $cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl']); $feature_price_diff = (float)($cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] - $cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl']);
$cart_htl_data[$type_key]['date_diff'][$date_join]['feature_price_diff'] = $feature_price_diff; $cart_htl_data[$type_key]['date_diff'][$date_join]['feature_price_diff'] = $feature_price_diff;
//enter hotel name
$hotelInfo = $objHtlBranchInfo->hotelBranchesInfo(
Configuration::get('PS_LANG_DEFAULT'),
2,
0,
$data_v['id_hotel']
);
$cart_htl_data[$type_key]['hotel_name'] = $hotelInfo['hotel_name'];
} }
} }
$redirect_link_terms = $this->context->link->getCMSLink(new CMS(3, $this->context->language->id), null, $this->context->language->id); $redirect_link_terms = $this->context->link->getCMSLink(new CMS(3, $this->context->language->id), null, $this->context->language->id);

View File

@@ -475,7 +475,7 @@ class OrderOpcControllerCore extends ParentOrderController
if (count($avai_rm['rm_data'][0]['data']['available']) < count($cl_val['id_rms'])) { if (count($avai_rm['rm_data'][0]['data']['available']) < count($cl_val['id_rms'])) {
$cartChanged = true; $cartChanged = true;
foreach ($cl_val['id_rms'] as $cr_key => $cr_val) { foreach ($cl_val['id_rms'] as $cr_key => $cr_val) {
$isRmBooked = $obj_htl_bk_dtl->chechRoomBooked($cr_val, $cl_val['date_from'], $cl_val['date_to']); $isRmBooked = $obj_htl_bk_dtl->chechRoomBooked($cr_val, $cl_val['date_from'], $cl_val['date_to']);
if ($isRmBooked) { if ($isRmBooked) {
@@ -502,7 +502,7 @@ class OrderOpcControllerCore extends ParentOrderController
if ($cart_htl_data) { if ($cart_htl_data) {
$this->context->smarty->assign('cart_htl_data', $cart_htl_data); $this->context->smarty->assign('cart_htl_data', $cart_htl_data);
} }
// For Advanced Payment // For Advanced Payment
$advance_payment_active = Configuration::get('WK_ALLOW_ADVANCED_PAYMENT'); $advance_payment_active = Configuration::get('WK_ALLOW_ADVANCED_PAYMENT');
if ($advance_payment_active) { if ($advance_payment_active) {

View File

@@ -87,7 +87,7 @@ class ProductControllerCore extends FrontController
{ {
parent::init(); parent::init();
//by webkul for product page searching //by webkul for product page searching
if (Tools::isSubmit('product_page_search_submit')) { if (Tools::isSubmit('product_page_search_submit')) {
$hotel_cat_id = Tools::getValue('hotel_cat_id'); $hotel_cat_id = Tools::getValue('hotel_cat_id');
$check_in = Tools::getValue('check_in_time'); $check_in = Tools::getValue('check_in_time');
@@ -168,7 +168,7 @@ class ProductControllerCore extends FrontController
// if (isset($delete_room_from_current_cart) && $delete_room_from_current_cart) // if (isset($delete_room_from_current_cart) && $delete_room_from_current_cart)
// { // {
// //code for // //code for
// } // }
@@ -420,7 +420,7 @@ class ProductControllerCore extends FrontController
} }
$accessories = $this->product->getAccessories($this->context->language->id); $accessories = $this->product->getAccessories($this->context->language->id);
if ($this->product->cache_is_pack || count($accessories)) { if ($this->product->cache_is_pack || ($accessories && count($accessories))) {
$this->context->controller->addCSS(_THEME_CSS_DIR_.'product_list.css'); $this->context->controller->addCSS(_THEME_CSS_DIR_.'product_list.css');
} }
if ($this->product->customizable) { if ($this->product->customizable) {
@@ -439,8 +439,7 @@ class ProductControllerCore extends FrontController
$useTax = HotelBookingDetail::useTax(); $useTax = HotelBookingDetail::useTax();
if (isset($hotel_id) && $hotel_id) { if (isset($hotel_id) && $hotel_id) {
$obj_hotel_branch = new HotelBranchInformation(); $obj_hotel_branch = new HotelBranchInformation();
$hotel_info_by_id = $obj_hotel_branch->hotelBranchInfoById($hotel_id); $hotel_info_by_id = $obj_hotel_branch->hotelBranchesInfo(false, 2, 1, $hotel_id);
$hotel_policies = $hotel_info_by_id['policies']; $hotel_policies = $hotel_info_by_id['policies'];
$hotel_name = $hotel_info_by_id['hotel_name']; $hotel_name = $hotel_info_by_id['hotel_name'];
@@ -496,21 +495,29 @@ class ProductControllerCore extends FrontController
$total_available_rooms = $total_available_rooms - $num_cart_rooms; $total_available_rooms = $total_available_rooms - $num_cart_rooms;
} }
} }
$locationEnabled = Configuration::get('WK_HOTEL_LOCATION_ENABLE');
$location_enable = Configuration::get('WK_HOTEL_LOCATION_ENABLE');
$hotel_branch_obj = new HotelBranchInformation($hotel_id); $hotel_branch_obj = new HotelBranchInformation($hotel_id);
if ($location_enable) { if ($locationEnabled) {
$hotel_info = $hotel_branch_obj->hotelBranchesInfo(0, 1);
$totalActiveHotels = count($hotel_info);
$hotel_info = $hotel_branch_obj->hotelBranchInfoByCategoryId($hotel_branch_obj->id_category); $hotel_info = $hotel_branch_obj->hotelBranchInfoByCategoryId($hotel_branch_obj->id_category);
} else { } else {
$hotel_info = $hotel_branch_obj->getActiveHotelBranchesInfo(); $hotel_info = $hotel_branch_obj->hotelBranchesInfo(0, 1);
$totalActiveHotels = count($hotel_info);
}
foreach ($hotel_info as &$hotel) {
$maxOrderDate = HotelOrderRestrictDate::getMaxOrderDate($hotel['id']);
$hotel['max_order_date'] = date('Y-m-d', strtotime($maxOrderDate));
} }
$search_data['date_from'] = date('d-m-Y', strtotime($date_from)); $search_data['date_from'] = date('d-m-Y', strtotime($date_from));
$search_data['date_to'] = date('d-m-Y', strtotime($date_to)); $search_data['date_to'] = date('d-m-Y', strtotime($date_to));
$search_data['htl_dtl'] = $hotel_branch_obj->hotelBranchInfoById($hotel_id); $search_data['htl_dtl'] = $hotel_branch_obj->hotelBranchesInfo(0, 1, 1, $hotel_id);
$search_data['location'] = $search_data['htl_dtl']['city'];
$warning_num = Configuration::get('WK_ROOM_LEFT_WARNING_NUMBER'); if (isset($search_data['htl_dtl']['state_name'])) {
$search_data['location'] .= ', '.$search_data['htl_dtl']['state_name'];
}
$search_data['location'] .= ', '.$search_data['htl_dtl']['country_name'];
/*Max date of ordering for order restrict*/ /*Max date of ordering for order restrict*/
$max_order_date = HotelOrderRestrictDate::getMaxOrderDate($hotel_id); $max_order_date = HotelOrderRestrictDate::getMaxOrderDate($hotel_id);
@@ -518,39 +525,41 @@ class ProductControllerCore extends FrontController
$max_order_date = date('Y-m-d', strtotime($max_order_date)); $max_order_date = date('Y-m-d', strtotime($max_order_date));
} }
/*End*/ /*End*/
#####################################################################
/*End*/
#####################################################################
if (Tools::getValue('error')) { if (Tools::getValue('error')) {
$this->context->smarty->assign('error', Tools::getValue('error')); $this->context->smarty->assign('error', Tools::getValue('error'));
} }
if (Module::isInstalled('productcomments')) { if (Module::isInstalled('productcomments')) {
$this->context->smarty->assign(array( $this->context->smarty->assign(
'num_reviews' => ProductComment::getCommentNumber($this->product->id), array(
'ratting' => ProductComment::getAverageGrade($this->product->id)['grade'], 'num_reviews' => ProductComment::getCommentNumber($this->product->id),
'ratting' => ProductComment::getAverageGrade($this->product->id)['grade'],
) )
); );
} }
$this->context->smarty->assign(array( $this->context->smarty->assign(
'max_order_date' => $max_order_date, array(
'warning_num' => $warning_num, 'totalActiveHotels' => $totalActiveHotels,
'ratting_img_path' => _MODULE_DIR_.'hotelreservationsystem/views/img/Slices/icons-sprite.png', 'max_order_date' => $max_order_date,
'total_available_rooms' => $total_available_rooms, 'warning_num' => Configuration::get('WK_ROOM_LEFT_WARNING_NUMBER'),
'all_hotels_info' => $hotel_info, 'ratting_img_path' => _MODULE_DIR_.'hotelreservationsystem/views/img/Slices/icons-sprite.png',
'location_enable' => $location_enable, 'total_available_rooms' => $total_available_rooms,
'total_price' => $total_price, 'all_hotels_info' => $hotel_info,
'product_controller_url' => $this->context->link->getPageLink('product'), 'show_only_active_htl' => Configuration::get('WK_HOTEL_NAME_ENABLE'),
'num_days' => $num_days, 'location_enable' => $locationEnabled,
'date_from' => $date_from, 'total_price' => $total_price,
'date_to' => $date_to, 'product_controller_url' => $this->context->link->getPageLink('product'),
'hotel_location' => $hotel_location, 'num_days' => $num_days,
'hotel_name' => $hotel_name, 'date_from' => $date_from,
'hotel_policies' => $hotel_policies, 'date_to' => $date_to,
'hotel_features' => $htl_features, 'hotel_location' => $hotel_location,
'ftr_img_src' => _PS_IMG_.'rf/', 'hotel_name' => $hotel_name,
'search_data' => $search_data, 'hotel_policies' => $hotel_policies,
)); 'hotel_features' => $htl_features,
'ftr_img_src' => _PS_IMG_.'rf/',
'search_data' => $search_data,
)
);
// product price after imposing feature prices... // product price after imposing feature prices...
if ($useTax) { if ($useTax) {
$priceProduct = Product::getPriceStatic($this->product->id, true); $priceProduct = Product::getPriceStatic($this->product->id, true);
@@ -563,46 +572,49 @@ class ProductControllerCore extends FrontController
$feature_price_diff = (float)($productPriceWithoutReduction - $feature_price); $feature_price_diff = (float)($productPriceWithoutReduction - $feature_price);
$this->context->smarty->assign('feature_price', $feature_price); $this->context->smarty->assign('feature_price', $feature_price);
$this->context->smarty->assign('feature_price_diff', $feature_price_diff); $this->context->smarty->assign('feature_price_diff', $feature_price_diff);
//END //END
} }
$this->context->smarty->assign('product_id_hotel', $hotel_id); $this->context->smarty->assign('product_id_hotel', $hotel_id);
$this->context->smarty->assign(array( $this->context->smarty->assign(
'stock_management' => Configuration::get('PS_STOCK_MANAGEMENT'), array(
'customizationFields' => $customization_fields, 'stock_management' => Configuration::get('PS_STOCK_MANAGEMENT'),
'id_customization' => empty($customization_datas) ? null : $customization_datas[0]['id_customization'], 'customizationFields' => $customization_fields,
'accessories' => $accessories, 'id_customization' => empty($customization_datas) ? null : $customization_datas[0]['id_customization'],
'return_link' => $return_link, 'accessories' => $accessories,
'product' => $this->product, 'return_link' => $return_link,
'product_manufacturer' => new Manufacturer((int) $this->product->id_manufacturer, $this->context->language->id), 'product' => $this->product,
'token' => Tools::getToken(false), 'product_manufacturer' => new Manufacturer((int) $this->product->id_manufacturer, $this->context->language->id),
'token' => Tools::getToken(false),
'features' => $this->product->getFrontFeatures($this->context->language->id), 'features' => $this->product->getFrontFeatures($this->context->language->id),
'attachments' => (($this->product->cache_has_attachments) ? $this->product->getAttachments($this->context->language->id) : array()), 'attachments' => (($this->product->cache_has_attachments) ? $this->product->getAttachments($this->context->language->id) : array()),
'allow_oosp' => $this->product->isAvailableWhenOutOfStock((int) $this->product->out_of_stock), 'allow_oosp' => $this->product->isAvailableWhenOutOfStock((int) $this->product->out_of_stock),
'last_qties' => (int) Configuration::get('PS_LAST_QTIES'), 'last_qties' => (int) Configuration::get('PS_LAST_QTIES'),
'HOOK_EXTRA_LEFT' => Hook::exec('displayLeftColumnProduct'), 'HOOK_EXTRA_LEFT' => Hook::exec('displayLeftColumnProduct'),
'HOOK_EXTRA_RIGHT' => Hook::exec('displayRightColumnProduct'), 'HOOK_EXTRA_RIGHT' => Hook::exec('displayRightColumnProduct'),
'HOOK_PRODUCT_OOS' => Hook::exec('actionProductOutOfStock', array('product' => $this->product)), 'HOOK_PRODUCT_OOS' => Hook::exec('actionProductOutOfStock', array('product' => $this->product)),
'HOOK_PRODUCT_ACTIONS' => Hook::exec('displayProductButtons', array('product' => $this->product)), 'HOOK_PRODUCT_ACTIONS' => Hook::exec('displayProductButtons', array('product' => $this->product)),
'HOOK_PRODUCT_TAB' => Hook::exec('displayProductTab', array('product' => $this->product)), 'HOOK_PRODUCT_TAB' => Hook::exec('displayProductTab', array('product' => $this->product)),
'HOOK_PRODUCT_TAB_CONTENT' => Hook::exec('displayProductTabContent', array('product' => $this->product)), 'HOOK_PRODUCT_TAB_CONTENT' => Hook::exec(
'HOOK_PRODUCT_CONTENT' => Hook::exec('displayProductContent', array('product' => $this->product)), 'displayProductTabContent',
'display_qties' => (int) Configuration::get('PS_DISPLAY_QTIES'), array('product' => $this->product)
'display_ht' => !Tax::excludeTaxeOption(), ),
'jqZoomEnabled' => Configuration::get('PS_DISPLAY_JQZOOM'), 'HOOK_PRODUCT_CONTENT' => Hook::exec('displayProductContent', array('product' => $this->product)),
'ENT_NOQUOTES' => ENT_NOQUOTES, 'display_qties' => (int) Configuration::get('PS_DISPLAY_QTIES'),
'outOfStockAllowed' => (int) Configuration::get('PS_ORDER_OUT_OF_STOCK'), 'display_ht' => !Tax::excludeTaxeOption(),
'errors' => $this->errors, 'jqZoomEnabled' => Configuration::get('PS_DISPLAY_JQZOOM'),
'body_classes' => array( 'ENT_NOQUOTES' => ENT_NOQUOTES,
$this->php_self.'-'.$this->product->id, 'outOfStockAllowed' => (int) Configuration::get('PS_ORDER_OUT_OF_STOCK'),
$this->php_self.'-'.$this->product->link_rewrite, 'errors' => $this->errors,
'category-'.(isset($this->category) ? $this->category->id : ''), 'body_classes' => array(
'category-'.(isset($this->category) ? $this->category->getFieldByLang('link_rewrite') : ''), $this->php_self.'-'.$this->product->id,
), $this->php_self.'-'.$this->product->link_rewrite,
'display_discount_price' => Configuration::get('PS_DISPLAY_DISCOUNT_PRICE'), 'category-'.(isset($this->category) ? $this->category->id : ''),
)); 'category-'.(isset($this->category) ? $this->category->getFieldByLang('link_rewrite') : ''),
),
'display_discount_price' => Configuration::get('PS_DISPLAY_DISCOUNT_PRICE'),
)
);
} }
$this->setTemplate(_PS_THEME_DIR_.'product.tpl'); $this->setTemplate(_PS_THEME_DIR_.'product.tpl');
} }

View File

@@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="This store is powered by PrestaShop" /> <meta name="description" content="This store is powered by Webkul" />
<style> <style>
::-moz-selection { ::-moz-selection {
background: #b3d4fc; background: #b3d4fc;

View File

@@ -76,7 +76,7 @@ abstract class InstallControllerConsole
} }
exit; exit;
} }
$errors = Datas::getInstance()->getAndCheckArgs($argv); $errors = Datas::getInstance()->getAndCheckArgs($argv);
if (Datas::getInstance()->show_license) { if (Datas::getInstance()->show_license) {
echo strip_tags(file_get_contents(_PS_INSTALL_PATH_.'theme/views/license_content.phtml')); echo strip_tags(file_get_contents(_PS_INSTALL_PATH_.'theme/views/license_content.phtml'));
@@ -114,7 +114,7 @@ abstract class InstallControllerConsole
{ {
$this->step = $step; $this->step = $step;
$this->datas = Datas::getInstance(); $this->datas = Datas::getInstance();
// Set current language // Set current language
$this->language = InstallLanguages::getInstance(); $this->language = InstallLanguages::getInstance();
if (!$this->datas->language) { if (!$this->datas->language) {

View File

@@ -376,6 +376,24 @@ abstract class InstallControllerHttp
return $this->language->getInformation('forum'); return $this->language->getInformation('forum');
} }
// Get link to contact for this language
public function getContactLink()
{
return $this->language->getInformation('contact');
}
// Get link to install help for this language
public function getInstallHelpLink()
{
return $this->language->getInformation('install_help');
}
// Get link to qloapps services for this language
public function getServicesLink()
{
return $this->language->getInformation('services');
}
/** /**
* Get link to blog for this language * Get link to blog for this language
* *

View File

@@ -139,7 +139,7 @@ class Datas
'admin_email' => array( 'admin_email' => array(
'name' => 'email', 'name' => 'email',
'validate' => 'isEmail', 'validate' => 'isEmail',
'default' => 'pub@prestashop.com' 'default' => 'pub@qloapps.com'
), ),
'show_license' => array( 'show_license' => array(
'name' => 'license', 'name' => 'license',

View File

@@ -50,16 +50,20 @@ class InstallControllerHttpConfigure extends InstallControllerHttp
$this->session->admin_email = trim(Tools::getValue('admin_email')); $this->session->admin_email = trim(Tools::getValue('admin_email'));
$this->session->send_informations = Tools::getValue('send_informations'); $this->session->send_informations = Tools::getValue('send_informations');
if ($this->session->send_informations) { if ($this->session->send_informations) {
$params = http_build_query(array( // Qlo Notification
'email' => $this->session->admin_email, $qloData = [
'method' => 'addMemberToNewsletter', 'shopDomain' => Tools::getHttpHost(),
'language' => $this->language->getLanguageIso(), 'shopDomainSsl' => Tools::getHttpHost(),
'visitorType' => 1, 'physicalUri' => __PS_BASE_URI__,
'source' => 'installer' 'email' => Tools::getValue('admin_email'),
)); 'firstname' => Tools::ucfirst(Tools::getValue('admin_firstname')),
Tools::file_get_contents('http://www.prestashop.com/ajax/controller.php?'.$params); 'lastname' => Tools::ucfirst(Tools::getValue('admin_lastname')),
'countryCode' => Tools::getValue('shop_country'),
];
$objModelInstall = new InstallModelInstall();
$objModelInstall->setNotification($qloData);
// END
} }
// If password fields are empty, but are already stored in session, do not fill them again // If password fields are empty, but are already stored in session, do not fill them again
if (!$this->session->admin_password || trim(Tools::getValue('admin_password'))) { if (!$this->session->admin_password || trim(Tools::getValue('admin_password'))) {
$this->session->admin_password = trim(Tools::getValue('admin_password')); $this->session->admin_password = trim(Tools::getValue('admin_password'));

View File

@@ -57,7 +57,7 @@ class InstallControllerHttpDatabase extends InstallControllerHttp
$this->session->database_password = trim(Tools::getValue('dbPassword')); $this->session->database_password = trim(Tools::getValue('dbPassword'));
$this->session->database_prefix = trim(Tools::getValue('db_prefix')); $this->session->database_prefix = trim(Tools::getValue('db_prefix'));
$this->session->database_clear = Tools::getValue('database_clear'); $this->session->database_clear = Tools::getValue('database_clear');
$this->session->rewrite_engine = Tools::getValue('rewrite_engine'); $this->session->rewrite_engine = Tools::getValue('rewrite_engine');
} }
@@ -80,7 +80,7 @@ class InstallControllerHttpDatabase extends InstallControllerHttp
if (count($this->errors)) { if (count($this->errors)) {
return false; return false;
} }
if (!isset($this->session->database_engine)) { if (!isset($this->session->database_engine)) {
$this->session->database_engine = $this->model_database->getBestEngine($this->session->database_server, $this->session->database_name, $this->session->database_login, $this->session->database_password); $this->session->database_engine = $this->model_database->getBestEngine($this->session->database_server, $this->session->database_name, $this->session->database_login, $this->session->database_password);
} }
@@ -150,7 +150,7 @@ class InstallControllerHttpDatabase extends InstallControllerHttp
$this->database_prefix = _DB_PREFIX_; $this->database_prefix = _DB_PREFIX_;
} else { } else {
$this->database_server = 'localhost'; $this->database_server = 'localhost';
$this->database_name = 'prestashop'; $this->database_name = 'qloapps';
$this->database_login = 'root'; $this->database_login = 'root';
$this->database_password = ''; $this->database_password = '';
$this->database_engine = 'InnoDB'; $this->database_engine = 'InnoDB';

View File

@@ -223,14 +223,25 @@ class InstallControllerHttpProcess extends InstallControllerHttp
{ {
$this->initializeContext(); $this->initializeContext();
$result = $this->model_install->installModules(Tools::getValue('module')); // code to populate database of modules
if ($this->session->install_type == 'full') {
$populateData = 1;
} else {
$populateData = 0;
}
// extra parameter sent to populate module data or not
$result = $this->model_install->installModules(
Tools::getValue('module'),
$populateData
);
if (!$result || $this->model_install->getErrors()) { if (!$result || $this->model_install->getErrors()) {
$this->ajaxJsonAnswer(false, $this->model_install->getErrors()); $this->ajaxJsonAnswer(false, $this->model_install->getErrors());
} }
$this->session->process_validated = array_merge($this->session->process_validated, array('installModules' => true)); $this->session->process_validated = array_merge($this->session->process_validated, array('installModules' => true));
$this->ajaxJsonAnswer(true); $this->ajaxJsonAnswer(true);
} }
/** /**
* PROCESS : installModulesAddons * PROCESS : installModulesAddons
* Install modules from addons * Install modules from addons
@@ -331,7 +342,7 @@ class InstallControllerHttpProcess extends InstallControllerHttp
} }
} }
$this->process_steps[] = $install_modules; $this->process_steps[] = $install_modules;
$install_modules = array('key' => 'installModulesAddons', 'lang' => $this->l('Install Addons modules')); $install_modules = array('key' => 'installModulesAddons', 'lang' => $this->l('Install Addons modules'));
$params = array( $params = array(

View File

@@ -87,11 +87,17 @@ class InstallControllerHttpSystem extends InstallControllerHttp
'title' => $this->l('Required PHP parameters'), 'title' => $this->l('Required PHP parameters'),
'success' => 1, 'success' => 1,
'checks' => array( 'checks' => array(
'phpversion' => $this->l('PHP 5.1.2 or later is not enabled'), 'phpversion' => $this->l('Minimum PHP 5.4.0 or later is required'),
'upload' => $this->l('Cannot upload files'), 'upload' => $this->l('Cannot upload files'),
'system' => $this->l('Cannot create new files and folders'), 'system' => $this->l('Cannot create new files and folders'),
'gd' => $this->l('GD library is not installed'), 'gd' => $this->l('GD library is not installed'),
'mysql_support' => $this->l('MySQL support is not activated') 'mysql_support' => $this->l('MySQL support is not activated'),
'curl' => $this->l('Curl extension is not loaded'),
'soap' => $this->l('SOAP extension is not loaded'),
'simplexml' => $this->l('SimpleXml extension is not loaded'),
'memory_limit' => $this->l('In the PHP configuration set memory_limit to minimum 128M'),
'max_execution_time' => $this->l('In the PHP configuration set max_execution_time to minimum 500'),
'upload_max_filesize' => $this->l('In the PHP configuration set upload_max_filesize to minimum 16M'),
) )
), ),
array( array(
@@ -125,7 +131,7 @@ class InstallControllerHttpSystem extends InstallControllerHttp
'title' => $this->l('Recommended PHP parameters'), 'title' => $this->l('Recommended PHP parameters'),
'success' => $this->tests['optional']['success'], 'success' => $this->tests['optional']['success'],
'checks' => array( 'checks' => array(
'new_phpversion' => sprintf($this->l('You are using PHP %s version. Soon, the latest PHP version supported by PrestaShop will be PHP 5.4. To make sure you’re ready for the future, we recommend you to upgrade to PHP 5.4 now!'), phpversion()), 'new_phpversion' => sprintf($this->l('You are using PHP %s version. Soon, the latest PHP version supported by Qloapps will be PHP 5.4. To make sure you’re ready for the future, we recommend you to upgrade to PHP 5.4 now!'), phpversion()),
'fopen' => $this->l('Cannot open external URLs'), 'fopen' => $this->l('Cannot open external URLs'),
'register_globals' => $this->l('PHP register_globals option is enabled'), 'register_globals' => $this->l('PHP register_globals option is enabled'),
'gz' => $this->l('GZIP compression is not activated'), 'gz' => $this->l('GZIP compression is not activated'),
@@ -146,7 +152,7 @@ class InstallControllerHttpSystem extends InstallControllerHttp
} }
} }
} }
// If required tests failed, disable next button // If required tests failed, disable next button
if (!$this->tests['required']['success']) { if (!$this->tests['required']['success']) {
$this->next_button = false; $this->next_button = false;

View File

@@ -46,15 +46,14 @@ UPDATE `PREFIX_configuration` SET value = '10' WHERE name = 'BLOCKTAGS_NBR';
UPDATE `PREFIX_configuration` SET value = '0_3|0_4' WHERE name = 'FOOTER_CMS'; UPDATE `PREFIX_configuration` SET value = '0_3|0_4' WHERE name = 'FOOTER_CMS';
UPDATE `PREFIX_configuration` SET value = '0_3|0_4' WHERE name = 'FOOTER_BLOCK_ACTIVATION'; UPDATE `PREFIX_configuration` SET value = '0_3|0_4' WHERE name = 'FOOTER_BLOCK_ACTIVATION';
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'FOOTER_POWEREDBY'; UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'FOOTER_POWEREDBY';
UPDATE `PREFIX_configuration` SET value = 'http://www.prestashop.com' WHERE name = 'BLOCKADVERT_LINK'; UPDATE `PREFIX_configuration` SET value = 'https://qloapps.com/' WHERE name = 'BLOCKADVERT_LINK';
UPDATE `PREFIX_configuration` SET value = 'store.jpg' WHERE name = 'BLOCKSTORE_IMG'; UPDATE `PREFIX_configuration` SET value = 'store.jpg' WHERE name = 'BLOCKSTORE_IMG';
UPDATE `PREFIX_configuration` SET value = 'jpg' WHERE name = 'BLOCKADVERT_IMG_EXT'; UPDATE `PREFIX_configuration` SET value = 'jpg' WHERE name = 'BLOCKADVERT_IMG_EXT';
UPDATE `PREFIX_configuration` SET value = 'CAT3,CAT8,CAT5,LNK1' WHERE name = 'MOD_BLOCKTOPMENU_ITEMS'; UPDATE `PREFIX_configuration` SET value = 'CAT3,CAT8,CAT5,LNK1' WHERE name = 'MOD_BLOCKTOPMENU_ITEMS';
UPDATE `PREFIX_configuration` SET value = '0' WHERE name = 'MOD_BLOCKTOPMENU_SEARCH'; UPDATE `PREFIX_configuration` SET value = '0' WHERE name = 'MOD_BLOCKTOPMENU_SEARCH';
UPDATE `PREFIX_configuration` SET value = 'http://www.facebook.com/prestashop' WHERE name = 'BLOCKSOCIAL_FACEBOOK'; UPDATE `PREFIX_configuration` SET value = 'https://www.facebook.com/qloapps' WHERE name = 'BLOCKSOCIAL_FACEBOOK';
UPDATE `PREFIX_configuration` SET value = 'http://www.twitter.com/prestashop' WHERE name = 'BLOCKSOCIAL_TWITTER'; UPDATE `PREFIX_configuration` SET value = 'https://twitter.com/qloapps' WHERE name = 'BLOCKSOCIAL_TWITTER';
UPDATE `PREFIX_configuration` SET value = 'http://www.prestashop.com/blog/en/' WHERE name = 'BLOCKSOCIAL_RSS'; UPDATE `PREFIX_configuration` SET value = 'https://plus.google.com/110221570427070809661' WHERE name = 'BLOCKSOCIAL_GOOGLE_PLUS';
UPDATE `PREFIX_configuration` SET value = 'https://www.google.com/+prestashop' WHERE name = 'BLOCKSOCIAL_GOOGLE_PLUS';
UPDATE `PREFIX_configuration` SET value = 'My Company' WHERE name = 'BLOCKCONTACTINFOS_COMPANY'; UPDATE `PREFIX_configuration` SET value = 'My Company' WHERE name = 'BLOCKCONTACTINFOS_COMPANY';
UPDATE `PREFIX_configuration` SET value = '42 avenue des Champs Elysées\n75000 Paris\nFrance' WHERE name = 'BLOCKCONTACTINFOS_ADDRESS'; UPDATE `PREFIX_configuration` SET value = '42 avenue des Champs Elysées\n75000 Paris\nFrance' WHERE name = 'BLOCKCONTACTINFOS_ADDRESS';
UPDATE `PREFIX_configuration` SET value = '0123-456-789' WHERE name = 'BLOCKCONTACTINFOS_PHONE'; UPDATE `PREFIX_configuration` SET value = '0123-456-789' WHERE name = 'BLOCKCONTACTINFOS_PHONE';
@@ -178,13 +177,13 @@ UPDATE `PREFIX_hook_module` SET position = 2
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'productpaymentlogos') WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'productpaymentlogos')
AND id_hook = @id_hook; AND id_hook = @id_hook;
INSERT INTO `PREFIX_hook_module_exceptions` (`id_shop`, `id_module`, `id_hook`, `file_name`) INSERT INTO `PREFIX_hook_module_exceptions` (`id_shop`, `id_module`, `id_hook`, `file_name`)
( (
SELECT 1, m.id_module, h.id_hook, 'category' SELECT 1, m.id_module, h.id_hook, 'category'
FROM `PREFIX_hook` h FROM `PREFIX_hook` h
JOIN `PREFIX_hook_module` hm ON (hm.id_hook = h.id_hook) JOIN `PREFIX_hook_module` hm ON (hm.id_hook = h.id_hook)
JOIN `PREFIX_module` m ON (m.id_module = hm.id_module) JOIN `PREFIX_module` m ON (m.id_module = hm.id_module)
WHERE WHERE
h.name='displayLeftColumn' AND m.name IN ('blockbestsellers', 'blockmanufacturer', 'blocksupplier', 'blockmyaccount', 'blockpaymentlogo') h.name='displayLeftColumn' AND m.name IN ('blockbestsellers', 'blockmanufacturer', 'blocksupplier', 'blockmyaccount', 'blockpaymentlogo')
GROUP BY m.id_module GROUP BY m.id_module
); );

View File

@@ -627,7 +627,7 @@
<value>1</value> <value>1</value>
</configuration> </configuration>
<configuration id="BLOCKADVERT_LINK" name="BLOCKADVERT_LINK"> <configuration id="BLOCKADVERT_LINK" name="BLOCKADVERT_LINK">
<value>http://www.prestashop.com</value> <value>http://www.qloapps.com</value>
</configuration> </configuration>
<configuration id="BLOCKSTORE_IMG" name="BLOCKSTORE_IMG"> <configuration id="BLOCKSTORE_IMG" name="BLOCKSTORE_IMG">
<value>store.jpg</value> <value>store.jpg</value>
@@ -642,13 +642,10 @@
<value/> <value/>
</configuration> </configuration>
<configuration id="blocksocial_facebook" name="BLOCKSOCIAL_FACEBOOK"> <configuration id="blocksocial_facebook" name="BLOCKSOCIAL_FACEBOOK">
<value>http://www.facebook.com/prestashop</value> <value>http://www.facebook.com/qloapps</value>
</configuration> </configuration>
<configuration id="blocksocial_twitter" name="BLOCKSOCIAL_TWITTER"> <configuration id="blocksocial_twitter" name="BLOCKSOCIAL_TWITTER">
<value>http://www.twitter.com/prestashop</value> <value>http://www.twitter.com/qloapps</value>
</configuration>
<configuration id="blocksocial_rss" name="BLOCKSOCIAL_RSS">
<value>http://www.prestashop.com/blog/en/feed/</value>
</configuration> </configuration>
<configuration id="blockcontactinfos_company" name="BLOCKCONTACTINFOS_COMPANY"> <configuration id="blockcontactinfos_company" name="BLOCKCONTACTINFOS_COMPANY">
<value>Your company</value> <value>Your company</value>
@@ -662,13 +659,13 @@ Country</value>
<value>0123-456-789</value> <value>0123-456-789</value>
</configuration> </configuration>
<configuration id="blockcontactinfos_email" name="BLOCKCONTACTINFOS_EMAIL"> <configuration id="blockcontactinfos_email" name="BLOCKCONTACTINFOS_EMAIL">
<value>pub@prestashop.com</value> <value>pub@qloapps.com</value>
</configuration> </configuration>
<configuration id="blockcontact_telnumber" name="BLOCKCONTACT_TELNUMBER"> <configuration id="blockcontact_telnumber" name="BLOCKCONTACT_TELNUMBER">
<value>0123-456-789</value> <value>0123-456-789</value>
</configuration> </configuration>
<configuration id="blockcontact_email" name="BLOCKCONTACT_EMAIL"> <configuration id="blockcontact_email" name="BLOCKCONTACT_EMAIL">
<value>pub@prestashop.com</value> <value>pub@qloapps.com</value>
</configuration> </configuration>
<configuration id="SUPPLIER_DISPLAY_TEXT" name="SUPPLIER_DISPLAY_TEXT"> <configuration id="SUPPLIER_DISPLAY_TEXT" name="SUPPLIER_DISPLAY_TEXT">
<value>1</value> <value>1</value>
@@ -716,7 +713,7 @@ Country</value>
<value>PrestaShop</value> <value>PrestaShop</value>
</configuration> </configuration>
<configuration id="PS_SHOP_EMAIL" name="PS_SHOP_EMAIL"> <configuration id="PS_SHOP_EMAIL" name="PS_SHOP_EMAIL">
<value>pub@prestashop.com</value> <value>pub@qloapps.com</value>
</configuration> </configuration>
<configuration id="PS_MAIL_METHOD" name="PS_MAIL_METHOD"> <configuration id="PS_MAIL_METHOD" name="PS_MAIL_METHOD">
<value>1</value> <value>1</value>

View File

@@ -144,9 +144,9 @@
<tab id="Catalog_Price_Rules" id_parent="Price_Rules" active="1" hide_host_mode="0"> <tab id="Catalog_Price_Rules" id_parent="Price_Rules" active="1" hide_host_mode="0">
<class_name>AdminSpecificPriceRule</class_name> <class_name>AdminSpecificPriceRule</class_name>
</tab> </tab>
<tab id="Marketing" id_parent="Price_Rules" active="1" hide_host_mode="0"> <!-- <tab id="Marketing" id_parent="Price_Rules" active="1" hide_host_mode="0">
<class_name>AdminMarketing</class_name> <class_name>AdminMarketing</class_name>
</tab> </tab> -->
<!-- <tab id="Carriers" id_parent="Shipping" active="1" hide_host_mode="0"> <!-- <tab id="Carriers" id_parent="Shipping" active="1" hide_host_mode="0">
<class_name>AdminCarriers</class_name> <class_name>AdminCarriers</class_name>
</tab> </tab>
@@ -186,9 +186,9 @@
<tab id="Modules_1" id_parent="Modules" active="1" hide_host_mode="0"> <tab id="Modules_1" id_parent="Modules" active="1" hide_host_mode="0">
<class_name>AdminModules</class_name> <class_name>AdminModules</class_name>
</tab> </tab>
<tab id="Modules_Themes_Catalog" id_parent="Modules" active="1" hide_host_mode="0"> <!-- <tab id="Modules_Themes_Catalog" id_parent="Modules" active="1" hide_host_mode="0">
<class_name>AdminAddonsCatalog</class_name> <class_name>AdminAddonsCatalog</class_name>
</tab> </tab> -->
<tab id="Positions" id_parent="Modules" active="1" hide_host_mode="0"> <tab id="Positions" id_parent="Modules" active="1" hide_host_mode="0">
<class_name>AdminModulesPositions</class_name> <class_name>AdminModulesPositions</class_name>
</tab> </tab>

View File

@@ -9,8 +9,8 @@
<field name="id_shop"/> <field name="id_shop"/>
</fields> </fields>
<entities> <entities>
<connections id="connections_1" id_guest="guest_1" id_page="1" ip_address="2130706433" id_shop_group="1" id_shop="1"> <connections id="connections_1" id_guest="guest_1" id_page="1" ip_address="10424105181" id_shop_group="1" id_shop="1">
<http_referer>http://www.prestashop.com</http_referer> <http_referer>http://www.qloapps.com</http_referer>
</connections> </connections>
</entities> </entities>
</entity_connections> </entity_connections>

View File

@@ -20,7 +20,7 @@
</fields> </fields>
<entities> <entities>
<customer id="John" id_gender="1" id_default_group="3" firstname="John" lastname="DOE" passwd="b7d897d438f634f23548b32a2d7e8983" last_passwd_gen="2013-12-13 02:19:15" birthday="1970-01-15" newsletter="1" ip_registration_newsletter="" newsletter_date_add="2013-12-13 08:19:15" optin="1" secure_key="b44a6d9efd7a0076a0fbce6b15eaf3b1" active="1" is_guest="0"> <customer id="John" id_gender="1" id_default_group="3" firstname="John" lastname="DOE" passwd="b7d897d438f634f23548b32a2d7e8983" last_passwd_gen="2013-12-13 02:19:15" birthday="1970-01-15" newsletter="1" ip_registration_newsletter="" newsletter_date_add="2013-12-13 08:19:15" optin="1" secure_key="b44a6d9efd7a0076a0fbce6b15eaf3b1" active="1" is_guest="0">
<email>pub@prestashop.com</email> <email>pub@qloapps.com</email>
<note/> <note/>
</customer> </customer>
</entities> </entities>

View File

@@ -42,7 +42,7 @@ if (!defined('_PS_CORE_DIR_')) {
} }
if (!defined('_THEME_NAME_')) { if (!defined('_THEME_NAME_')) {
define('_THEME_NAME_', 'hotel-theme'); define('_THEME_NAME_', 'hotel-reservation-theme');
} }

View File

@@ -25,3 +25,4 @@
*/ */
define('_PS_INSTALL_VERSION_', '1.6.1.1'); define('_PS_INSTALL_VERSION_', '1.6.1.1');
define('_QLO_INSTALL_VERSION_', '1.3.1');

View File

@@ -20,7 +20,7 @@
</meta> </meta>
<meta id="index" id_shop="1"> <meta id="index" id_shop="1">
<title/> <title/>
<description>Shop powered by PrestaShop</description> <description>Shop powered by Webkul</description>
<keywords/> <keywords/>
<url_rewrite/> <url_rewrite/>
</meta> </meta>

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/display/PS16/Installing+PrestaShop', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'http://www.prestashop.com/blog/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/en/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/en/388-support', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Възникна SQL грешка за обект <i>%1$s</i>: <i>%2$s</i>', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Възникна SQL грешка за обект <i>%1$s</i>: <i>%2$s</i>',

View File

@@ -7,4 +7,4 @@ E-mail address: {email}
{shop_name} - {shop_url} {shop_name} - {shop_url}
{shop_url} powered by PrestaShop™ {shop_url} powered by Webkul™

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/display/PS16/Installing+PrestaShop', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'http://www.prestashop.com/blog/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/en/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/en/388-support', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => '<i>%1$s</i>: <i>%2$s</i> এনটিটির জন্য একটি ত্রুটি ঘটেছে ', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => '<i>%1$s</i>: <i>%2$s</i> এনটিটির জন্য একটি ত্রুটি ঘটেছে ',

View File

@@ -7,4 +7,4 @@ E-mail address: {email}
{shop_name} - {shop_url} {shop_name} - {shop_url}
{shop_url} powered by PrestaShop™ {shop_url} powered by Webkul™

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/display/PS16/Installing+PrestaShop', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/forum/203-forum-brasileiro/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'http://www.prestashop.com/blog/pt/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/pt/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/pt/388-support', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Ocorreu um erro SQL para a entidade <i>%1$s</i>: <i>%2$s</i>', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Ocorreu um erro SQL para a entidade <i>%1$s</i>: <i>%2$s</i>',

View File

@@ -7,4 +7,4 @@ E-mail address: {email}
{shop_name} - {shop_url} {shop_name} - {shop_url}
{shop_url} powered by PrestaShop™ {shop_url} powered by Webkul™

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/pages/viewpage.action?pageId=28016773', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'http://www.prestashop.com/blog/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/en/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/en/388-support', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Ha succeït un error d\'SQL per a l\'entitat <i>%1$s</i>: <i>%2$s</i>', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Ha succeït un error d\'SQL per a l\'entitat <i>%1$s</i>: <i>%2$s</i>',

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/display/PS16/Installing+PrestaShop', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/forum/83-ceske-forum/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'http://www.prestashop.com/blog/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/en/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/en/388-support', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Došlo k chybě SQL entity <i>%1$s</i>: <i>%2$s</i>', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Došlo k chybě SQL entity <i>%1$s</i>: <i>%2$s</i>',

View File

@@ -7,4 +7,4 @@ E-mail address: {email}
{shop_name} - {shop_url} {shop_name} - {shop_url}
{shop_url} powered by PrestaShop™ {shop_url} powered by Webkul™

View File

@@ -20,7 +20,7 @@
</meta> </meta>
<meta id="index" id_shop="1"> <meta id="index" id_shop="1">
<title/> <title/>
<description>Shop powered by PrestaShop</description> <description>Shop powered by Webkul</description>
<keywords>Shop, prestashop</keywords> <keywords>Shop, prestashop</keywords>
<url_rewrite/> <url_rewrite/>
</meta> </meta>

View File

@@ -1,15 +1,17 @@
<?php <?php
return array( return array(
'informations' => 'informations' => array(
array( 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation' => 'http://doc.prestashop.com/display/PS16/Installing+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'forum' => 'https://forums.qloapps.com/',
'forum' => 'http://www.prestashop.com/forums/', 'blog' => 'https://qloapps.com/blog/',
'blog' => 'http://www.prestashop.com/blog/', 'support' => 'https://webkul.uvdesk.com/',
'support' => 'https://www.prestashop.com/de/support', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tailored_help' => 'https://webkul.uvdesk.com/',
'tailored_help' => 'http://addons.prestashop.com/en/388-support', 'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => 'translations' =>
array( array(

View File

@@ -20,7 +20,7 @@
</meta> </meta>
<meta id="index" id_shop="1"> <meta id="index" id_shop="1">
<title/> <title/>
<description>Shop powered by PrestaShop</description> <description>Shop powered by Webkul</description>
<keywords/> <keywords/>
<url_rewrite/> <url_rewrite/>
</meta> </meta>

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/display/PS16/Installing+PrestaShop', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'http://www.prestashop.com/blog/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/en/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/en/388-support', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>',

View File

@@ -7,4 +7,4 @@ E-mail address: {email}
{shop_name} - {shop_url} {shop_name} - {shop_url}
{shop_url} powered by PrestaShop™ {shop_url} powered by Webkul™

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/pages/viewpage.action?pageId=28016773', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'https://www.prestashop.com/blog/es/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/es/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/es/388-soporte', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Se ha producido un error de SQL para la entrada <i>%1$s</i>: <i>%2$s</i>', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Se ha producido un error de SQL para la entrada <i>%1$s</i>: <i>%2$s</i>',

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/display/PS16/Installing+PrestaShop', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/forum/164-انجمن-فارسی-persian/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'http://www.prestashop.com/blog/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/en/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/en/388-support', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'یک خطای SQL رخ داده است برای موجودی <i>%1$s</i> : <i>%2$s</i>', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'یک خطای SQL رخ داده است برای موجودی <i>%1$s</i> : <i>%2$s</i>',

View File

@@ -7,4 +7,4 @@
{shop_name} - {shop_url} {shop_name} - {shop_url}
{shop_url} powered by PrestaShop™ {shop_url} powered by Webkul™

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/display/PS16/Installer+PrestaShop', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://doc.prestashop.com/pages/viewpage.action?pageId=23069387', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/forum/18-forum-francophone/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'http://www.prestashop.com/blog/fr/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/fr/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/fr/388-support', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Une erreur SQL est survenue pour l\'entité <i>%1$s</i> : <i>%2$s</i>', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Une erreur SQL est survenue pour l\'entité <i>%1$s</i> : <i>%2$s</i>',

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/display/PS16/Installing+PrestaShop', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'http://www.prestashop.com/blog/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/en/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/en/388-support', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'שגיאת SQL אירעה עבור <i>%1$s</i>: <i>%2$s</i>', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'שגיאת SQL אירעה עבור <i>%1$s</i>: <i>%2$s</i>',

View File

@@ -20,7 +20,7 @@
</meta> </meta>
<meta id="index" id_shop="1"> <meta id="index" id_shop="1">
<title/> <title/>
<description>Shop powered by PrestaShop</description> <description>Shop powered by Webkul</description>
<keywords/> <keywords/>
<url_rewrite/> <url_rewrite/>
</meta> </meta>

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/display/PS16/Installing+PrestaShop', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'http://www.prestashop.com/blog/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/en/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/en/388-support', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Došlo je do pogreške SQL za entitet <i>%1$s</i>: <i>%2$s</i>', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'Došlo je do pogreške SQL za entitet <i>%1$s</i>: <i>%2$s</i>',

View File

@@ -7,4 +7,4 @@ E-mail address: {email}
{shop_name} - {shop_url} {shop_name} - {shop_url}
{shop_url} powered by PrestaShop™ {shop_url} powered by Webkul™

View File

@@ -20,7 +20,7 @@
</meta> </meta>
<meta id="index" id_shop="1"> <meta id="index" id_shop="1">
<title/> <title/>
<description>Shop powered by PrestaShop</description> <description>Shop powered by Webkul</description>
<keywords/> <keywords/>
<url_rewrite/> <url_rewrite/>
</meta> </meta>

View File

@@ -1,13 +1,16 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'documentation' => 'http://doc.prestashop.com/display/PS16/Installing+PrestaShop', 'documentation' => 'https://qloapps.com/qlo-reservation-system/',
'documentation_upgrade' => 'http://docs.prestashop.com/display/PS16/Updating+PrestaShop', 'documentation_upgrade' => 'https://webkul.uvdesk.com/',
'forum' => 'http://www.prestashop.com/forums/', 'forum' => 'https://forums.qloapps.com/',
'blog' => 'http://www.prestashop.com/blog/', 'blog' => 'https://qloapps.com/blog/',
'support' => 'https://www.prestashop.com/en/support', 'support' => 'https://webkul.uvdesk.com/',
'tutorial' => 'https://www.youtube.com/watch?v=psz4aIPZZuk', 'tutorial' => 'https://www.youtube.com/watch?v=BWoifR8INCE',
'tailored_help' => 'http://addons.prestashop.com/en/388-support', 'tailored_help' => 'https://webkul.uvdesk.com/',
'contact' => 'https://qloapps.com/#contact',
'services' => 'https://qloapps.com/services/?support',
'install_help' => 'https://qloapps.com/install-qloapps/',
), ),
'translations' => array( 'translations' => array(
'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'SQL hiba lépett fel a következőnél: <i>%1$s</i>, hibaüzenete <i>%2$s</i>', 'An SQL error occurred for entity <i>%1$s</i>: <i>%2$s</i>' => 'SQL hiba lépett fel a következőnél: <i>%1$s</i>, hibaüzenete <i>%2$s</i>',

Some files were not shown because too many files have changed in this diff Show More