V1.1.0 released: Feature Pricing, Room Disable on specific dates

This commit is contained in:
Rohit
2017-05-24 12:17:56 +05:30
parent bb6f9a263c
commit 1ce73c7a0c
324 changed files with 14485 additions and 17324 deletions

View File

@@ -1,3 +1,66 @@
####################################
# V1.1.0
####################################
## Added Features:
[+] Project : `source` column is added in the `order` table to show the source of the booking.
[+] Project : Everywhere now prices are shown according to the feature prices.
[+] Project : Everywhere prestashop logo is replaced with Qloapps logo
[+] BO : Feature price plans functionality has been added.
[+] BO : Funnctionality to disable rooms for many dates is added.
[+] BO : processConfiguration(), initFormConfiguration() are modified and validateDisableDateRanges() is added for disabled dated functionality in AdminProductsController.
[+] BO : AdminOrdersController is modified for feature price funtionality. renderview and renderform functions also modified to display according to feature prices.
[+] 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.
[+] MO : hotelreservationsystem : ChannelOrderPayment.php is added.
[+] MO : hotelreservationsystem : HotelCustomerAdvancedProductPayment.php is added.
[+] MO : hotelreservationsystem : HotelRoomDisableDates.php is added.
[+] MO : hotelreservationsystem : QloWebservice.php is added.
[+] MO : hotelreservationsystem : WebserviceSpecificManagementQlo.php is added.
[+] MO : hotelreservationsystem : ChannelManagerServices.php is added.
[+] MO : hotelreservationsystem : HotelRoomTypeFeaturePricing.php is added.
[+] MO : hotelreservationsystem : ChannelOrderPayment.php is added.
[+] MO : hotelreservationsystem : getRoomMinAdvPaymentAmount() is added in HotelAdvancedPayment.php.
[+] MO : 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.
[+] MO : hotelreservationsystem : getProductFeaturePricePlanByDateByPriority(), getHotelCartBookingData() are added in HotelCartBookingData.php.
[+] MO : hotelreservationsystem : 'disabled_dates' column is added in the table `htl_room_information`.
[+] MO : hotelreservationsystem : getRoomTypeAvailableRoomsForDateRange(), getRoomTypeDisabledRoomsForDateRange(), getRoomTypeBookedRoomsForDateRange() are added in HotelRoomInformation.php.
[+] MO : 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.
## Improved/changed features:
[*] MO : wkhotelroom : price of the room types are shown at home page according to feature price plans.
[*] FO : price of the room types are shown at home page according to feature price plans.
## Bug/Issues Resolved:
[-] FO : Resolved :: issue on saving Room type information at admin product information. On saving product sometimes redirecting to renderlist.
[-] FO : Resolved :: If admin left the 'max global date field' to be blank,then invalid dates are shown in check in-checkout fields at frontend.
[-] FO : Resolved :: On submitting the total order cancellation request,Popup with "Parser error text" is shown. (If submit request for single room first and then for all the rooms in the order).
[-] BO : Resolved :: Some validation issues on manage order refund rules page.
[-] BO : Resolved :: Room type column added on manage order refund request -> view page. (#158)
[-] BO : Resolved :: Advance paid amount on "manage order refund request view page" is shown for the single room.(#150)
[-] BO : Resolved :: If admin deleted the room from "order detail page",then errors are shown on the "customer order detail page".(#137)
[-] BO : Resolved :: While reallocating the rooms,sometimes the JSON is getting breakable,due to which no room is shown for swapping & reallocation.(#133)
[-] FO : Resolved :: While placing an order,if customer signed out on "order summary page",then error is shown. (#119)
[-] FO : Resolved :: If filtered with any parameter on category page,then on clicking the 'Book now button',page is redirecting to the category page itself.(#118)
[-] FO : Resolved :: On clicking to the 'add new icon',the page is redirecting to the 'assign features page' rather than 'add new features page'.(#106)
[-] BO : Resolved :: While adding the hotel features,no success message is shown on add new features-> manage hotel features page. (#105)
[-] BO : Resolved :: hotel interior heading and description are not changing on saving new ones.(#87)
[-] BO : Resolved :: PlayPal..Php curl issue on installation. needs curl to be installed on server for istallation (#89)
[-] BO : Resolved :: Many Order Edit issues resolved.
####################################
# V1.0.1
####################################
@@ -11,7 +74,6 @@
[*] FO : Font-family in order summary page in synced with the theme fonts now.
[*] BO : Bacorder setting option is removed from Settings->General Settings.
[*] MO : wkpaypaladaptive : Remove PHP CURL check from installation and display warning in "AdminPaymentsSetting" controller
## Fixed bugs:
@@ -19,7 +81,6 @@
[-] BO : Fixed showing wrong way of payment on refund request page.
[-] BO : Fixed showing wrong cancellation charges on refund request page.
[-] MO : wkabouthotel : Fixed interior heading and description does not change on changing from Setting->Hotel interior Block Setting.
[-] MO : hotelreservationsystem : refund rule bug for type percentage is resolved.
# Change Log previous version to V1.0.0:

View File

@@ -1,55 +1,38 @@
QloApps
Hotel Commerce
--------
Hotel Commerce plays a vital role in hotel industry as it has changed the online presence of the hotels.QloApps also known as Qlo is a Hotel Commerce Software or you can say a Hotel Booking & Reservation System. Qlo is an open source and free platform which help you to launch your own hotel booking website and manage your online & On-Desk booking easily
Hotel Commerce is Hotel Booking & Reservarion system . Using this you can easily launch your hotel booking website and even manage your offline booking too . This package is developed on top of Prestashop 1.6.
Demo
--------
FrontEnd : http://demo.qloapps.com </br>
Backend : http://demo.qloapps.com/adminhtl/index.php </br>
FrontEnd : http://prestashop.webkul.com/hotel-reservation/ </br>
Backend : http://prestashop.webkul.com/hotel-reservation/adminhtl/ </br>
username : demo@demo.com </br>
Password : demodemo </br>
Server configuration
--------
To install Qlo, you need a web server running PHP 5.2+ and any flavor of MySQL 5.0+ (MySQL, MariaDB, Percona Server, etc)
To install HotelCommerce, you need a web server running PHP 5.2+ and any flavor of MySQL 5.0+ (MySQL, MariaDB, Percona Server, etc)
You will also need a database administration tool, such as phpMyAdmin, in order to create a database for PrestaShop.
We recommend the Apache or Nginx web servers.
Installation
--------
a) from Source </br>
Please go through this blog : http://qloapps.com/install-qloapps/ for detail instruction about installation.
In nutshell :
Once the files in the QloApps archive have been decompressed and uploaded on your hosting space, go to the root of your QloApps directory with your web browser, and the QloApps installer will start automatically. Follow the instructions until QloApps is installed.
b) Docker Image :</br>
https://github.com/webkul/qloapps_docker</br>
https://hub.docker.com/r/webkul/qloapps_docker/ </br>
c) Vagrant Image :
https://github.com/webkul/Vagrant_qloapps
Once the files in the HotelCommerce archive have been decompressed and uploaded on your hosting space, go to the root of your HotelCommerce directory with your web browser, and the HotelCommerce installer will start automatically. Follow the instructions until HotelCommerce is installed.
Getting support
--------
If you need help using QloApps, contact the QloApps support team: qloapps@webkul.com
or raise ticket at https://webkul.uvdesk.com
If you need help using PrestaShop 1.6, contact the PrestaShop support team: support@webkul.com
or raise ticket at https://webkul.com/ticket/
Webkul is known for his proactive support and already developed more than 100+ plugins on prestashop and more than 700+ plugins on other
platforms.
Webkul is known for his proactive support and already developed more than 100+ plugins on prestashop and more than 700+ plugins on other opensource platforms.
license
--------
OSL V3 : https://opensource.org/licenses/OSL-3.0
Credits
--------
Crafted with :heart: at [Webkul](http://webkul.com)
Thank you for downloading.
Thank you for downloading .

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -96,6 +96,7 @@
</div>
</div>
<div class="col-md-12 col-lg-2">
{$hookDashboardZoneThree}
<section class="dash_news panel">
<h3><i class="icon-rss"></i> {l s='PrestaShop News'}</h3>
<div class="dash_news_content"></div>

View File

@@ -25,7 +25,7 @@
<div id="login-panel">
<div id="login-header">
<h1 class="text-center">
<img id="logo" src="{$img_dir}prestashop@2x.png" width="123px" height="24px" alt="PrestaShop" />
<img id="logo" src="{$img_dir}prestashop@2x.png" width="123px" alt="PrestaShop" />
</h1>
<div class="text-center">{$ps_version}</div>
<div id="error" class="hide alert alert-danger">
@@ -49,7 +49,7 @@
<div class="alert alert-warning">{$warningSslMessage}</div>
{/if}
</div>
<div id="shop-img"><img src="{$img_dir}preston-login@2x.png" alt="{$shop_name}" width="69.5px" height="118.5px" /></div>
<div id="shop-img"><img src="{$img_dir}preston-login@2x.png" alt="{$shop_name}" width="136px" height="136px" /></div>
<div class="flip-container">
<div class="flipper">
<div class="front panel">
@@ -140,16 +140,16 @@
</a>
</p>
<p class="text-center">
<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>
</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>
</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>
</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>
</a>
</p>

View File

@@ -69,7 +69,7 @@
<div class="row">
<div class="input-group fixed-width-xl">
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign} {l s='tax excl.'}</div>{/if}
<input type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" disabled="disabled" />
<input type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" readonly="true" />
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign} {l s='tax excl.'}</div>{/if}
</div>
</div>
@@ -77,7 +77,7 @@
<div class="row">
<div class="input-group fixed-width-xl">
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign} {l s='tax incl.'}</div>{/if}
<input type="text" name="add_product[product_price_tax_incl]" id="add_product_product_price_tax_incl" value="" disabled="disabled" />
<input type="text" name="add_product[product_price_tax_incl]" id="add_product_product_price_tax_incl" value="" readonly="true" />
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign} {l s='tax incl.'}</div>{/if}
</div>
</div>

View File

@@ -59,6 +59,14 @@
{/if}
</td>
</td>
<td class="text-center">
<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}
</span>&nbsp;
<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}
</span>
</td>
<td class="text-center">
<span class="product_price_show">{convertPriceWithCurrency price=$data.amt_with_qty_tax_incl currency=$currency->id}</span>
{if $can_edit}
@@ -67,7 +75,7 @@
<div class="fixed-width-xl">
<div class="input-group">
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign} {l s='tax excl.'}</div>{/if}
<input type="text" name="product_price_tax_excl" class="edit_product_price_tax_excl edit_product_price" value="{Tools::ps_round($data.unit_amt_tax_excl, 2)}"/>
<input type="text" name="product_price_tax_excl" class="edit_product_price_tax_excl edit_product_price" value="{Tools::ps_round($data.original_unit_price_tax_excl, 2)}"/>
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign} {l s='tax excl.'}</div>{/if}
</div>
</div>
@@ -75,7 +83,7 @@
<div class="fixed-width-xl">
<div class="input-group">
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign} {l s='tax incl.'}</div>{/if}
<input type="text" name="product_price_tax_incl" class="edit_product_price_tax_incl edit_product_price" value="{Tools::ps_round($data.unit_amt_tax_incl, 2)}"/>
<input type="text" name="product_price_tax_incl" class="edit_product_price_tax_incl edit_product_price" value="{Tools::ps_round($data.original_unit_price_tax_incl, 2)}"/>
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign} {l s='tax incl.'}</div>{/if}
</div>
</div>
@@ -110,7 +118,7 @@
{if $data['stage_name'] == 'Refunded' || $data['stage_name'] == 'Rejected'}
<p class="text-center">----</p>
{else}
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mySwappigModal" data-id_order="{$order->id}" data-room_num={$data['room_num']} data-date_from={$data['date_from']} data-date_to={$data['date_to']} data-id_room={$data['id_room']} data-cust_name="{$data['alloted_cust_name']}" data-cust_email="{$data['alloted_cust_email']}" data-avail_rm_swap={$data['avail_rooms_to_swap']|@json_encode} data-avail_rm_realloc={$data['avail_rooms_to_realloc']|@json_encode}>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mySwappigModal" data-id_order="{$order->id}" data-room_num='{$data.room_num}' data-date_from='{$data.date_from}' data-date_to='{$data.date_to}' data-id_room='{$data.id_room}' data-cust_name='{$data.alloted_cust_name}' data-cust_email='{$data.alloted_cust_email}' data-avail_rm_swap='{$data.avail_rooms_to_swap|@json_encode}' data-avail_rm_realloc='{$data.avail_rooms_to_realloc|@json_encode}'>
{l s='Reallocate Room' mod='hotelreservationsystem'}
</button>
{/if}
@@ -161,3 +169,10 @@
</td>
{/if}
</tr>
<style type="text/css">
.room_type_old_price {
text-decoration: line-through;
color:#979797;
font-size:12px;
}
</style>

View File

@@ -12,6 +12,7 @@
<th><span class="title_box">{l s='Room Image'}</th>
<th><span class="title_box">{l s='Room Type'}</span></th>
<th><span class="title_box">{l s='Duration'}</span></th>
<th><span class="title_box">{l s='Unit Price'}</span></th>
<th><span class="title_box">{l s='Price'}</span></th>
<th><span class="title_box">{l s='Action'}</span></th>
</tr>
@@ -25,6 +26,14 @@
<td><img src="{$data.image_link}" title="Room image" /></td>
<td>{$data.room_type}</td>
<td>{$data.date_from|date_format:"%d-%m-%Y"}&nbsp-&nbsp {$data.date_to|date_format:"%d-%m-%Y"}</td>
<td id="cart_detail_data_unit_price_{$data.id}">
<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}>
{displayPrice price=$data.product_price}
</span>&nbsp;
<span class="room_type_current_price" {if !$data.feature_price_diff}style="display:none;"{/if}>
{displayPrice price=$data.feature_price}
</span>
</td>
<td id="cart_detail_data_price_{$data.id}">{displayPrice price=$data.amt_with_qty}</td>
<td>
<button class="btn btn-primary delete_hotel_cart_data" data-id_room={$data.id_room} data-id_product={$data.id_product} data-id = {$data.id} data-id_cart = {$data.id_cart} data-date_to = {$data.date_to} data-date_from = {$data.date_from}><i class="icon-trash"></i>&nbsp{l s='Delete'}</button>
@@ -40,4 +49,12 @@
</table>
</div>
</div>
</div>
</div>
<style type="text/css">
.room_type_old_price {
text-decoration: line-through;
color:#979797;
font-size:12px;
}
</style>

View File

@@ -970,6 +970,7 @@
<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='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='Total Price'}</span></th>
<th class="text-center"><span class="title_box">{l s='Refund Stage'}</span></th>
<th class="text-center"><span class="title_box">{l s='Refund Status'}</span></th>
@@ -1212,7 +1213,7 @@
<tr id="total_products">
<td class="text-right"><strong>{l s='Total Rooms Cost'}</strong></td>
<td class="amount text-right nowrap">
<strong>{displayPrice price=$total_rooms_cost currency=$currency->id}</strong>
<strong>{displayPrice price=$totalRoomsCostTE currency=$currency->id}</strong>
</td>
<td class="partial_refund_fields current-edit" style="display:none;"></td>
</tr>
@@ -1501,23 +1502,23 @@
</div>
<div class="modal-body">
<div class="form-group">
<label for="curr_room_num" class="control-label">{l s='Current Room Number:' mod='hotelreservationsystem'}</label>
<label for="curr_room_num" class="control-label model-label">{l s='Current Room Number:' mod='hotelreservationsystem'}</label>
<input type="text" class="form-control modal_curr_room_num" name="modal_curr_room_num" readonly="true">
<input type="hidden" class="form-control modal_date_from" name="modal_date_from">
<input type="hidden" class="form-control modal_date_to" name="modal_date_to">
<input type="hidden" class="form-control modal_id_room" name="modal_id_room">
</div>
<div class="form-group">
<label for="realloc_avail_rooms" class="control-label">{l s='Available Rooms To Reallocate:' mod='hotelreservationsystem'}</label>
<div style="width: 195px;">
<label for="realloc_avail_rooms" class="control-label model-label">{l s='Available Rooms To Reallocate:' mod='hotelreservationsystem'}</label>
<div class="realloc_avail_rooms_container" style="width: 195px;">
<select class="form-control" name="realloc_avail_rooms" id="realloc_avail_rooms">
<option value="0" selected="selected">{l s='Select Rooms' mod='hotelreservationsystem'}</option>
</select>
<p class="error_text" id="realloc_sel_rm_err_p"></p>
</div>
<p class="error_text" id="realloc_sel_rm_err_p"></p>
</div>
<div class="form-group">
<label style="text-decoration:underline;margin-top:5px;" for="message-text" class="col-sm-12 control-label"><i class="icon-info-circle"></i>&nbsp;{l s='Currently Alloted Customer Information:' mod='hotelreservationsystem'}</label>
<label style="text-decoration:underline;margin-top:5px;" for="message-text" class="col-sm-12 control-label model-label"><i class="icon-info-circle"></i>&nbsp;{l s='Currently Alloted Customer Information:' mod='hotelreservationsystem'}</label>
<dl class="well list-detail">
<dt>{l s='Name'}</dt>
<dd class="cust_name"></dd><br>
@@ -1540,7 +1541,7 @@
</div>
<div class="modal-body">
<div class="form-group">
<label for="swap_curr_room_num" class="control-label">{l s='Current Room Number:' mod='hotelreservationsystem'}</label>
<label for="swap_curr_room_num" class="control-label model-label">{l s='Current Room Number:' mod='hotelreservationsystem'}</label>
<input type="text" class="form-control modal_curr_room_num" name="modal_curr_room_num" readonly="true">
<input type="hidden" class="form-control modal_date_from" name="modal_date_from">
<input type="hidden" class="form-control modal_date_to" name="modal_date_to">
@@ -1548,16 +1549,12 @@
<input type="hidden" class="form-control modal_id_order" name="modal_id_order">
</div>
<div class="form-group">
<label for="swap_avail_rooms" class="control-label">{l s='Available Rooms To Swap:' mod='hotelreservationsystem'}</label>
<div style="width: 195px;">
<select class="form-control" name="swap_avail_rooms" id="swap_avail_rooms">
<option value="0" selected="selected">{l s='Select Rooms' mod='hotelreservationsystem'}</option>
</select>
<p class="error_text" id="swap_sel_rm_err_p"></p>
</div>
<label for="swap_avail_rooms" class="control-label model-label">{l s='Available Rooms To Swap:' mod='hotelreservationsystem'}</label>
<div class="swap_avail_rooms_container"></div>
<p class="error_text" id="swap_sel_rm_err_p"></p>
</div>
<div class="form-group">
<label style="text-decoration:underline;margin-top:5px;" for="message-text" class="col-sm-12 control-label"><i class="icon-info-circle"></i>&nbsp;{l s='Currently Alloted Customer Information:' mod='hotelreservationsystem'}</label>
<label style="text-decoration:underline;margin-top:5px;" for="message-text" class="col-sm-12 control-label model-label"><i class="icon-info-circle"></i>&nbsp;{l s='Currently Alloted Customer Information:' mod='hotelreservationsystem'}</label>
<dl class="well list-detail">
<dt>{l s='Name'}</dt>
<dd class="cust_name"></dd><br>
@@ -1580,159 +1577,171 @@
{addJsDefL name=no_rm_avail_txt}{l s='No rooms available.' js=1 mod='hotelreservationsystem'}{/addJsDefL}
{addJsDefL name=slct_rm_err}{l s='Please select a room first.' js=1 mod='hotelreservationsystem'}{/addJsDefL}
{/strip}
<script type="text/javascript">
var geocoder = new google.maps.Geocoder();
var delivery_map, invoice_map;
<style>
.error_text {
color:red;
}
.model-label {
font-weight:bold!important;
}
</style>
$(document).ready(function()
<script type="text/javascript">
var geocoder = new google.maps.Geocoder();
var delivery_map, invoice_map;
$(document).ready(function()
{
$('#mySwappigModal').on('hidden.bs.modal', function (e)
{
/*By webkul for swapping Booked rooms modal js*/
$("#swap_allocated_rooms").on('click', function(e){
$(".error_text").text('');
if ($('#swapped_avail_rooms').val() == 0)
{
$("#sel_rm_err_p").text(slct_rm_err);
return false;
}
});
$(".modal_id_order").val('');
$(".modal_date_from").val('');
$(".modal_date_to").val('');
$(".modal_id_room").val('');
$(".modal_curr_room_num").val('');
$(".cust_name").text('');
$(".cust_email").text('');
$(".swp_rm_opts").remove();
$(".realloc_rm_opts").remove();
});
$('#mySwappigModal').on('hidden.bs.modal', function (e)
{
$(".modal_id_order").val('');
$(".modal_date_from").val('');
$(".modal_date_to").val('');
$(".modal_id_room").val('');
$(".modal_curr_room_num").val('');
$(".cust_name").text('');
$(".cust_email").text('');
$(".swp_rm_opts").remove();
$(".realloc_rm_opts").remove();
});
$('#mySwappigModal').on('shown.bs.modal', function (e)
{
$(".modal_id_order").val(e.relatedTarget.dataset.id_order);
$(".modal_date_from").val(e.relatedTarget.dataset.date_from);
$(".modal_date_to").val(e.relatedTarget.dataset.date_to);
$(".modal_id_room").val(e.relatedTarget.dataset.id_room);
$(".modal_curr_room_num").val(e.relatedTarget.dataset.room_num);
$(".cust_name").text(e.relatedTarget.dataset.cust_name);
$(".cust_email").text(e.relatedTarget.dataset.cust_email);
$('#mySwappigModal').on('shown.bs.modal', function (e)
{
$(".modal_id_order").val(e.relatedTarget.dataset.id_order);
$(".modal_date_from").val(e.relatedTarget.dataset.date_from);
$(".modal_date_to").val(e.relatedTarget.dataset.date_to);
$(".modal_id_room").val(e.relatedTarget.dataset.id_room);
$(".modal_curr_room_num").val(e.relatedTarget.dataset.room_num);
$(".cust_name").text(e.relatedTarget.dataset.cust_name);
$(".cust_email").text(e.relatedTarget.dataset.cust_email);
html = '';
var json_arr_rm_swp = JSON.parse(e.relatedTarget.dataset.avail_rm_swap);
$.each(json_arr_rm_swp, function(key,val)
{
html += '<option class="swp_rm_opts" value="'+val.id_room+'" >'+val.room_num+'</option>';
});
if (html != '')
$("#swap_avail_rooms").append(html);
// For Rooms Swapping
if (e.relatedTarget.dataset.avail_rm_swap != 'false') {
var json_arr_rm_swp = JSON.parse(e.relatedTarget.dataset.avail_rm_swap);
html = '';
var json_arr_rm_realloc = JSON.parse(e.relatedTarget.dataset.avail_rm_realloc);
$.each(json_arr_rm_realloc, function(key,val)
{
html += '<option class="realloc_rm_opts" value="'+val.id_room+'" >'+val.room_num+'</option>';
});
if (html != '')
$("#realloc_avail_rooms").append(html);
});
/*For swaping rooms in the modal*/
$("#realloc_allocated_rooms").on('click', function(e){
$(".error_text").text('');
if ($('#realloc_avail_rooms').val() == 0)
{
$("#realloc_sel_rm_err_p").text(slct_rm_err);
return false;
}
});
$("#swap_allocated_rooms").on('click', function(e){
$(".error_text").text('');
if ($('#swap_avail_rooms').val() == 0)
{
$("#swap_sel_rm_err_p").text(slct_rm_err);
return false;
}
});
html = '<select class="form-control" name="swap_avail_rooms" id="swap_avail_rooms" style="width:195px;">';
$.each(json_arr_rm_swp, function(key,val) {
html += '<option class="swp_rm_opts" value="'+val.id_room+'" >'+val.room_num+'</option>';
});
html += '</select>';
$(".swap_avail_rooms_container").empty().append(html);
} else {
$(".swap_avail_rooms_container").empty().text(no_rm_avail_txt);
}
// For Rooms Reallocation
if (e.relatedTarget.dataset.avail_rm_realloc != 'false') {
var json_arr_rm_realloc = JSON.parse(e.relatedTarget.dataset.avail_rm_realloc);
html = '<select class="form-control" name="realloc_avail_rooms" id="realloc_avail_rooms" style="width:195px;">';
$.each(json_arr_rm_realloc, function(key,val) {
html += '<option class="realloc_rm_opts" value="'+val.id_room+'" >'+val.room_num+'</option>';
});
html += '</select>';
$(".realloc_avail_rooms_container").empty().append(html);
} else {
$(".realloc_avail_rooms_container").empty().text(no_rm_avail_txt);
}
});
/*END*/
/*For reallocating rooms in the modal*/
$("#realloc_allocated_rooms").on('click', function(e){
$(".error_text").text('');
var room_to_reallocate = $('#realloc_avail_rooms').val();
if (typeof room_to_reallocate == 'undefined' || room_to_reallocate == 0) {
$("#realloc_sel_rm_err_p").text(slct_rm_err);
return false;
}
});
/*For swaping rooms in the modal*/
$("#swap_allocated_rooms").on('click', function(e){
$(".error_text").text('');
var room_to_swap = $('#swap_avail_rooms').val();
console.log(room_to_swap);
if (typeof room_to_swap == 'undefined' || room_to_swap == 0) {
$("#swap_sel_rm_err_p").text(slct_rm_err);
return false;
}
});
/*END*/
$(".textarea-autosize").autosize();
$(".textarea-autosize").autosize();
geocoder.geocode({
address: '{$addresses.delivery->address1|@addcslashes:'\''},{$addresses.delivery->postcode|@addcslashes:'\''},{$addresses.delivery->city|@addcslashes:'\''}{if isset($addresses.deliveryState->name) && $addresses.delivery->id_state},{$addresses.deliveryState->name|@addcslashes:'\''}{/if},{$addresses.delivery->country|@addcslashes:'\''}'
}, function(results, status) {
if (status === google.maps.GeocoderStatus.OK)
{
delivery_map = new google.maps.Map(document.getElementById('map-delivery-canvas'), {
zoom: 10,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: results[0].geometry.location
});
var delivery_marker = new google.maps.Marker({
map: delivery_map,
position: results[0].geometry.location,
url: 'http://maps.google.com?q={$addresses.delivery->address1|urlencode},{$addresses.delivery->postcode|urlencode},{$addresses.delivery->city|urlencode}{if isset($addresses.deliveryState->name) && $addresses.delivery->id_state},{$addresses.deliveryState->name|urlencode}{/if},{$addresses.delivery->country|urlencode}'
});
google.maps.event.addListener(delivery_marker, 'click', function() {
window.open(delivery_marker.url);
});
}
});
geocoder.geocode({
address: '{$addresses.invoice->address1|@addcslashes:'\''},{$addresses.invoice->postcode|@addcslashes:'\''},{$addresses.invoice->city|@addcslashes:'\''}{if isset($addresses.deliveryState->name) && $addresses.invoice->id_state},{$addresses.deliveryState->name|@addcslashes:'\''}{/if},{$addresses.invoice->country|@addcslashes:'\''}'
}, function(results, status) {
if (status === google.maps.GeocoderStatus.OK)
{
invoice_map = new google.maps.Map(document.getElementById('map-invoice-canvas'), {
zoom: 10,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: results[0].geometry.location
});
invoice_marker = new google.maps.Marker({
map: invoice_map,
position: results[0].geometry.location,
url: 'http://maps.google.com?q={$addresses.invoice->address1|urlencode},{$addresses.invoice->postcode|urlencode},{$addresses.invoice->city|urlencode}{if isset($addresses.deliveryState->name) && $addresses.invoice->id_state},{$addresses.deliveryState->name|urlencode}{/if},{$addresses.invoice->country|urlencode}'
});
google.maps.event.addListener(invoice_marker, 'click', function() {
window.open(invoice_marker.url);
});
}
});
var date = new Date();
var hours = date.getHours();
if (hours < 10)
hours = "0" + hours;
var mins = date.getMinutes();
if (mins < 10)
mins = "0" + mins;
var secs = date.getSeconds();
if (secs < 10)
secs = "0" + secs;
$('.datepicker').datetimepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd ' + hours + ':' + mins + ':' + secs
});
geocoder.geocode({
address: '{$addresses.delivery->address1|@addcslashes:'\''},{$addresses.delivery->postcode|@addcslashes:'\''},{$addresses.delivery->city|@addcslashes:'\''}{if isset($addresses.deliveryState->name) && $addresses.delivery->id_state},{$addresses.deliveryState->name|@addcslashes:'\''}{/if},{$addresses.delivery->country|@addcslashes:'\''}'
}, function(results, status) {
if (status === google.maps.GeocoderStatus.OK)
{
delivery_map = new google.maps.Map(document.getElementById('map-delivery-canvas'), {
zoom: 10,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: results[0].geometry.location
});
var delivery_marker = new google.maps.Marker({
map: delivery_map,
position: results[0].geometry.location,
url: 'http://maps.google.com?q={$addresses.delivery->address1|urlencode},{$addresses.delivery->postcode|urlencode},{$addresses.delivery->city|urlencode}{if isset($addresses.deliveryState->name) && $addresses.delivery->id_state},{$addresses.deliveryState->name|urlencode}{/if},{$addresses.delivery->country|urlencode}'
});
google.maps.event.addListener(delivery_marker, 'click', function() {
window.open(delivery_marker.url);
});
}
});
// Fix wrong maps center when map is hidden
$('#tabAddresses').click(function(){
x = delivery_map.getZoom();
c = delivery_map.getCenter();
google.maps.event.trigger(delivery_map, 'resize');
delivery_map.setZoom(x);
delivery_map.setCenter(c);
x = invoice_map.getZoom();
c = invoice_map.getCenter();
google.maps.event.trigger(invoice_map, 'resize');
invoice_map.setZoom(x);
invoice_map.setCenter(c);
geocoder.geocode({
address: '{$addresses.invoice->address1|@addcslashes:'\''},{$addresses.invoice->postcode|@addcslashes:'\''},{$addresses.invoice->city|@addcslashes:'\''}{if isset($addresses.deliveryState->name) && $addresses.invoice->id_state},{$addresses.deliveryState->name|@addcslashes:'\''}{/if},{$addresses.invoice->country|@addcslashes:'\''}'
}, function(results, status) {
if (status === google.maps.GeocoderStatus.OK)
{
invoice_map = new google.maps.Map(document.getElementById('map-invoice-canvas'), {
zoom: 10,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: results[0].geometry.location
});
invoice_marker = new google.maps.Marker({
map: invoice_map,
position: results[0].geometry.location,
url: 'http://maps.google.com?q={$addresses.invoice->address1|urlencode},{$addresses.invoice->postcode|urlencode},{$addresses.invoice->city|urlencode}{if isset($addresses.deliveryState->name) && $addresses.invoice->id_state},{$addresses.deliveryState->name|urlencode}{/if},{$addresses.invoice->country|urlencode}'
});
google.maps.event.addListener(invoice_marker, 'click', function() {
window.open(invoice_marker.url);
});
}
});
</script>
var date = new Date();
var hours = date.getHours();
if (hours < 10)
hours = "0" + hours;
var mins = date.getMinutes();
if (mins < 10)
mins = "0" + mins;
var secs = date.getSeconds();
if (secs < 10)
secs = "0" + secs;
$('.datepicker').datetimepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd ' + hours + ':' + mins + ':' + secs
});
});
// Fix wrong maps center when map is hidden
$('#tabAddresses').click(function(){
x = delivery_map.getZoom();
c = delivery_map.getCenter();
google.maps.event.trigger(delivery_map, 'resize');
delivery_map.setZoom(x);
delivery_map.setCenter(c);
x = invoice_map.getZoom();
c = invoice_map.getCenter();
google.maps.event.trigger(invoice_map, 'resize');
invoice_map.setZoom(x);
invoice_map.setCenter(c);
});
</script>
{/block}

View File

@@ -1,166 +1,308 @@
{if isset($product->id)}
<div id="product-configuration" class="panel product-tab">
<input type="hidden" name="submitted_tabs[]" value="Configuration" />
<h3 class="tab"> <i class="icon-AdminAdmin"></i> {l s='Configuration' mod='hotelreservationsystem'}</h3>
{if isset($htl_room_type)}
<input type="hidden" value="{$htl_room_type['id']}" name="wk_id_room_type">
{/if}
<div class="form-group">
<div id="product-configuration" class="panel product-tab">
<input type="hidden" name="submitted_tabs[]" value="Configuration" />
<h3 class="tab"> <i class="icon-AdminAdmin"></i> {l s='Configuration' mod='hotelreservationsystem'}</h3>
{if isset($htl_room_type)}
<label class="control-label col-sm-2" for="hotel_place">
{l s='Hotel' mod='hotelreservationsystem'}
</label>
<div class="col-sm-4">
<input type="text" class="form-control" value="{$htl_full_info['hotel_name']}" readonly>
<input type="hidden" name="id_hotel" value="{$htl_room_type['id_hotel']}">
</div>
{else}
<label class="control-label col-sm-2" for="hotel_place">
{l s='Select Hotel' mod='hotelreservationsystem'}
</label>
<div class="col-sm-4">
<select name="id_hotel" id="hotel_place" class="form-control">
{foreach from=$htl_info item=htl_dtl}
<option value="{$htl_dtl['id']}" >{$htl_dtl['hotel_name']}</option>
{/foreach}
</select>
</div>
<input type="hidden" value="{$htl_room_type['id']}" name="wk_id_room_type">
{/if}
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="num_adults">
{l s='Adults' mod='hotelreservationsystem'}
</label>
<div class="col-sm-4">
<input id="num_adults" type="text" name="num_adults" class="form-control" {if isset($htl_room_type)}value="{$htl_room_type['adult']}"{/if}>
<input type="hidden" id="checkConfSubmit" value="0" name="checkConfSubmit">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="num_child">
{l s='Childrens' mod='hotelreservationsystem'}
</label>
<div class="col-sm-4">
<input id="num_child" type="text" name="num_child" class="form-control" {if isset($htl_room_type)}value="{$htl_room_type['children']}"{/if}>
</div>
</div>
<div class="from-group table-responsive-row clearfix">
<table class="table hotel-room">
<thead>
<tr class="nodrag nodrop">
<th class="col-sm-1 center">
<span>{l s='Room No.' mod='hotelreservationsystem'}</span>
</th>
<th class="col-sm-2 center">
<span>{l s='Floor' mod='hotelreservationsystem'}</span>
</th>
<th class="col-sm-2">
<span>{l s='Status' mod='hotelreservationsystem'}</span>
</th>
<th class="col-sm-7 center">
<span>{l s='Comments' mod='hotelreservationsystem'}</span>
</th>
</tr>
{if isset($htl_room_info) && $htl_room_info}
{foreach from=$htl_room_info item=info}
<tr class="room_data_values">
<td class="col-sm-1 center">
<input class="form-control" type="text" value="{$info['room_num']}" name="room_num[]">
</td>
<td class="col-sm-2 center">
<input class="form-control" type="text" value="{$info['floor']}" name="room_floor[]">
</td>
<td class="col-sm-2 center">
<select class="form-control" name="room_status[]">
{foreach from=$rm_status item=room_stauts}
<option value="{$room_stauts['id']}" {if $info['id_status'] == {$room_stauts['id']}}selected{/if}>{$room_stauts['status']}</option>
{/foreach}
</select>
</td>
<td class="center col-sm-6">
<input type="text" class="form-control" value="{$info['comment']}" name="room_comment[]">
</td>
<td class="center col-sm-1">
<a href="#" class="rm_htl_room btn btn-default" data-id-htl-info="{$info['id']}"><i class="icon-trash"></i></a>
<input type="hidden" name="id_room_info[]" value="{$info['id']}">
</td>
</tr>
{/foreach}
{else}
{for $k=1 to 2}
<tr>
<td class="col-sm-1 center">
<input class="form-control" type="text" name="room_num[]">
</td>
<td class="col-sm-2 center">
<input class="form-control" type="text" name="room_floor[]">
</td>
<td class="col-sm-2 center">
<select class="form-control" name="room_status[]">
{foreach from=$rm_status item=room_stauts}
<option value="{$room_stauts['id']}">{$room_stauts['status']}</option>
{/foreach}
</select>
</td>
<td class="center col-sm-6">
<input type="text" class="form-control" name="room_comment[]">
</td>
</tr>
{/for}
{/if}
</thead>
</table>
<div class="form-group">
<div class="col-sm-12">
<button id="add-more-rooms-button" class="btn btn-default" type="button" data-size="s" data-style="expand-right">
<i class="icon-folder-open"></i>
{l s='Add More Rooms' mod='hotelreservationsystem'}
</button>
{if isset($htl_room_type)}
<label class="control-label col-sm-2" for="hotel_place">
{l s='Hotel' mod='hotelreservationsystem'}
</label>
<div class="col-sm-4">
<input type="text" class="form-control" value="{$htl_full_info['hotel_name']}" readonly>
<input type="hidden" name="id_hotel" value="{$htl_room_type['id_hotel']}">
</div>
{else}
<label class="control-label col-sm-2" for="hotel_place">
{l s='Select Hotel' mod='hotelreservationsystem'}
</label>
<div class="col-sm-4">
<select name="id_hotel" id="hotel_place" class="form-control">
{foreach from=$htl_info item=htl_dtl}
<option value="{$htl_dtl['id']}" >{$htl_dtl['hotel_name']}</option>
{/foreach}
</select>
</div>
{/if}
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="num_adults">
{l s='Adults' mod='hotelreservationsystem'}
</label>
<div class="col-sm-4">
<input id="num_adults" type="text" name="num_adults" class="form-control" {if isset($htl_room_type)}value="{$htl_room_type['adult']}"{/if}>
<input type="hidden" id="checkConfSubmit" value="0" name="checkConfSubmit">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="num_child">
{l s='Childrens' mod='hotelreservationsystem'}
</label>
<div class="col-sm-4">
<input id="num_child" type="text" name="num_child" class="form-control" {if isset($htl_room_type)}value="{$htl_room_type['children']}"{/if}>
</div>
</div>
<div class="from-group table-responsive-row clearfix">
<table class="table hotel-room">
<thead>
<tr class="nodrag nodrop">
<th class="col-sm-1 center">
<span>{l s='Room No.' mod='hotelreservationsystem'}</span>
</th>
<th class="col-sm-2 center">
<span>{l s='Floor' mod='hotelreservationsystem'}</span>
</th>
<th class="col-sm-2">
<span>{l s='Status' mod='hotelreservationsystem'}</span>
</th>
<th class="col-sm-7 center">
<span>{l s='Extra Information' mod='hotelreservationsystem'}</span>
</th>
</tr>
{if isset($htl_room_info) && $htl_room_info}
{foreach from=$htl_room_info key=key item=info}
<tr class="room_data_values" id="row_index{$key}" data-rowKey="{$key}">
<td class="col-sm-1 center">
<input class="form-control" type="text" value="{$info['room_num']}" name="room_num[]">
</td>
<td class="col-sm-2 center">
<input class="form-control" type="text" value="{$info['floor']}" name="room_floor[]">
</td>
<td class="col-sm-2 center">
<select class="form-control room_status" name="room_status[]">
{foreach from=$rm_status item=room_stauts}
<option value="{$room_stauts['id']}" {if $info['id_status'] == {$room_stauts['id']}}selected="selected"{/if}>{$room_stauts['status']}</option>
{/foreach}
</select>
</td>
<td class="center col-sm-6">
<a class="btn btn-default deactiveDatesModal" data-toggle="modal" data-target="#deactiveDatesModal" {if $info['id_status'] != 3 }style="display: none;"{/if}>{if $info['id_status'] != 3 }{l s='Add Dates' mod='hotelreservationsystem'}{else}{l s='View Dates' mod='hotelreservationsystem'}{/if}
</a>
<input type="text" class="form-control room_comment" value="{$info['comment']}" name="room_comment[]" {if $info['id_status'] == 3 }style="display: none;"{/if}>
<input type="hidden" class="form-control disableDatesJSON" name="disableDatesJSON[]" {if $info['id_status'] == 3}value="{$info['disabled_dates_json']|escape:'html':'UTF-8'}"{/if}>
</td>
<td class="center col-sm-1">
<a href="#" class="rm_htl_room btn btn-default" data-id-htl-info="{$info['id']}"><i class="icon-trash"></i></a>
<input type="hidden" name="id_room_info[]" value="{$info['id']}">
</td>
</tr>
{/foreach}
{else}
{for $k=0 to 1}
<tr class="room_data_values" id="row_index{$k}" data-rowKey="{$k}">
<td class="col-sm-2 center">
<input class="form-control" type="text" name="room_num[]">
</td>
<td class="col-sm-2 center">
<input class="form-control" type="text" name="room_floor[]">
</td>
<td class="col-sm-2 center">
<select class="form-control room_status" name="room_status[]">
{foreach from=$rm_status item=room_stauts}
<option value="{$room_stauts['id']}">{$room_stauts['status']}</option>
{/foreach}
</select>
</td>
<td class="center col-sm-6">
<a class="deactiveDatesModal" data-toggle="modal" data-target="#deactiveDatesModal" style="display: none;">
{l s='add Dates' mod='hotelreservationsystem'}
</a>
<input type="hidden" class="form-control disableDatesJSON" name="disableDatesJSON" value="0">
<input type="text" class="form-control room_comment" name="room_comment[]">
</td>
</tr>
{/for}
{/if}
</thead>
</table>
<div class="form-group">
<div class="col-sm-12">
<button id="add-more-rooms-button" class="btn btn-default" type="button" data-size="s" data-style="expand-right">
<i class="icon-folder-open"></i>
{l s='Add More Rooms' mod='hotelreservationsystem'}
</button>
</div>
</div>
</div>
<div class="panel-footer">
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}{if isset($smarty.request.page) && $smarty.request.page > 1}&amp;submitFilterproduct={$smarty.request.page|intval}{/if}" class="btn btn-default">
<i class="process-icon-cancel"></i>
{l s='Cancel'}
</a>
<button type="submit" name="submitAddproduct" class="btn btn-default pull-right checkConfigurationClick" disabled="disabled">
<i class="process-icon-loading"></i>
{l s='Save'}
</button>
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right checkConfigurationClick" disabled="disabled">
<i class="process-icon-loading"></i>
{l s='Save and stay'}
</button>
</div>
</div>
<div class="panel-footer">
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}{if isset($smarty.request.page) && $smarty.request.page > 1}&amp;submitFilterproduct={$smarty.request.page|intval}{/if}" class="btn btn-default">
<i class="process-icon-cancel"></i>
{l s='Cancel'}
</a>
<button type="submit" name="submitAddproduct" class="btn btn-default pull-right checkConfigurationClick" disabled="disabled">
<i class="process-icon-loading"></i>
{l s='Save'}
</button>
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right checkConfigurationClick" disabled="disabled">
<i class="process-icon-loading"></i>
{l s='Save and stay'}
</button>
</div>
</div>
{/if}
{*Disable Dates Model*}
<div class="modal fade" id="deactiveDatesModal" tabindex="-1" role="dialog" aria-labelledby="deactiveDatesLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close margin-right-10" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title"><i class="icon-calendar"></i>&nbsp; {l s='Disable dates' mod='hotelreservationsystem'}</h4>
</div>
<div class="modal-body">
<div class="from-group table-responsive-row clearfix">
<table class="table room-disable-dates">
<thead>
<tr class="nodrag nodrop">
<th class="col-sm-1 center">
<span>{l s='Date From' mod='hotelreservationsystem'}</span>
</th>
<th class="col-sm-2 center">
<span>{l s='Date To' mod='hotelreservationsystem'}</span>
</th>
<th class="col-sm-2 center">
<span>{l s='Reason' mod='hotelreservationsystem'}</span>
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="form-group">
<div class="col-sm-12">
<a href="#" class="add_more_room_disable_dates btn btn-default"><i class="icon icon-plus"></i>{l s="Add More" mod='hotelreservationsystem'}</a>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default deactiveDatesModalSubmit">{l s='Done' mod='hotelreservationsystem'}</button>
</div>
</div>
</div>
</div>
{*END*}
<style>
.hotel-room
{
.deactiveDatesModal {
cursor: pointer;
}
.hotel-room {
border: 1px solid #f2f2f2;
margin-top: 10px;
}
</style>
<script>
var prod_link = "{$link->getAdminLink('AdminProducts')}";
var rm_status = {$rm_status|@json_encode};
var currentRoomRow = 0;
var datesMissing = "{$datesMissing}";
var datesOverlapping = "{$datesOverlapping}";
$(document).ready(function()
{
$('#add-more-rooms-button').on('click',function()
{
html = '<tr class="room_data_values">';
$(document).ready(function() {
// Disable dates data filling when model open
$('#deactiveDatesModal').on('show.bs.modal', function (e) {
$('.disabledDatesTr').remove();
var modelTriggerElement = $(e.relatedTarget);
var html = '';
var rowKey = modelTriggerElement.closest(".room_data_values").attr('data-rowKey');
currentRoomRow = rowKey;
var disableDatesJSON = modelTriggerElement.siblings('input.disableDatesJSON').val();
if (disableDatesJSON) {
var disableDatesObj = JSON.parse(disableDatesJSON);
$.each(disableDatesObj, function(disKey, disabledRange) {
html += '<tr class="disabledDatesTr">';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_from form-control" type="text" value="'+disabledRange.date_from+'" name="disabled_date_from'+rowKey+'[]">';
html += '</td>';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_to form-control" type="text" value="'+disabledRange.date_to+'" name="disabled_date_to'+rowKey+'[]">';
html += '<td class="center col-sm-6">';
html += '<input type="text" class="form-control room_disable_reason" value="'+disabledRange.reason+'" name="room_disable_reason'+rowKey+'[]">';
html += '</td>';
html += '<td class="center col-sm-1">';
html += '<a href="#" class="remove-disable-dates-button btn btn-default"><i class="icon-trash"></i></a>';
html += '</td>';
html += '</tr>';
});
} else {
html += '<tr class="disabledDatesTr">';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_from form-control" type="text" value="" name="disabled_date_from'+rowKey+'[]">';
html += '</td>';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_to form-control" type="text" value="" name="disabled_date_to'+rowKey+'[]">';
html += '<td class="center col-sm-6">';
html += '<input type="text" class="form-control room_disable_reason" value="" name="room_disable_reason'+rowKey+'[]">';
html += '</td>';
html += '<td class="center col-sm-1">';
html += '<a href="#" class="remove-disable-dates-button btn btn-default"><i class="icon-trash"></i></a>';
html += '</td>';
html += '</tr>';
}
$('.room-disable-dates').append(html);
});
// Disable dates data save when model open
$(document).on('click', '.deactiveDatesModalSubmit', function() {
var disableDates = new Array();
var error = false;
$.each($('.disabled_date_from'), function(key, val){
var date_from = $(this).val();
var date_to = $('.disabled_date_to:eq('+key+')').val();
if (date_from.trim() && date_to.trim()) {
var obj = {
'date_from': $(this).val(),
'date_to': $('.disabled_date_to:eq('+key+')').val(),
'reason': $('.room_disable_reason:eq('+key+')').val(),
};
disableDates.push(obj);
} else {
if (!(!date_from.trim() && !date_to.trim())) {
error = datesMissing;
}
}
$.each(disableDates, function(disKey, disabledRange) {
if (key != disKey) {
if (((date_from < disabledRange.date_from) && (date_to <= disabledRange.date_from)) || ((date_from > disabledRange.date_from) && (date_from >= disabledRange.date_to))) {
} else {
error = datesOverlapping;
}
}
});
});
if (error) {
alert(error);
return false;
} else {
$('#deactiveDatesModal').modal('hide');
$("#row_index"+currentRoomRow).find('.disableDatesJSON').val(JSON.stringify(disableDates));
return true;
}
});
// Add new room detail
$('#add-more-rooms-button').on('click',function() {
var lengthRooms = $('.room_data_values').length;
html = '<tr class="room_data_values" id="row_index'+lengthRooms+'" data-rowKey="'+lengthRooms+'">';
html += '<td class="col-sm-1 center">';
html += '<input class="form-control" type="text" name="room_num[]">';
html += '</td>';
@@ -168,15 +310,19 @@
html += '<input class="form-control" type="text" name="room_floor[]">';
html += '</td>';
html += '<td class="col-sm-2 center">';
html += '<select class="form-control" name="room_status[]">';
html += '<select class="form-control room_status" name="room_status[]">';
$.each(rm_status, function(key, value)
{
html += '<option value="'+value.id+'"">'+value.status+'</option>';
html += '<option value="'+value.id+'">'+value.status+'</option>';
});
html += '</select>';
html += '</td>';
html += '<td class="center col-sm-6">';
html += '<input type="text" class="form-control" name="room_comment[]">';
html += '<a class="btn btn-default deactiveDatesModal" data-toggle="modal" data-target="#deactiveDatesModal" style="display: none;">';
html += "{l s='Add Dates' mod='hotelreservationsystem'}";
html += '</a>';
html += '<input type="hidden" class="form-control disableDatesJSON" name="disableDatesJSON" value="0">';
html += '<input type="text" class="form-control room_comment" name="room_comment[]">';
html += '</td>';
html += '<td class="center col-sm-1">';
html += '<a href="#" class="remove-rooms-button btn btn-default"><i class="icon-trash"></i></a>';
@@ -186,13 +332,12 @@
$('.hotel-room').append(html);
});
$('.rm_htl_room').on('click',function(e)
{
// delete room
$('.rm_htl_room').on('click',function(e) {
e.preventDefault();
var id_htl_info = $(this).attr('data-id-htl-info');
$.ajax(
{
$.ajax({
url: prod_link,
type: 'POST',
dataType: 'text',
@@ -212,17 +357,68 @@
$(this).closest(".room_data_values").remove();
});
$(".checkConfigurationClick").on("click", function()
{
$(".checkConfigurationClick").on("click", function() {
$("#checkConfSubmit").val(1);
return true;
});
$(document).on('click','.remove-rooms-button',function(e)
{
// New Room Row Remove
$(document).on('click','.remove-rooms-button',function(e) {
e.preventDefault();
$(this).closest(".room_data_values").remove();
});
// on changing the room status as disabled for some date range.....
$(document).on("change", ".room_status", function(){
var status_val = $(this).val();
if (status_val == 3) {
$(this).closest('.room_data_values').find('.room_comment, .deactiveDatesModal').toggle();
} else {
$(this).closest('.room_data_values').find('.room_comment').show();
$(this).closest('.room_data_values').find('.deactiveDatesModal').hide();
}
});
$(document).on("focus", ".disabled_date_from, .disabled_date_to", function () {
$(".disabled_date_from").datepicker({
showOtherMonths: true,
dateFormat: 'yy-mm-dd',
minDate: 0,
//for calender Css
onSelect: function(selectedDate) {
$(this).closest('tr').find(".disabled_date_to").datepicker("option", "minDate", selectedDate).val('');
},
});
$(".disabled_date_to").datepicker({
showOtherMonths: true,
dateFormat: 'yy-mm-dd',
minDate: 0,
});
});
$('.add_more_room_disable_dates').on('click',function() {
var rowKey = $(this).closest(".room_data_values").attr('data-rowKey');
html = '<tr class="disabledDatesTr">';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_from form-control" type="text" value="" name="disabled_date_from'+rowKey+'[]">';
html += '</td>';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_to form-control" type="text" value="" name="disabled_date_to'+rowKey+'[]">';
html += '<td class="center col-sm-6">';
html += '<input type="text" class="form-control room_disable_reason" value="" name="room_disable_reason'+rowKey+'[]">';
html += '</td>';
html += '<td class="center col-sm-1">';
html += '<a href="#" class="remove-disable-dates-button btn btn-default"><i class="icon-trash"></i></a>';
html += '</td>';
html += '</tr>';
$('.room-disable-dates').append(html);
});
$(document).on('click','.remove-disable-dates-button',function(e) {
e.preventDefault();
$(this).closest('tr').remove();
});
});
</script>

View File

@@ -374,6 +374,81 @@ $(document).ready(function () {
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save and stay'}</button>
</div>
</div>
<div class="panel">
<h3>{l s='Feature Price Plans'}</h3>
<div class="alert alert-info">
{l s='You can set feature price plans by visiting '}
<a target="_blank" href="{$link->getAdminLink('AdminHotelFeaturePricesSettings')}">{l s='create feature price plans'}</a>
</div>
<div class="table-responsive">
<table class="table table-stripped">
<thead>
<tr>
<th>{l s='Plan Name'}</th>
<th>{l s='Impact way'}</th>
<th>{l s='Impact Type'}</th>
<th>{l s='Impact Value'}</th>
<th>{l s='Date From'}</th>
<th>{l s='Date To'}</th>
<th>{l s='Status'}</th>
</tr>
</thead>
<tbody>
{if isset($productFeaturePrices) && $productFeaturePrices}
{foreach $productFeaturePrices as $featurePlan}
<tr>
<td>
{$featurePlan['feature_price_name']}
</td>
<td>
{if $featurePlan['impact_way'] == 1}
{l s='Fixed Amount'}
{else}
{l s='Percentage'}
{/if}
</td>
<td>
{if $featurePlan['impact_type'] == 1}
{l s='Decrease'}
{else}
{l s='Increase'}
{/if}
</td>
<td>
{if $featurePlan['impact_way'] == 1}
{displayPrice price=$featurePlan['impact_value']}
{else}
{$featurePlan['impact_value']|round:2}%
{/if}
</td>
<td>
{$featurePlan['date_from']|date_format:"%d-%m-%Y"}
</td>
<td>
{$featurePlan['date_to']|date_format:"%d-%m-%Y"}
</td>
<td>
{if $featurePlan['active'] == 1}
{l s='Enabled'}
{else}
{l s='Disabled'}
{/if}
</td>
</tr>
{/foreach}
{else}
<tr>
<td class="text-center" colspan="6">
<i class="icon-warning-sign"></i> {l s='No feature price plans created yet.'}
</td>
</tr>
{/if}
</tbody>
</table>
</div>
</div>
{if isset($specificPriceModificationForm)}
<div class="panel">
<h3>{l s='Specific prices'}</h3>

4286
cache/class_index.php vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,72 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<localizationPack name="India" version="1.0">
<languages>
<language iso_code="en" />
</languages>
<currencies>
<currency name="Indian Rupee" iso_code="INR" iso_code_num="356" sign="₹" blank="1" conversion_rate="60.748205" format="1" decimals="1" />
</currencies>
<taxes>
<tax id="1" name="VAT IN 12.5%" rate="12.5" />
<tax id="2" name="VAT IN 4%" rate="4" />
<tax id="3" name="VAT IN 1%" rate="1" />
<taxRulesGroup name="IN Standard Rate (12.5%)">
<taxRule iso_code_country="in" id_tax="1" />
</taxRulesGroup>
<taxRulesGroup name="IN Reduced Rate (4%)">
<taxRule iso_code_country="in" id_tax="2" />
</taxRulesGroup>
<taxRulesGroup name="IN Super Reduced Rate (1%)">
<taxRule iso_code_country="in" id_tax="3" />
</taxRulesGroup>
</taxes>
<states>
<state name="Andhra Pradesh" iso_code="AP" country="IN" zone="Asia" tax_behavior="0" />
<state name="Arunāchal Pradesh" iso_code="AR" country="IN" zone="Asia" tax_behavior="0" />
<state name="Assam" iso_code="AS" country="IN" zone="Asia" tax_behavior="0" />
<state name="Bihār" iso_code="BR" country="IN" zone="Asia" tax_behavior="0" />
<state name="Chhattīsgarh" iso_code="CT" country="IN" zone="Asia" tax_behavior="0" />
<state name="Goa" iso_code="GA" country="IN" zone="Asia" tax_behavior="0" />
<state name="Gujarāt" iso_code="GJ" country="IN" zone="Asia" tax_behavior="0" />
<state name="Haryāna" iso_code="HR" country="IN" zone="Asia" tax_behavior="0" />
<state name="Himāchal Pradesh" iso_code="HP" country="IN" zone="Asia" tax_behavior="0" />
<state name="Jammu and Kashmīr" iso_code="JK" country="IN" zone="Asia" tax_behavior="0" />
<state name="Jharkhand" iso_code="JH" country="IN" zone="Asia" tax_behavior="0" />
<state name="Karnātaka" iso_code="KA" country="IN" zone="Asia" tax_behavior="0" />
<state name="Kerala" iso_code="KL" country="IN" zone="Asia" tax_behavior="0" />
<state name="Madhya Pradesh" iso_code="MP" country="IN" zone="Asia" tax_behavior="0" />
<state name="Mahārāshtra" iso_code="MH" country="IN" zone="Asia" tax_behavior="0" />
<state name="Manipur" iso_code="MN" country="IN" zone="Asia" tax_behavior="0" />
<state name="Meghālaya" iso_code="ML" country="IN" zone="Asia" tax_behavior="0" />
<state name="Mizoram" iso_code="MZ" country="IN" zone="Asia" tax_behavior="0" />
<state name="Nāgāland" iso_code="NL" country="IN" zone="Asia" tax_behavior="0" />
<state name="Orissa" iso_code="OR" country="IN" zone="Asia" tax_behavior="0" />
<state name="Punjab" iso_code="PB" country="IN" zone="Asia" tax_behavior="0" />
<state name="Rājasthān" iso_code="RJ" country="IN" zone="Asia" tax_behavior="0" />
<state name="Sikkim" iso_code="SK" country="IN" zone="Asia" tax_behavior="0" />
<state name="Tamil Nādu" iso_code="TN" country="IN" zone="Asia" tax_behavior="0" />
<state name="Tripura" iso_code="TR" country="IN" zone="Asia" tax_behavior="0" />
<state name="Uttaranchal" iso_code="UL" country="IN" zone="Asia" tax_behavior="0" />
<state name="Uttar Pradesh" iso_code="UP" country="IN" zone="Asia" tax_behavior="0" />
<state name="West Bengal" iso_code="WB" country="IN" zone="Asia" tax_behavior="0" />
<state name="Andaman and Nicobar Islands" iso_code="AN" country="IN" zone="Asia" tax_behavior="0" />
<state name="Chandīgarh" iso_code="CH" country="IN" zone="Asia" tax_behavior="0" />
<state name="Dādra and Nagar Haveli" iso_code="DN" country="IN" zone="Asia" tax_behavior="0" />
<state name="Damān and Diu" iso_code="DD" country="IN" zone="Asia" tax_behavior="0" />
<state name="Delhi" iso_code="DL" country="IN" zone="Asia" tax_behavior="0" />
<state name="Lakshadweep" iso_code="LD" country="IN" zone="Asia" tax_behavior="0" />
<state name="Pondicherry" iso_code="PY" country="IN" zone="Asia" tax_behavior="0" />
</states>
<units>
<unit type="weight" value="kg" />
<unit type="volume" value="L" />
<unit type="short_distance" value="cm" />
<unit type="base_distance" value="m" />
<unit type="long_distance" value="km" />
</units>
</localizationPack>

View File

@@ -1,51 +0,0 @@
<?php /*%%SmartyHeaderCode:8374061757f27d2475a004-35900280%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'c4c7ba9c6d76b84ba3de0bbef8162c93ab31c912' =>
array (
0 => '/home/rjain/www/html/d4/htld6/themes/hotel-reservation-theme/modules/blocksocial/blocksocial.tpl',
1 => 1475505970,
2 => 'file',
),
),
'nocache_hash' => '8374061757f27d2475a004-35900280',
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_57f28743b31644_98807989',
'has_nocache_code' => false,
'cache_lifetime' => 31536000,
),true); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_57f28743b31644_98807989')) {function content_57f28743b31644_98807989($_smarty_tpl) {?>
<div class="row">
<section class="col-xs-12 col-sm-12">
<div class="row margin-lr-0 footer-section-heading">
<p>Follow us on</p>
<hr/>
</div>
<div class="row margin-lr-0" id="social_block">
<ul>
<li class="facebook">
<a class="_blank" href="http://www.facebook.com/prestashop">
<span>Facebook</span>
</a>
</li>
<li class="twitter">
<a class="_blank" href="http://www.twitter.com/prestashop">
<span>Twitter</span>
</a>
</li>
<li class="rss">
<a class="_blank" href="http://www.prestashop.com/blog/en/">
<span>RSS</span>
</a>
</li>
<li class="google-plus">
<a class="_blank" href="https://www.google.com/+prestashop">
<span>Google Plus</span>
</a>
</li>
</ul>
<div class="clearfix"></div>
</div>
</section>
</div><?php }} ?>

View File

@@ -1,75 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:29
compiled from "/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/modal.tpl" */ ?>
<?php /*%%SmartyHeaderCode:13200469745800873dd59666-77123589%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'07b4ad4448c7f940a4d826b8b86ffa76ae9e5578' =>
array (
0 => '/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/modal.tpl',
1 => 1475505965,
2 => 'file',
),
),
'nocache_hash' => '13200469745800873dd59666-77123589',
'function' =>
array (
),
'variables' =>
array (
'modal_id' => 0,
'modal_class' => 0,
'modal_title' => 0,
'modal_content' => 0,
'modal_actions' => 0,
'action' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873dd900e9_13897059',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873dd900e9_13897059')) {function content_5800873dd900e9_13897059($_smarty_tpl) {?>
<div class="modal fade" id="<?php echo $_smarty_tpl->tpl_vars['modal_id']->value;?>
" tabindex="-1">
<div class="modal-dialog <?php if (isset($_smarty_tpl->tpl_vars['modal_class']->value)) {?><?php echo $_smarty_tpl->tpl_vars['modal_class']->value;?>
<?php }?>">
<div class="modal-content">
<?php if (isset($_smarty_tpl->tpl_vars['modal_title']->value)) {?>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title"><?php echo $_smarty_tpl->tpl_vars['modal_title']->value;?>
</h4>
</div>
<?php }?>
<?php echo $_smarty_tpl->tpl_vars['modal_content']->value;?>
<?php if (isset($_smarty_tpl->tpl_vars['modal_actions']->value)) {?>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo smartyTranslate(array('s'=>'Close'),$_smarty_tpl);?>
</button>
<?php $_smarty_tpl->tpl_vars['action'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['action']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['modal_actions']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['action']->key => $_smarty_tpl->tpl_vars['action']->value) {
$_smarty_tpl->tpl_vars['action']->_loop = true;
?>
<?php if ($_smarty_tpl->tpl_vars['action']->value['type']=='link') {?>
<a href="<?php echo $_smarty_tpl->tpl_vars['action']->value['href'];?>
" class="btn <?php echo $_smarty_tpl->tpl_vars['action']->value['class'];?>
"><?php echo $_smarty_tpl->tpl_vars['action']->value['label'];?>
</a>
<?php } elseif ($_smarty_tpl->tpl_vars['action']->value['type']=='button') {?>
<button type="button" value="<?php echo $_smarty_tpl->tpl_vars['action']->value['value'];?>
" class="btn <?php echo $_smarty_tpl->tpl_vars['action']->value['class'];?>
">
<?php echo $_smarty_tpl->tpl_vars['action']->value['label'];?>
</button>
<?php }?>
<?php } ?>
</div>
<?php }?>
</div>
</div>
</div><?php }} ?>

View File

@@ -1,174 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:29
compiled from "/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/page_header_toolbar.tpl" */ ?>
<?php /*%%SmartyHeaderCode:20668234335800873dda1600-18961591%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'18d105cd2a76b49b1074002ad97be1af4594b287' =>
array (
0 => '/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/page_header_toolbar.tpl',
1 => 1475505965,
2 => 'file',
),
),
'nocache_hash' => '20668234335800873dda1600-18961591',
'function' =>
array (
),
'variables' =>
array (
'title' => 0,
'page_header_toolbar_title' => 0,
'page_header_toolbar_btn' => 0,
'breadcrumbs2' => 0,
'toolbar_btn' => 0,
'k' => 0,
'table' => 0,
'btn' => 0,
'help_link' => 0,
'tab_modules_open' => 0,
'tab_modules_list' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873df30789_07652149',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873df30789_07652149')) {function content_5800873df30789_07652149($_smarty_tpl) {?>
<?php if (!isset($_smarty_tpl->tpl_vars['title']->value)&&isset($_smarty_tpl->tpl_vars['page_header_toolbar_title']->value)) {?>
<?php $_smarty_tpl->tpl_vars['title'] = new Smarty_variable($_smarty_tpl->tpl_vars['page_header_toolbar_title']->value, null, 0);?>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['page_header_toolbar_btn']->value)) {?>
<?php $_smarty_tpl->tpl_vars['toolbar_btn'] = new Smarty_variable($_smarty_tpl->tpl_vars['page_header_toolbar_btn']->value, null, 0);?>
<?php }?>
<div class="bootstrap">
<div class="page-head">
<h2 class="page-title">
<?php if (is_array($_smarty_tpl->tpl_vars['title']->value)) {?><?php echo htmlspecialchars(end($_smarty_tpl->tpl_vars['title']->value), ENT_QUOTES, 'UTF-8', true);?>
<?php } else { ?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['title']->value, ENT_QUOTES, 'UTF-8', true);?>
<?php }?>
</h2>
<ul class="breadcrumb page-breadcrumb">
<?php if ($_smarty_tpl->tpl_vars['breadcrumbs2']->value['container']['name']!='') {?>
<li class="breadcrumb-container">
<?php if ($_smarty_tpl->tpl_vars['breadcrumbs2']->value['container']['href']!='') {?><a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['breadcrumbs2']->value['container']['href'], ENT_QUOTES, 'UTF-8', true);?>
"><?php }?>
<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['breadcrumbs2']->value['container']['name'], ENT_QUOTES, 'UTF-8', true);?>
<?php if ($_smarty_tpl->tpl_vars['breadcrumbs2']->value['container']['href']!='') {?></a><?php }?>
</li>
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['breadcrumbs2']->value['tab']['name']!=''&&$_smarty_tpl->tpl_vars['breadcrumbs2']->value['container']['name']!=$_smarty_tpl->tpl_vars['breadcrumbs2']->value['tab']['name']) {?>
<li class="breadcrumb-current">
<?php if ($_smarty_tpl->tpl_vars['breadcrumbs2']->value['tab']['href']!='') {?><a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['breadcrumbs2']->value['tab']['href'], ENT_QUOTES, 'UTF-8', true);?>
"><?php }?>
<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['breadcrumbs2']->value['tab']['name'], ENT_QUOTES, 'UTF-8', true);?>
<?php if ($_smarty_tpl->tpl_vars['breadcrumbs2']->value['tab']['href']!='') {?></a><?php }?>
</li>
<?php }?>
</ul>
<div class="page-bar toolbarBox">
<div class="btn-toolbar">
<a href="#" class="toolbar_btn dropdown-toolbar navbar-toggle" data-toggle="collapse" data-target="#toolbar-nav"><i class="process-icon-dropdown"></i><div><?php echo smartyTranslate(array('s'=>'Menu'),$_smarty_tpl);?>
</div></a>
<ul id="toolbar-nav" class="nav nav-pills pull-right collapse navbar-collapse">
<?php $_smarty_tpl->tpl_vars['btn'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['btn']->_loop = false;
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['toolbar_btn']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['btn']->key => $_smarty_tpl->tpl_vars['btn']->value) {
$_smarty_tpl->tpl_vars['btn']->_loop = true;
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['btn']->key;
?>
<?php if ($_smarty_tpl->tpl_vars['k']->value!='back'&&$_smarty_tpl->tpl_vars['k']->value!='modules-list') {?>
<li>
<a id="page-header-desc-<?php echo $_smarty_tpl->tpl_vars['table']->value;?>
-<?php if (isset($_smarty_tpl->tpl_vars['btn']->value['imgclass'])) {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['btn']->value['imgclass'], ENT_QUOTES, 'UTF-8', true);?>
<?php } else { ?><?php echo $_smarty_tpl->tpl_vars['k']->value;?>
<?php }?>" class="toolbar_btn <?php if (isset($_smarty_tpl->tpl_vars['btn']->value['target'])&&$_smarty_tpl->tpl_vars['btn']->value['target']) {?> _blank<?php }?> pointer"<?php if (isset($_smarty_tpl->tpl_vars['btn']->value['href'])) {?> href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['btn']->value['href'], ENT_QUOTES, 'UTF-8', true);?>
"<?php }?> title="<?php if (isset($_smarty_tpl->tpl_vars['btn']->value['help'])) {?><?php echo $_smarty_tpl->tpl_vars['btn']->value['help'];?>
<?php } else { ?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['btn']->value['desc'], ENT_QUOTES, 'UTF-8', true);?>
<?php }?>"<?php if (isset($_smarty_tpl->tpl_vars['btn']->value['js'])&&$_smarty_tpl->tpl_vars['btn']->value['js']) {?> onclick="<?php echo $_smarty_tpl->tpl_vars['btn']->value['js'];?>
"<?php }?><?php if (isset($_smarty_tpl->tpl_vars['btn']->value['modal_target'])&&$_smarty_tpl->tpl_vars['btn']->value['modal_target']) {?> data-target="<?php echo $_smarty_tpl->tpl_vars['btn']->value['modal_target'];?>
" data-toggle="modal"<?php }?><?php if (isset($_smarty_tpl->tpl_vars['btn']->value['help'])) {?> data-toggle="tooltip" data-placement="bottom"<?php }?>>
<i class="<?php if (isset($_smarty_tpl->tpl_vars['btn']->value['icon'])) {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['btn']->value['icon'], ENT_QUOTES, 'UTF-8', true);?>
<?php } else { ?>process-icon-<?php if (isset($_smarty_tpl->tpl_vars['btn']->value['imgclass'])) {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['btn']->value['imgclass'], ENT_QUOTES, 'UTF-8', true);?>
<?php } else { ?><?php echo $_smarty_tpl->tpl_vars['k']->value;?>
<?php }?><?php }?><?php if (isset($_smarty_tpl->tpl_vars['btn']->value['class'])) {?> <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['btn']->value['class'], ENT_QUOTES, 'UTF-8', true);?>
<?php }?>"></i>
<div<?php if (isset($_smarty_tpl->tpl_vars['btn']->value['force_desc'])&&$_smarty_tpl->tpl_vars['btn']->value['force_desc']==true) {?> class="locked"<?php }?>><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['btn']->value['desc'], ENT_QUOTES, 'UTF-8', true);?>
</div>
</a>
</li>
<?php }?>
<?php } ?>
<?php if (isset($_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list'])) {?>
<li>
<a id="page-header-desc-<?php echo $_smarty_tpl->tpl_vars['table']->value;?>
-<?php if (isset($_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['imgclass'])) {?><?php echo $_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['imgclass'];?>
<?php } else { ?>modules-list<?php }?>" class="toolbar_btn<?php if (isset($_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['class'])) {?> <?php echo $_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['class'];?>
<?php }?><?php if (isset($_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['target'])&&$_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['target']) {?> _blank<?php }?>" <?php if (isset($_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['href'])) {?>href="<?php echo $_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['href'];?>
"<?php }?> title="<?php echo $_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['desc'];?>
"<?php if (isset($_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['js'])&&$_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['js']) {?> onclick="<?php echo $_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['js'];?>
"<?php }?>>
<i class="<?php if (isset($_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['icon'])) {?><?php echo $_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['icon'];?>
<?php } else { ?>process-icon-<?php if (isset($_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['imgclass'])) {?><?php echo $_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['imgclass'];?>
<?php } else { ?>modules-list<?php }?><?php }?>"></i>
<div<?php if (isset($_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['force_desc'])&&$_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['force_desc']==true) {?> class="locked"<?php }?>><?php echo $_smarty_tpl->tpl_vars['toolbar_btn']->value['modules-list']['desc'];?>
</div>
</a>
</li>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['help_link']->value)) {?>
<li>
<a class="toolbar_btn btn-help" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['help_link']->value, ENT_QUOTES, 'UTF-8', true);?>
" title="<?php echo smartyTranslate(array('s'=>'Help'),$_smarty_tpl);?>
">
<i class="process-icon-help"></i>
<div><?php echo smartyTranslate(array('s'=>'Help'),$_smarty_tpl);?>
</div>
</a>
</li>
<?php }?>
</ul>
<?php if ((isset($_smarty_tpl->tpl_vars['tab_modules_open']->value)&&$_smarty_tpl->tpl_vars['tab_modules_open']->value)||isset($_smarty_tpl->tpl_vars['tab_modules_list']->value)) {?>
<script type="text/javascript">
//<![CDATA[
var modules_list_loaded = false;
<?php if (isset($_smarty_tpl->tpl_vars['tab_modules_open']->value)&&$_smarty_tpl->tpl_vars['tab_modules_open']->value) {?>
$(function() {
$('#modules_list_container').modal('show');
openModulesList();
});
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['tab_modules_list']->value)) {?>
$('.process-icon-modules-list').parent('a').unbind().bind('click', function (){
$('#modules_list_container').modal('show');
openModulesList();
});
<?php }?>
//]]>
</script>
<?php }?>
</div>
</div>
</div>
</div>
<?php }} ?>

View File

@@ -1,114 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:30
compiled from "/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/controllers/modules/login_addons.tpl" */ ?>
<?php /*%%SmartyHeaderCode:13541794735800873ed3b267-22033537%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'679429e4ca3f277aac8c7e697dfc7419c2797527' =>
array (
0 => '/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/controllers/modules/login_addons.tpl',
1 => 1475505998,
2 => 'file',
),
),
'nocache_hash' => '13541794735800873ed3b267-22033537',
'function' =>
array (
),
'variables' =>
array (
'add_permission' => 0,
'logged_on_addons' => 0,
'check_url_fopen' => 0,
'check_openssl' => 0,
'addons_register_link' => 0,
'addons_forgot_password_link' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873ed9a454_34271787',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873ed9a454_34271787')) {function content_5800873ed9a454_34271787($_smarty_tpl) {?>
<div class="modal-body">
<?php if ($_smarty_tpl->tpl_vars['add_permission']->value=='1') {?>
<?php if (!isset($_smarty_tpl->tpl_vars['logged_on_addons']->value)||!$_smarty_tpl->tpl_vars['logged_on_addons']->value) {?>
<?php if ($_smarty_tpl->tpl_vars['check_url_fopen']->value=='ko'||$_smarty_tpl->tpl_vars['check_openssl']->value=='ko') {?>
<div class="alert alert-warning">
<?php echo smartyTranslate(array('s'=>'If you want to be able to fully use the AdminModules panel and have free modules available, you should enable the following configuration on your server:'),$_smarty_tpl);?>
<br />
<?php if ($_smarty_tpl->tpl_vars['check_url_fopen']->value=='ko') {?>- <?php echo smartyTranslate(array('s'=>'Enable PHP\'s allow_url_fopen setting'),$_smarty_tpl);?>
<br /><?php }?>
<?php if ($_smarty_tpl->tpl_vars['check_openssl']->value=='ko') {?>- <?php echo smartyTranslate(array('s'=>'Enable PHP\'s OpenSSL extension'),$_smarty_tpl);?>
<br /><?php }?>
</div>
<?php } else { ?>
<!--start addons login-->
<form id="addons_login_form" method="post" >
<div>
<a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['addons_register_link']->value, ENT_QUOTES, 'UTF-8', true);?>
"><img class="img-responsive center-block" src="themes/default/img/prestashop-addons-logo.png" alt="Logo PrestaShop Addons"/></a>
<h3 class="text-center"><?php echo smartyTranslate(array('s'=>"Connect your shop with PrestaShop's marketplace in order to automatically import all your Addons purchases."),$_smarty_tpl);?>
</h3>
<hr />
</div>
<div class="row">
<div class="col-md-6">
<h4><?php echo smartyTranslate(array('s'=>"Don't have an account?"),$_smarty_tpl);?>
</h4>
<p class='text-justify'><?php echo smartyTranslate(array('s'=>"Discover the Power of PrestaShop Addons! Explore the PrestaShop Official Marketplace and find over 3 500 innovative modules and themes that optimize conversion rates, increase traffic, build customer loyalty and maximize your productivity"),$_smarty_tpl);?>
</p>
</div>
<div class="col-md-6">
<h4><?php echo smartyTranslate(array('s'=>'Connect to PrestaShop Addons'),$_smarty_tpl);?>
</h4>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-user"></i></span>
<input id="username_addons" name="username_addons" type="text" value="" autocomplete="off" class="form-control ac_input">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-key"></i></span>
<input id="password_addons" name="password_addons" type="password" value="" autocomplete="off" class="form-control ac_input">
</div>
<a class="btn btn-link pull-right _blank" href="<?php echo $_smarty_tpl->tpl_vars['addons_forgot_password_link']->value;?>
"><?php echo smartyTranslate(array('s'=>'I forgot my password'),$_smarty_tpl);?>
</a>
<br>
</div>
</div>
</div>
<div class="row row-padding-top">
<div class="col-md-6">
<div class="form-group">
<a class="btn btn-default btn-block btn-lg _blank" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['addons_register_link']->value, ENT_QUOTES, 'UTF-8', true);?>
">
<?php echo smartyTranslate(array('s'=>"Create an Account"),$_smarty_tpl);?>
<i class="icon-external-link"></i>
</a>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<button id="addons_login_button" class="btn btn-primary btn-block btn-lg" type="submit">
<i class="icon-unlock"></i> <?php echo smartyTranslate(array('s'=>'Sign in'),$_smarty_tpl);?>
</button>
</div>
</div>
</div>
<div id="addons_loading" class="help-block"></div>
</form>
<!--end addons login-->
<?php }?>
<?php }?>
<?php }?>
</div>
<?php }} ?>

View File

@@ -1,136 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:30
compiled from "/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/footer.tpl" */ ?>
<?php /*%%SmartyHeaderCode:9055349715800873e3c3e49-50405100%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'69a1a12fe4be76abbbd47c16dab79bb45ea59aa5' =>
array (
0 => '/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/footer.tpl',
1 => 1475505965,
2 => 'file',
),
),
'nocache_hash' => '9055349715800873e3c3e49-50405100',
'function' =>
array (
),
'variables' =>
array (
'display_footer' => 0,
'timer_start' => 0,
'lang_iso' => 0,
'host_mode' => 0,
'iso_is_fr' => 0,
'php_errors' => 0,
'modals' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873e422bd3_50292079',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873e422bd3_50292079')) {function content_5800873e422bd3_50292079($_smarty_tpl) {?>
</div>
</div>
<?php if ($_smarty_tpl->tpl_vars['display_footer']->value) {?>
<div id="footer" class="bootstrap hide">
<div class="col-sm-2 hidden-xs">
<a href="http://www.prestashop.com/" class="_blank">PrestaShop&trade;</a>
-
<span id="footer-load-time"><i class="icon-time" title="<?php echo smartyTranslate(array('s'=>'Load time: '),$_smarty_tpl);?>
"></i> <?php echo number_format(microtime(true)-$_smarty_tpl->tpl_vars['timer_start']->value,3,'.','');?>
s</span>
</div>
<div class="col-sm-2 hidden-xs">
<div class="social-networks">
<a class="link-social link-twitter _blank" href="https://twitter.com/PrestaShop" title="Twitter">
<i class="icon-twitter"></i>
</a>
<a class="link-social link-facebook _blank" href="https://www.facebook.com/prestashop" title="Facebook">
<i class="icon-facebook"></i>
</a>
<a class="link-social link-github _blank" href="https://www.prestashop.com/github" title="Github">
<i class="icon-github"></i>
</a>
<a class="link-social link-google _blank" href="https://plus.google.com/+prestashop/" title="Google">
<i class="icon-google-plus"></i>
</a>
</div>
</div>
<div class="col-sm-5">
<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-<?php echo mb_strtoupper($_smarty_tpl->tpl_vars['lang_iso']->value, 'UTF-8');?>
&amp;utm_content=<?php if ($_smarty_tpl->tpl_vars['host_mode']->value) {?>cloud<?php } else { ?>download<?php }?>" class="footer_link _blank">
<i class="icon-envelope"></i>
<?php echo smartyTranslate(array('s'=>'Contact'),$_smarty_tpl);?>
</a>
/&nbsp;
<a href="http://forge.prestashop.com/?utm_source=back-office&amp;utm_medium=footer&amp;utm_campaign=back-office-<?php echo mb_strtoupper($_smarty_tpl->tpl_vars['lang_iso']->value, 'UTF-8');?>
&amp;utm_content=<?php if ($_smarty_tpl->tpl_vars['host_mode']->value) {?>cloud<?php } else { ?>download<?php }?>" class="footer_link _blank">
<i class="icon-bug"></i>
<?php echo smartyTranslate(array('s'=>'Bug Tracker'),$_smarty_tpl);?>
</a>
/&nbsp;
<a href="http://www.prestashop.com/forums/?utm_source=back-office&amp;utm_medium=footer&amp;utm_campaign=back-office-<?php echo mb_strtoupper($_smarty_tpl->tpl_vars['lang_iso']->value, 'UTF-8');?>
&amp;utm_content=<?php if ($_smarty_tpl->tpl_vars['host_mode']->value) {?>cloud<?php } else { ?>download<?php }?>" class="footer_link _blank">
<i class="icon-comments"></i>
<?php echo smartyTranslate(array('s'=>'Forum'),$_smarty_tpl);?>
</a>
/&nbsp;
<a href="http://addons.prestashop.com/?utm_source=back-office&amp;utm_medium=footer&amp;utm_campaign=back-office-<?php echo mb_strtoupper($_smarty_tpl->tpl_vars['lang_iso']->value, 'UTF-8');?>
&amp;utm_content=<?php if ($_smarty_tpl->tpl_vars['host_mode']->value) {?>cloud<?php } else { ?>download<?php }?>" class="footer_link _blank">
<i class="icon-puzzle-piece"></i>
<?php echo smartyTranslate(array('s'=>'Addons'),$_smarty_tpl);?>
</a>
/&nbsp;
<a href="http://www.prestashop.com/en/training-prestashop?utm_source=back-office&amp;utm_medium=footer&amp;utm_campaign=back-office-<?php echo mb_strtoupper($_smarty_tpl->tpl_vars['lang_iso']->value, 'UTF-8');?>
&amp;utm_content=<?php if ($_smarty_tpl->tpl_vars['host_mode']->value) {?>cloud<?php } else { ?>download<?php }?>" class="footer_link _blank">
<i class="icon-book"></i>
<?php echo smartyTranslate(array('s'=>'Training'),$_smarty_tpl);?>
</a>
<?php if ($_smarty_tpl->tpl_vars['host_mode']->value) {?>
/&nbsp;
<a href="http://status.prestashop.com/" class="footer_link _blank">
<i class="icon-circle status-page-dot"></i>
<span class="status-page-description"></span>
</a>
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['iso_is_fr']->value&&!$_smarty_tpl->tpl_vars['host_mode']->value) {?>
<p>Questions • Renseignements • Formations :
<strong>+33 (0)1.40.18.30.04</strong>
</p>
<?php }?>
</div>
</div>
<div class="col-sm-3">
<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0][0]->smartyHook(array('h'=>"displayBackOfficeFooter"),$_smarty_tpl);?>
</div>
<div id="go-top" class="hide"><i class="icon-arrow-up"></i></div>
</div>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['php_errors']->value)) {?>
<?php echo $_smarty_tpl->getSubTemplate ("error.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['modals']->value)) {?>
<div class="bootstrap">
<?php echo $_smarty_tpl->tpl_vars['modals']->value;?>
</div>
<?php }?>
</body>
</html>
<?php }} ?>

View File

@@ -1,90 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:30
compiled from "/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/nav.tpl" */ ?>
<?php /*%%SmartyHeaderCode:4320767995800873e2ed5d6-11448157%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'6f80e12d1b121d4d9a0120c455d51523c71c65c3' =>
array (
0 => '/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/nav.tpl',
1 => 1475505965,
2 => 'file',
),
),
'nocache_hash' => '4320767995800873e2ed5d6-11448157',
'function' =>
array (
),
'variables' =>
array (
'employee' => 0,
'tab' => 0,
'tabs' => 0,
't' => 0,
't2' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873e36f2b0_54023847',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873e36f2b0_54023847')) {function content_5800873e36f2b0_54023847($_smarty_tpl) {?><div class="bootstrap">
<nav id="<?php if ($_smarty_tpl->tpl_vars['employee']->value->bo_menu) {?>nav-sidebar<?php } else { ?>nav-topbar<?php }?>" role="navigation">
<?php if (!$_smarty_tpl->tpl_vars['tab']->value) {?>
<div class="mainsubtablist" style="display:none;"></div>
<?php }?>
<ul class="menu">
<li class="searchtab">
<?php echo $_smarty_tpl->getSubTemplate ("search_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id'=>"header_search",'show_clear_btn'=>1), 0);?>
</li>
<?php $_smarty_tpl->tpl_vars['t'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['t']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['tabs']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['t']->key => $_smarty_tpl->tpl_vars['t']->value) {
$_smarty_tpl->tpl_vars['t']->_loop = true;
?>
<?php if ($_smarty_tpl->tpl_vars['t']->value['active']) {?>
<li class="maintab <?php if ($_smarty_tpl->tpl_vars['t']->value['current']) {?>active<?php }?> <?php if (count($_smarty_tpl->tpl_vars['t']->value['sub_tabs'])) {?>has_submenu<?php }?>" id="maintab-<?php echo $_smarty_tpl->tpl_vars['t']->value['class_name'];?>
" data-submenu="<?php echo $_smarty_tpl->tpl_vars['t']->value['id_tab'];?>
">
<a href="<?php if (count($_smarty_tpl->tpl_vars['t']->value['sub_tabs'])&&isset($_smarty_tpl->tpl_vars['t']->value['sub_tabs'][0]['href'])) {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['t']->value['sub_tabs'][0]['href'], ENT_QUOTES, 'UTF-8', true);?>
<?php } else { ?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['t']->value['href'], ENT_QUOTES, 'UTF-8', true);?>
<?php }?>" class="title" >
<i class="icon-<?php echo $_smarty_tpl->tpl_vars['t']->value['class_name'];?>
"></i>
<span><?php if ($_smarty_tpl->tpl_vars['t']->value['name']=='') {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['t']->value['class_name'], ENT_QUOTES, 'UTF-8', true);?>
<?php } else { ?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['t']->value['name'], ENT_QUOTES, 'UTF-8', true);?>
<?php }?></span>
</a>
<?php if (count($_smarty_tpl->tpl_vars['t']->value['sub_tabs'])) {?>
<ul class="submenu">
<?php $_smarty_tpl->tpl_vars['t2'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['t2']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['t']->value['sub_tabs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['t2']->key => $_smarty_tpl->tpl_vars['t2']->value) {
$_smarty_tpl->tpl_vars['t2']->_loop = true;
?>
<?php if ($_smarty_tpl->tpl_vars['t2']->value['active']) {?>
<li id="subtab-<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['t2']->value['class_name'], ENT_QUOTES, 'UTF-8', true);?>
" <?php if ($_smarty_tpl->tpl_vars['t2']->value['current']) {?> class="active"<?php }?>>
<a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['t2']->value['href'], ENT_QUOTES, 'UTF-8', true);?>
">
<?php if ($_smarty_tpl->tpl_vars['t2']->value['name']=='') {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['t2']->value['class_name'], ENT_QUOTES, 'UTF-8', true);?>
<?php } else { ?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['t2']->value['name'], ENT_QUOTES, 'UTF-8', true);?>
<?php }?>
</a>
</li>
<?php }?>
<?php } ?>
</ul>
<?php }?>
</li>
<?php }?>
<?php } ?>
</ul>
<span class="menu-collapse">
<i class="icon-align-justify icon-rotate-90"></i>
</span>
<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0][0]->smartyHook(array('h'=>'displayAdminNavBarBeforeEnd'),$_smarty_tpl);?>
</nav>
</div>
<?php }} ?>

View File

@@ -1,131 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:30
compiled from "/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/layout.tpl" */ ?>
<?php /*%%SmartyHeaderCode:11238736135800873e4294a2-07764315%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'864d08e140a923f33ef5fa3112e3afe0d5cf1cff' =>
array (
0 => '/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/layout.tpl',
1 => 1475505965,
2 => 'file',
),
),
'nocache_hash' => '11238736135800873e4294a2-07764315',
'function' =>
array (
),
'variables' =>
array (
'header' => 0,
'conf' => 0,
'errors' => 0,
'disableDefaultErrorOutPut' => 0,
'error' => 0,
'informations' => 0,
'info' => 0,
'confirmations' => 0,
'warnings' => 0,
'warning' => 0,
'page' => 0,
'footer' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873e498339_79615111',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873e498339_79615111')) {function content_5800873e498339_79615111($_smarty_tpl) {?>
<?php echo $_smarty_tpl->tpl_vars['header']->value;?>
<?php if (isset($_smarty_tpl->tpl_vars['conf']->value)) {?>
<div class="bootstrap">
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<?php echo $_smarty_tpl->tpl_vars['conf']->value;?>
</div>
</div>
<?php }?>
<?php if (count($_smarty_tpl->tpl_vars['errors']->value)&&current($_smarty_tpl->tpl_vars['errors']->value)!=''&&(!isset($_smarty_tpl->tpl_vars['disableDefaultErrorOutPut']->value)||$_smarty_tpl->tpl_vars['disableDefaultErrorOutPut']->value==false)) {?>
<div class="bootstrap">
<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<?php if (count($_smarty_tpl->tpl_vars['errors']->value)==1) {?>
<?php echo reset($_smarty_tpl->tpl_vars['errors']->value);?>
<?php } else { ?>
<?php echo smartyTranslate(array('s'=>'%d errors','sprintf'=>count($_smarty_tpl->tpl_vars['errors']->value)),$_smarty_tpl);?>
<br/>
<ol>
<?php $_smarty_tpl->tpl_vars['error'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['error']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['errors']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['error']->key => $_smarty_tpl->tpl_vars['error']->value) {
$_smarty_tpl->tpl_vars['error']->_loop = true;
?>
<li><?php echo $_smarty_tpl->tpl_vars['error']->value;?>
</li>
<?php } ?>
</ol>
<?php }?>
</div>
</div>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['informations']->value)&&count($_smarty_tpl->tpl_vars['informations']->value)&&$_smarty_tpl->tpl_vars['informations']->value) {?>
<div class="bootstrap">
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<ul id="infos_block" class="list-unstyled">
<?php $_smarty_tpl->tpl_vars['info'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['info']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['informations']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['info']->key => $_smarty_tpl->tpl_vars['info']->value) {
$_smarty_tpl->tpl_vars['info']->_loop = true;
?>
<li><?php echo $_smarty_tpl->tpl_vars['info']->value;?>
</li>
<?php } ?>
</ul>
</div>
</div>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['confirmations']->value)&&count($_smarty_tpl->tpl_vars['confirmations']->value)&&$_smarty_tpl->tpl_vars['confirmations']->value) {?>
<div class="bootstrap">
<div class="alert alert-success" style="display:block;">
<?php $_smarty_tpl->tpl_vars['conf'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['conf']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['confirmations']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['conf']->key => $_smarty_tpl->tpl_vars['conf']->value) {
$_smarty_tpl->tpl_vars['conf']->_loop = true;
?>
<?php echo $_smarty_tpl->tpl_vars['conf']->value;?>
<?php } ?>
</div>
</div>
<?php }?>
<?php if (count($_smarty_tpl->tpl_vars['warnings']->value)) {?>
<div class="bootstrap">
<div class="alert alert-warning">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<?php if (count($_smarty_tpl->tpl_vars['warnings']->value)>1) {?>
<h4><?php echo smartyTranslate(array('s'=>'There are %d warnings:','sprintf'=>count($_smarty_tpl->tpl_vars['warnings']->value)),$_smarty_tpl);?>
</h4>
<?php }?>
<ul class="list-unstyled">
<?php $_smarty_tpl->tpl_vars['warning'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['warning']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['warnings']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['warning']->key => $_smarty_tpl->tpl_vars['warning']->value) {
$_smarty_tpl->tpl_vars['warning']->_loop = true;
?>
<li><?php echo $_smarty_tpl->tpl_vars['warning']->value;?>
</li>
<?php } ?>
</ul>
</div>
</div>
<?php }?>
<?php echo $_smarty_tpl->tpl_vars['page']->value;?>
<?php echo $_smarty_tpl->tpl_vars['footer']->value;?>
<?php }} ?>

View File

@@ -1,124 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:30
compiled from "/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/search_form.tpl" */ ?>
<?php /*%%SmartyHeaderCode:16724359785800873e3780d4-64550985%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'9a6d13eabb69df1ee1d8359b987dda7792666a73' =>
array (
0 => '/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/search_form.tpl',
1 => 1475505965,
2 => 'file',
),
),
'nocache_hash' => '16724359785800873e3780d4-64550985',
'function' =>
array (
),
'variables' =>
array (
'id' => 0,
'show_clear_btn' => 0,
'bo_query' => 0,
'search_type' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873e3bc186_52502760',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873e3bc186_52502760')) {function content_5800873e3bc186_52502760($_smarty_tpl) {?>
<form id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?>
" class="bo_search_form" method="post" action="index.php?controller=AdminSearch&amp;token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminSearch'),$_smarty_tpl);?>
" role="search">
<div class="form-group">
<input type="hidden" name="bo_search_type" id="bo_search_type" />
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i id="search_type_icon" class="icon-search"></i>
<i class="icon-caret-down"></i>
</button>
<ul id="header_search_options" class="dropdown-menu">
<li class="search-all search-option active">
<a href="#" data-value="0" data-placeholder="<?php echo smartyTranslate(array('s'=>'What are you looking for?'),$_smarty_tpl);?>
" data-icon="icon-search">
<i class="icon-search"></i> <?php echo smartyTranslate(array('s'=>'Everywhere'),$_smarty_tpl);?>
</a>
</li>
<li class="divider"></li>
<li class="search-book search-option">
<a href="#" data-value="1" data-placeholder="<?php echo smartyTranslate(array('s'=>'Product name, SKU, reference...'),$_smarty_tpl);?>
" data-icon="icon-book">
<i class="icon-book"></i> <?php echo smartyTranslate(array('s'=>'Catalog'),$_smarty_tpl);?>
</a>
</li>
<li class="search-customers-name search-option">
<a href="#" data-value="2" data-placeholder="<?php echo smartyTranslate(array('s'=>'Email, name...'),$_smarty_tpl);?>
" data-icon="icon-group">
<i class="icon-group"></i> <?php echo smartyTranslate(array('s'=>'Customers'),$_smarty_tpl);?>
<?php echo smartyTranslate(array('s'=>'by name'),$_smarty_tpl);?>
</a>
</li>
<li class="search-customers-addresses search-option">
<a href="#" data-value="6" data-placeholder="<?php echo smartyTranslate(array('s'=>'123.45.67.89'),$_smarty_tpl);?>
" data-icon="icon-desktop">
<i class="icon-desktop"></i> <?php echo smartyTranslate(array('s'=>'Customers'),$_smarty_tpl);?>
<?php echo smartyTranslate(array('s'=>'by ip address'),$_smarty_tpl);?>
</a>
</li>
<li class="search-orders search-option">
<a href="#" data-value="3" data-placeholder="<?php echo smartyTranslate(array('s'=>'Order ID'),$_smarty_tpl);?>
" data-icon="icon-credit-card">
<i class="icon-credit-card"></i> <?php echo smartyTranslate(array('s'=>'Orders'),$_smarty_tpl);?>
</a>
</li>
<li class="search-invoices search-option">
<a href="#" data-value="4" data-placeholder="<?php echo smartyTranslate(array('s'=>'Invoice Number'),$_smarty_tpl);?>
" data-icon="icon-book">
<i class="icon-book"></i> <?php echo smartyTranslate(array('s'=>'Invoices'),$_smarty_tpl);?>
</a>
</li>
<li class="search-carts search-option">
<a href="#" data-value="5" data-placeholder="<?php echo smartyTranslate(array('s'=>'Cart ID'),$_smarty_tpl);?>
" data-icon="icon-shopping-cart">
<i class="icon-shopping-cart"></i> <?php echo smartyTranslate(array('s'=>'Carts'),$_smarty_tpl);?>
</a>
</li>
<li class="search-modules search-option">
<a href="#" data-value="7" data-placeholder="<?php echo smartyTranslate(array('s'=>'Module name'),$_smarty_tpl);?>
" data-icon="icon-puzzle-piece">
<i class="icon-puzzle-piece"></i> <?php echo smartyTranslate(array('s'=>'Modules'),$_smarty_tpl);?>
</a>
</li>
</ul>
</div>
<?php if (isset($_smarty_tpl->tpl_vars['show_clear_btn']->value)&&$_smarty_tpl->tpl_vars['show_clear_btn']->value) {?>
<a href="#" class="clear_search hide"><i class="icon-remove"></i></a>
<?php }?>
<input id="bo_query" name="bo_query" type="text" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['bo_query']->value;?>
" placeholder="<?php echo smartyTranslate(array('s'=>'Search'),$_smarty_tpl);?>
" />
<!-- <span class="input-group-btn">
<button type="submit" id="bo_search_submit" class="btn btn-primary">
<i class="icon-search"></i>
</button>
</span> -->
</div>
</div>
<script>
<?php if (isset($_smarty_tpl->tpl_vars['search_type']->value)&&$_smarty_tpl->tpl_vars['search_type']->value) {?>
$(document).ready(function() {
$('.search-option a[data-value='+<?php echo intval($_smarty_tpl->tpl_vars['search_type']->value);?>
+']').click();
});
<?php }?>
</script>
</form><?php }} ?>

View File

@@ -1,550 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:29
compiled from "/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/header.tpl" */ ?>
<?php /*%%SmartyHeaderCode:14608651255800873df3afa2-57213920%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'c0dfca9f8787d0fe2b9e291374fcc42bd00f6692' =>
array (
0 => '/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/header.tpl',
1 => 1475505965,
2 => 'file',
),
),
'nocache_hash' => '14608651255800873df3afa2-57213920',
'function' =>
array (
),
'variables' =>
array (
'iso' => 0,
'img_dir' => 0,
'meta_title' => 0,
'shop_name' => 0,
'display_header_javascript' => 0,
'controller_name' => 0,
'iso_user' => 0,
'full_language_code' => 0,
'country_iso_code' => 0,
'round_mode' => 0,
'shop_context' => 0,
'autorefresh_notifications' => 0,
'token' => 0,
'currentIndex' => 0,
'default_language' => 0,
'link' => 0,
'tab_modules_list' => 0,
'css_files' => 0,
'css_uri' => 0,
'js_def' => 0,
'js_files' => 0,
'displayBackOfficeHeader' => 0,
'brightness' => 0,
'display_header' => 0,
'employee' => 0,
'collapse_menu' => 0,
'default_tab_link' => 0,
'version' => 0,
'is_multishop' => 0,
'shop_list' => 0,
'multishop_context' => 0,
'show_new_orders' => 0,
'show_new_customers' => 0,
'show_new_messages' => 0,
'quick_access' => 0,
'quick' => 0,
'matchQuickLink' => 0,
'quick_access_current_link_name' => 0,
'quick_access_current_link_icon' => 0,
'logged_on_addons' => 0,
'display_addons_connection' => 0,
'base_url' => 0,
'base_url_tc' => 0,
'maintenance_mode' => 0,
'host_mode' => 0,
'login_link' => 0,
'displayBackOfficeTop' => 0,
'bootstrap' => 0,
'page_header_toolbar' => 0,
'modal_module_list' => 0,
'install_dir_exists' => 0,
'lite_display' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873e2588d6_68944238',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873e2588d6_68944238')) {function content_5800873e2588d6_68944238($_smarty_tpl) {?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 lt-ie6 " lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8 ie7" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9 ie8" lang="en"> <![endif]-->
<!--[if gt IE 8]> <html lang="fr" class="no-js ie9" lang="en"> <![endif]-->
<html lang="<?php echo $_smarty_tpl->tpl_vars['iso']->value;?>
">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.75, maximum-scale=0.75, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="icon" type="image/x-icon" href="<?php echo $_smarty_tpl->tpl_vars['img_dir']->value;?>
favicon.ico" />
<link rel="apple-touch-icon" href="<?php echo $_smarty_tpl->tpl_vars['img_dir']->value;?>
app_icon.png" />
<meta name="robots" content="NOFOLLOW, NOINDEX">
<title><?php if ($_smarty_tpl->tpl_vars['meta_title']->value!='') {?><?php echo $_smarty_tpl->tpl_vars['meta_title']->value;?>
• <?php }?><?php echo $_smarty_tpl->tpl_vars['shop_name']->value;?>
</title>
<?php if (!isset($_smarty_tpl->tpl_vars['display_header_javascript']->value)||$_smarty_tpl->tpl_vars['display_header_javascript']->value) {?>
<script type="text/javascript">
var help_class_name = '<?php echo addcslashes($_smarty_tpl->tpl_vars['controller_name']->value,'\'');?>
';
var iso_user = '<?php echo addcslashes($_smarty_tpl->tpl_vars['iso_user']->value,'\'');?>
';
var full_language_code = '<?php echo addcslashes($_smarty_tpl->tpl_vars['full_language_code']->value,'\'');?>
';
var country_iso_code = '<?php echo addcslashes($_smarty_tpl->tpl_vars['country_iso_code']->value,'\'');?>
';
var _PS_VERSION_ = '<?php echo addcslashes(@constant('_PS_VERSION_'),'\'');?>
';
var roundMode = <?php echo intval($_smarty_tpl->tpl_vars['round_mode']->value);?>
;
<?php if (isset($_smarty_tpl->tpl_vars['shop_context']->value)) {?>
<?php if ($_smarty_tpl->tpl_vars['shop_context']->value==Shop::CONTEXT_ALL) {?>
var youEditFieldFor = '<?php echo smartyTranslate(array('s'=>'This field will be modified for all your shops.','js'=>1),$_smarty_tpl);?>
';
<?php } elseif ($_smarty_tpl->tpl_vars['shop_context']->value==Shop::CONTEXT_GROUP) {?>
var youEditFieldFor = '<?php echo smartyTranslate(array('s'=>'This field will be modified for all shops in this shop group:','js'=>1),$_smarty_tpl);?>
<b><?php echo addcslashes($_smarty_tpl->tpl_vars['shop_name']->value,'\'');?>
</b>';
<?php } else { ?>
var youEditFieldFor = '<?php echo smartyTranslate(array('s'=>'This field will be modified for this shop:','js'=>1),$_smarty_tpl);?>
<b><?php echo addcslashes($_smarty_tpl->tpl_vars['shop_name']->value,'\'');?>
</b>';
<?php }?>
<?php } else { ?>
var youEditFieldFor = '';
<?php }?>
var autorefresh_notifications = '<?php echo addcslashes($_smarty_tpl->tpl_vars['autorefresh_notifications']->value,'\'');?>
';
var new_order_msg = '<?php echo smartyTranslate(array('s'=>'A new order has been placed on your shop.','js'=>1),$_smarty_tpl);?>
';
var order_number_msg = '<?php echo smartyTranslate(array('s'=>'Order number:','js'=>1),$_smarty_tpl);?>
';
var total_msg = '<?php echo smartyTranslate(array('s'=>'Total:','js'=>1),$_smarty_tpl);?>
';
var from_msg = '<?php echo smartyTranslate(array('s'=>'From:','js'=>1),$_smarty_tpl);?>
';
var see_order_msg = '<?php echo smartyTranslate(array('s'=>'View this order','js'=>1),$_smarty_tpl);?>
';
var new_customer_msg = '<?php echo smartyTranslate(array('s'=>'A new customer registered on your shop.','js'=>1),$_smarty_tpl);?>
';
var customer_name_msg = '<?php echo smartyTranslate(array('s'=>'Customer name:','js'=>1),$_smarty_tpl);?>
';
var new_msg = '<?php echo smartyTranslate(array('s'=>'A new message was posted on your shop.','js'=>1),$_smarty_tpl);?>
';
var see_msg = '<?php echo smartyTranslate(array('s'=>'Read this message','js'=>1),$_smarty_tpl);?>
';
var token = '<?php echo addslashes($_smarty_tpl->tpl_vars['token']->value);?>
';
var token_admin_orders = '<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminOrders'),$_smarty_tpl);?>
';
var token_admin_customers = '<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminCustomers'),$_smarty_tpl);?>
';
var token_admin_customer_threads = '<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminCustomerThreads'),$_smarty_tpl);?>
';
var currentIndex = '<?php echo addcslashes($_smarty_tpl->tpl_vars['currentIndex']->value,'\'');?>
';
var employee_token = '<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminEmployees'),$_smarty_tpl);?>
';
var choose_language_translate = '<?php echo smartyTranslate(array('s'=>'Choose language','js'=>1),$_smarty_tpl);?>
';
var default_language = '<?php echo intval($_smarty_tpl->tpl_vars['default_language']->value);?>
';
var admin_modules_link = '<?php echo addslashes($_smarty_tpl->tpl_vars['link']->value->getAdminLink("AdminModules"));?>
';
var tab_modules_list = '<?php if (isset($_smarty_tpl->tpl_vars['tab_modules_list']->value)&&$_smarty_tpl->tpl_vars['tab_modules_list']->value) {?><?php echo addslashes($_smarty_tpl->tpl_vars['tab_modules_list']->value);?>
<?php }?>';
var update_success_msg = '<?php echo smartyTranslate(array('s'=>'Update successful','js'=>1),$_smarty_tpl);?>
';
var errorLogin = '<?php echo smartyTranslate(array('s'=>'PrestaShop was unable to log in to Addons. Please check your credentials and your Internet connection.','js'=>1),$_smarty_tpl);?>
';
var search_product_msg = '<?php echo smartyTranslate(array('s'=>'Search for a product','js'=>1),$_smarty_tpl);?>
';
</script>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['css_files']->value)) {?>
<?php $_smarty_tpl->tpl_vars['media'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['media']->_loop = false;
$_smarty_tpl->tpl_vars['css_uri'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['css_files']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['media']->key => $_smarty_tpl->tpl_vars['media']->value) {
$_smarty_tpl->tpl_vars['media']->_loop = true;
$_smarty_tpl->tpl_vars['css_uri']->value = $_smarty_tpl->tpl_vars['media']->key;
?>
<link href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['css_uri']->value, ENT_QUOTES, 'UTF-8', true);?>
" rel="stylesheet" type="text/css"/>
<?php } ?>
<?php }?>
<?php if ((isset($_smarty_tpl->tpl_vars['js_def']->value)&&count($_smarty_tpl->tpl_vars['js_def']->value)||isset($_smarty_tpl->tpl_vars['js_files']->value)&&count($_smarty_tpl->tpl_vars['js_files']->value))) {?>
<?php echo $_smarty_tpl->getSubTemplate ((@constant('_PS_ALL_THEMES_DIR_')).("javascript.tpl"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['displayBackOfficeHeader']->value)) {?>
<?php echo $_smarty_tpl->tpl_vars['displayBackOfficeHeader']->value;?>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['brightness']->value)) {?>
<!--
// @todo: multishop color
<style type="text/css">
div#header_infos, div#header_infos a#header_shopname, div#header_infos a#header_logout, div#header_infos a#header_foaccess {color:<?php echo $_smarty_tpl->tpl_vars['brightness']->value;?>
}
</style>
-->
<?php }?>
</head>
<?php if ($_smarty_tpl->tpl_vars['display_header']->value) {?>
<body class="ps_back-office<?php if ($_smarty_tpl->tpl_vars['employee']->value->bo_menu) {?> page-sidebar<?php if ($_smarty_tpl->tpl_vars['collapse_menu']->value) {?> page-sidebar-closed<?php }?><?php } else { ?> page-topbar<?php }?> <?php echo strtolower(htmlspecialchars($_GET['controller'], ENT_QUOTES, 'UTF-8', true));?>
">
<header id="header" class="bootstrap">
<nav id="header_infos" role="navigation">
<div class="navbar-header">
<button id="header_nav_toggle" type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-primary">
<i class="icon-reorder"></i>
</button>
<a id="header_shopversion" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['default_tab_link']->value, ENT_QUOTES, 'UTF-8', true);?>
">
<span id="shop_version"><?php echo $_smarty_tpl->tpl_vars['version']->value;?>
</span>
</a>
<?php if (isset($_smarty_tpl->tpl_vars['is_multishop']->value)&&$_smarty_tpl->tpl_vars['is_multishop']->value&&$_smarty_tpl->tpl_vars['shop_list']->value&&(isset($_smarty_tpl->tpl_vars['multishop_context']->value)&&$_smarty_tpl->tpl_vars['multishop_context']->value&Shop::CONTEXT_GROUP||$_smarty_tpl->tpl_vars['multishop_context']->value&Shop::CONTEXT_SHOP)) {?>
<ul id="header_shop">
<li class="dropdown">
<?php echo $_smarty_tpl->tpl_vars['shop_list']->value;?>
</li>
</ul>
<?php } else { ?>
<a id="header_shopname" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['default_tab_link']->value, ENT_QUOTES, 'UTF-8', true);?>
"><?php echo $_smarty_tpl->tpl_vars['shop_name']->value;?>
</a>
<?php }?>
<ul id="header_notifs_icon_wrapper">
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['show_new_orders']->value;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==1) {?>
<li id="orders_notif" class="dropdown" data-type="order">
<a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
<i class="icon-shopping-cart"></i>
<span id="orders_notif_number_wrapper" class="notifs_badge hide">
<span id="orders_notif_value">0</span>
</span>
</a>
<div class="dropdown-menu notifs_dropdown">
<section id="orders_notif_wrapper" class="notifs_panel">
<div class="notifs_panel_header">
<h3><?php echo smartyTranslate(array('s'=>'Latest Orders'),$_smarty_tpl);?>
</h3>
</div>
<div id="list_orders_notif" class="list_notif">
<span class="no_notifs">
<?php echo smartyTranslate(array('s'=>'No new orders have been placed on your shop.'),$_smarty_tpl);?>
</span>
</div>
<div class="notifs_panel_footer">
<a href="index.php?controller=AdminOrders&amp;token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminOrders'),$_smarty_tpl);?>
"><?php echo smartyTranslate(array('s'=>'Show all orders'),$_smarty_tpl);?>
</a>
</div>
</section>
</div>
</li>
<?php }?>
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['show_new_customers']->value;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==1) {?>
<li id="customers_notif" class="dropdown" data-type="customer">
<a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
<i class="icon-user"></i>
<span id="customers_notif_number_wrapper" class="notifs_badge hide">
<span id="customers_notif_value">0</span>
</span>
</a>
<div class="dropdown-menu notifs_dropdown">
<section id="customers_notif_wrapper" class="notifs_panel">
<div class="notifs_panel_header">
<h3><?php echo smartyTranslate(array('s'=>'Latest Registrations'),$_smarty_tpl);?>
</h3>
</div>
<div id="list_customers_notif" class="list_notif">
<span class="no_notifs">
<?php echo smartyTranslate(array('s'=>'No new customers have registered on your shop.'),$_smarty_tpl);?>
</span>
</div>
<div class="notifs_panel_footer">
<a href="index.php?controller=AdminCustomers&amp;token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminCustomers'),$_smarty_tpl);?>
"><?php echo smartyTranslate(array('s'=>'Show all customers'),$_smarty_tpl);?>
</a>
</div>
</section>
</div>
</li>
<?php }?>
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['show_new_messages']->value;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==1) {?>
<li id="customer_messages_notif" class="dropdown" data-type="customer_message">
<a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
<i class="icon-envelope"></i>
<span id="customer_messages_notif_number_wrapper" class="notifs_badge hide">
<span id="customer_messages_notif_value" >0</span>
</span>
</a>
<div class="dropdown-menu notifs_dropdown">
<section id="customer_messages_notif_wrapper" class="notifs_panel">
<div class="notifs_panel_header">
<h3><?php echo smartyTranslate(array('s'=>'Latest Messages'),$_smarty_tpl);?>
</h3>
</div>
<div id="list_customer_messages_notif" class="list_notif">
<span class="no_notifs">
<?php echo smartyTranslate(array('s'=>'No new messages have been posted on your shop.'),$_smarty_tpl);?>
</span>
</div>
<div class="notifs_panel_footer">
<a href="index.php?controller=AdminCustomerThreads&amp;token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminCustomerThreads'),$_smarty_tpl);?>
"><?php echo smartyTranslate(array('s'=>'Show all messages'),$_smarty_tpl);?>
</a>
</div>
</section>
</div>
</li>
<?php }?>
</ul>
<?php if (count($_smarty_tpl->tpl_vars['quick_access']->value)>=0) {?>
<ul id="header_quick">
<li class="dropdown">
<a href="javascript:void(0)" id="quick_select" class="dropdown-toggle" data-toggle="dropdown"><?php echo smartyTranslate(array('s'=>'Quick Access'),$_smarty_tpl);?>
<i class="icon-caret-down"></i></a>
<ul class="dropdown-menu">
<?php $_smarty_tpl->tpl_vars['quick'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['quick']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['quick_access']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['quick']->key => $_smarty_tpl->tpl_vars['quick']->value) {
$_smarty_tpl->tpl_vars['quick']->_loop = true;
?>
<li <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['quick']->value['link'];?>
<?php $_tmp4=ob_get_clean();?><?php if ($_smarty_tpl->tpl_vars['link']->value->matchQuickLink($_tmp4)) {?><?php $_smarty_tpl->tpl_vars["matchQuickLink"] = new Smarty_variable($_smarty_tpl->tpl_vars['quick']->value['id_quick_access'], null, 0);?>class="active"<?php }?>>
<a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['quick']->value['link'], ENT_QUOTES, 'UTF-8', true);?>
"<?php if ($_smarty_tpl->tpl_vars['quick']->value['new_window']) {?> class="_blank"<?php }?>>
<?php if (isset($_smarty_tpl->tpl_vars['quick']->value['icon'])) {?>
<i class="icon-<?php echo $_smarty_tpl->tpl_vars['quick']->value['icon'];?>
icon-fw"></i>
<?php } else { ?>
<i class="icon-chevron-right icon-fw"></i>
<?php }?>
<?php echo $_smarty_tpl->tpl_vars['quick']->value['name'];?>
</a>
</li>
<?php } ?>
<li class="divider"></li>
<?php if (isset($_smarty_tpl->tpl_vars['matchQuickLink']->value)) {?>
<li>
<a href="javascript:void(0);" class="ajax-quick-link" data-method="remove" data-quicklink-id="<?php echo $_smarty_tpl->tpl_vars['matchQuickLink']->value;?>
">
<i class="icon-minus-circle"></i>
<?php echo smartyTranslate(array('s'=>'Remove from QuickAccess'),$_smarty_tpl);?>
</a>
</li>
<?php }?>
<li <?php if (isset($_smarty_tpl->tpl_vars['matchQuickLink']->value)) {?>class="hide"<?php }?>>
<a href="javascript:void(0);" class="ajax-quick-link" data-method="add">
<i class="icon-plus-circle"></i>
<?php echo smartyTranslate(array('s'=>'Add current page to QuickAccess'),$_smarty_tpl);?>
</a>
</li>
</ul>
</li>
</ul>
<?php $_smarty_tpl->tpl_vars['quick_access_current_link_name'] = new Smarty_variable(explode(" - ",$_smarty_tpl->tpl_vars['quick_access_current_link_name']->value), null, 0);?>
<script>
$(function() {
$('.ajax-quick-link').on('click', function(e){
e.preventDefault();
var method = $(this).data('method');
if(method == 'add')
var name = prompt('<?php echo smartyTranslate(array('s'=>'Please name this shortcut:','js'=>1),$_smarty_tpl);?>
', '<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['truncate'][0][0]->smarty_modifier_truncate($_smarty_tpl->tpl_vars['quick_access_current_link_name']->value[0],32);?>
');
if(method == 'add' && name || method == 'remove')
{
$.ajax({
type: 'POST',
headers: { "cache-control": "no-cache" },
async: false,
url: "<?php echo $_smarty_tpl->tpl_vars['link']->value->getAdminLink('AdminQuickAccesses');?>
" + "&action=GetUrl" + "&rand=<?php echo rand(1,200);?>
" + "&ajax=1" + "&method=" + method + ( $(this).data('quicklink-id') ? "&id_quick_access=" + $(this).data('quicklink-id') : ""),
data: {
"url": "<?php echo $_smarty_tpl->tpl_vars['link']->value->getQuickLink($_SERVER['REQUEST_URI']);?>
",
"name": name,
"icon": "<?php echo $_smarty_tpl->tpl_vars['quick_access_current_link_icon']->value;?>
"
},
dataType: "json",
success: function(data) {
var quicklink_list ='';
$.each(data, function(index,value){
if (typeof data[index]['name'] !== 'undefined')
quicklink_list += '<li><a href="' + data[index]['link'] + '&token=' + data[index]['token'] + '"><i class="icon-chevron-right"></i> ' + data[index]['name'] + '</a></li>';
});
if (typeof data['has_errors'] !== 'undefined' && data['has_errors'])
$.each(data, function(index, value)
{
if (typeof data[index] == 'string')
$.growl.error({ title: "", message: data[index]});
});
else if (quicklink_list)
{
$("#header_quick ul.dropdown-menu").html(quicklink_list);
showSuccessMessage(update_success_msg);
}
}
});
}
});
});
</script>
<?php }?>
<ul id="header_employee_box">
<?php if ((!isset($_smarty_tpl->tpl_vars['logged_on_addons']->value)||!$_smarty_tpl->tpl_vars['logged_on_addons']->value)&&(isset($_smarty_tpl->tpl_vars['display_addons_connection']->value)&&$_smarty_tpl->tpl_vars['display_addons_connection']->value)) {?>
<li class="hidden-sm hidden-xs">
<a href="#" class="addons_connect toolbar_btn" data-toggle="modal" data-target="#modal_addons_connect" title="<?php echo smartyTranslate(array('s'=>'Connect to PrestaShop Marketplace account'),$_smarty_tpl);?>
">
<i class="icon-chain-broken"></i>
<span class="string-long"><?php echo smartyTranslate(array('s'=>'Connect to PrestaShop Marketplace account'),$_smarty_tpl);?>
</span>
<span class="string-short"><?php echo smartyTranslate(array('s'=>'PrestaShop Marketplace'),$_smarty_tpl);?>
</span>
</a>
</li>
<?php }?>
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5) {?>
<li>
<a href="<?php if (isset($_smarty_tpl->tpl_vars['base_url_tc']->value)) {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_url_tc']->value, ENT_QUOTES, 'UTF-8', true);?>
<?php } else { ?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_url']->value, ENT_QUOTES, 'UTF-8', true);?>
<?php }?>" id="header_foaccess" class="_blank" title="<?php echo smartyTranslate(array('s'=>'View my shop'),$_smarty_tpl);?>
">
<span class="string-long"><?php echo smartyTranslate(array('s'=>'My shop'),$_smarty_tpl);?>
</span>
<span class="string-short"><?php echo smartyTranslate(array('s'=>'Shop'),$_smarty_tpl);?>
</span>
</a>
<?php if (isset($_smarty_tpl->tpl_vars['maintenance_mode']->value)&&$_smarty_tpl->tpl_vars['maintenance_mode']->value==true) {?>
<span class="maintenance-mode">
&mdash;
<span class="label-tooltip" data-toggle="tooltip" data-placement="bottom" data-html="true"
title="<p class='text-left text-nowrap'><strong><?php echo smartyTranslate(array('s'=>'Your shop is in maintenance.'),$_smarty_tpl);?>
</strong></p><p class='text-left'><?php echo smartyTranslate(array('s'=>'Your visitors and customers cannot access your shop while in maintenance mode.%s To manage the maintenance settings, go to Preferences > Maintenance.','sprintf'=>'<br />'),$_smarty_tpl);?>
</p>"><?php echo smartyTranslate(array('s'=>'Maintenance mode'),$_smarty_tpl);?>
</span>
</span>
<?php }?>
</li>
<?php }?>
<li id="employee_infos" class="dropdown">
<a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getAdminLink('AdminEmployees'), ENT_QUOTES, 'UTF-8', true);?>
&amp;id_employee=<?php echo intval($_smarty_tpl->tpl_vars['employee']->value->id);?>
&amp;updateemployee" class="employee_name dropdown-toggle" data-toggle="dropdown">
<span class="employee_avatar_small">
<?php if (isset($_smarty_tpl->tpl_vars['employee']->value)) {?>
<img class="imgm img-thumbnail" alt="" src="<?php echo $_smarty_tpl->tpl_vars['employee']->value->getImage();?>
" width="32" height="32" />
<?php }?>
</span>
<span class="string-long"><?php echo $_smarty_tpl->tpl_vars['employee']->value->firstname;?>
&nbsp;<?php echo $_smarty_tpl->tpl_vars['employee']->value->lastname;?>
</span>
<span class="string-short"><?php echo smartyTranslate(array('s'=>'Me'),$_smarty_tpl);?>
</span>
<i class="caret"></i>
</a>
<ul id="employee_links" class="dropdown-menu">
<li>
<span class="employee_avatar">
<img class="imgm img-thumbnail" alt="" src="<?php echo $_smarty_tpl->tpl_vars['employee']->value->getImage();?>
" width="96" height="96" />
</span>
</li>
<li class="text-center text-nowrap"><?php echo $_smarty_tpl->tpl_vars['employee']->value->firstname;?>
<?php echo $_smarty_tpl->tpl_vars['employee']->value->lastname;?>
</li>
<li class="divider"></li>
<li><a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getAdminLink('AdminEmployees'), ENT_QUOTES, 'UTF-8', true);?>
&amp;id_employee=<?php echo intval($_smarty_tpl->tpl_vars['employee']->value->id);?>
&amp;updateemployee"><i class="icon-wrench"></i> <?php echo smartyTranslate(array('s'=>'My preferences'),$_smarty_tpl);?>
</a></li>
<?php if ($_smarty_tpl->tpl_vars['host_mode']->value) {?>
<li><a href="https://www.prestashop.com/cloud/" class="_blank"><i class="icon-wrench"></i> <?php echo smartyTranslate(array('s'=>'My PrestaShop account'),$_smarty_tpl);?>
</a></li>
<?php }?>
<li class="divider"></li>
<li><a id="header_logout" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['login_link']->value, ENT_QUOTES, 'UTF-8', true);?>
&amp;logout"><i class="icon-signout"></i> <?php echo smartyTranslate(array('s'=>'Sign out'),$_smarty_tpl);?>
</a></li>
</ul>
</li>
</ul>
<span id="ajax_running">
<i class="icon-refresh icon-spin icon-fw"></i>
</span>
<?php if (isset($_smarty_tpl->tpl_vars['displayBackOfficeTop']->value)) {?><?php echo $_smarty_tpl->tpl_vars['displayBackOfficeTop']->value;?>
<?php }?>
</div>
</nav>
</header>
<div id="main">
<?php echo $_smarty_tpl->getSubTemplate ('nav.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<div id="content" class="<?php if (!$_smarty_tpl->tpl_vars['bootstrap']->value) {?>nobootstrap<?php } else { ?>bootstrap<?php }?>">
<?php if (isset($_smarty_tpl->tpl_vars['page_header_toolbar']->value)) {?><?php echo $_smarty_tpl->tpl_vars['page_header_toolbar']->value;?>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['modal_module_list']->value)) {?><?php echo $_smarty_tpl->tpl_vars['modal_module_list']->value;?>
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['install_dir_exists']->value) {?>
<div class="alert alert-warning">
<?php echo smartyTranslate(array('s'=>'For security reasons, you must also delete the /install folder.'),$_smarty_tpl);?>
</div>
<?php }?>
<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0][0]->smartyHook(array('h'=>'displayAdminAfterHeader'),$_smarty_tpl);?>
<?php } else { ?>
<body<?php if (isset($_smarty_tpl->tpl_vars['lite_display']->value)&&$_smarty_tpl->tpl_vars['lite_display']->value) {?> class="ps_back-office display-modal"<?php }?>>
<div id="main">
<div id="content" class="<?php if (!$_smarty_tpl->tpl_vars['bootstrap']->value) {?>nobootstrap<?php } else { ?>bootstrap<?php }?>">
<?php }?>
<?php }} ?>

View File

@@ -1,37 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:29
compiled from "/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/helpers/modules_list/modal.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2995733205800873df35ec4-53956342%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'c9b0f6e10e5edd2753a4a13ffaee94ec9a2fa942' =>
array (
0 => '/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/helpers/modules_list/modal.tpl',
1 => 1475505998,
2 => 'file',
),
),
'nocache_hash' => '2995733205800873df35ec4-53956342',
'function' =>
array (
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873df38080_17435765',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873df38080_17435765')) {function content_5800873df38080_17435765($_smarty_tpl) {?><div class="modal fade" id="modules_list_container">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3 class="modal-title"><?php echo smartyTranslate(array('s'=>'Recommended Modules and Services'),$_smarty_tpl);?>
</h3>
</div>
<div class="modal-body">
<div id="modules_list_container_tab_modal" style="display:none;"></div>
<div id="modules_list_loader"><i class="icon-refresh icon-spin"></i></div>
</div>
</div>
</div>
</div>
<?php }} ?>

View File

@@ -1,39 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:29
compiled from "/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/content.tpl" */ ?>
<?php /*%%SmartyHeaderCode:18184055415800873dd946a3-99829689%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'dc7841eebd388b702ed9abe22a6858624e2a1014' =>
array (
0 => '/home/rjain/www/html/d4/htld6/adminhtl/themes/default/template/content.tpl',
1 => 1475505965,
2 => 'file',
),
),
'nocache_hash' => '18184055415800873dd946a3-99829689',
'function' =>
array (
),
'variables' =>
array (
'content' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873dd9ed48_96061936',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873dd9ed48_96061936')) {function content_5800873dd9ed48_96061936($_smarty_tpl) {?>
<div id="ajax_confirmation" class="alert alert-success hide"></div>
<div id="ajaxBox" style="display:none"></div>
<div class="row">
<div class="col-lg-12">
<?php if (isset($_smarty_tpl->tpl_vars['content']->value)) {?>
<?php echo $_smarty_tpl->tpl_vars['content']->value;?>
<?php }?>
</div>
</div><?php }} ?>

View File

@@ -1,175 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:30
compiled from "/home/rjain/www/html/d4/htld6/modules/gamification/views/templates/hook/notification_bt.tpl" */ ?>
<?php /*%%SmartyHeaderCode:14110513165800873ee12a74-32316980%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'eb366249782b69e5c9ea107af76e56a78e2fa316' =>
array (
0 => '/home/rjain/www/html/d4/htld6/modules/gamification/views/templates/hook/notification_bt.tpl',
1 => 1475509394,
2 => 'file',
),
),
'nocache_hash' => '14110513165800873ee12a74-32316980',
'function' =>
array (
),
'variables' =>
array (
'current_id_tab' => 0,
'current_level_percent' => 0,
'current_level' => 0,
'advice_hide_url' => 0,
'link' => 0,
'notification' => 0,
'badges_to_display' => 0,
'unlock_badges' => 0,
'badge' => 0,
'i' => 0,
'next_badges' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873eebfd41_52910389',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873eebfd41_52910389')) {function content_5800873eebfd41_52910389($_smarty_tpl) {?><script>
var current_id_tab = <?php echo intval($_smarty_tpl->tpl_vars['current_id_tab']->value);?>
;
var current_level_percent = <?php echo intval($_smarty_tpl->tpl_vars['current_level_percent']->value);?>
;
var current_level = <?php echo intval($_smarty_tpl->tpl_vars['current_level']->value);?>
;
var gamification_level = '<?php echo smartyTranslate(array('s'=>'Level','mod'=>'gamification','js'=>1),$_smarty_tpl);?>
';
var advice_hide_url = '<?php echo $_smarty_tpl->tpl_vars['advice_hide_url']->value;?>
';
var hide_advice = '<?php echo smartyTranslate(array('s'=>'Do you really want to hide this advice?','mod'=>'gamification','js'=>1),$_smarty_tpl);?>
';
$('#dropdown_gamification .notifs_panel_header, #dropdown_gamification .tab-content').click(function () {
return false;
});
$('#dropdown_gamification .panel-footer').click(function (elt) {
window.location.href = '<?php echo $_smarty_tpl->tpl_vars['link']->value->getAdminLink('AdminGamification');?>
';
});
$('#gamification_tab li').click(function () {
gamificationDisplayTab($(this).children('a'));
return false;
});
function gamificationDisplayTab(elt)
{
$('#gamification_tab li, .gamification-tab-pane').removeClass('active');
$(elt).parent('li').addClass('active');
$('#'+$(elt).data('target')).addClass('active');
}
</script>
<li id="gamification_notif" style="background:none" class="dropdown">
<a href="javascript:void(0);" class="dropdown-toggle gamification_notif" data-toggle="dropdown">
<i class="icon-trophy"></i>
<span id="gamification_notif_number_wrapper" class="notifs_badge">
<span id="gamification_notif_value"><?php echo intval($_smarty_tpl->tpl_vars['notification']->value);?>
</span>
</span>
</a>
<div class="dropdown-menu notifs_dropdown" id="dropdown_gamification">
<section id="gamification_notif_wrapper" class="notifs_panel" style="width:325px">
<header class="notifs_panel_header">
<h3><?php echo smartyTranslate(array('s'=>'Your Merchant Expertise','mod'=>'gamification'),$_smarty_tpl);?>
<span class="label label-default" style="float:right"><?php echo smartyTranslate(array('s'=>'Level','mod'=>'gamification'),$_smarty_tpl);?>
<?php echo intval($_smarty_tpl->tpl_vars['current_level']->value);?>
: <?php echo intval($_smarty_tpl->tpl_vars['current_level_percent']->value);?>
%</span>
</h3>
</header>
<div class="progress" style="margin: 10px">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="<?php echo intval($_smarty_tpl->tpl_vars['current_level_percent']->value);?>
" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo intval($_smarty_tpl->tpl_vars['current_level_percent']->value);?>
%;">
<span style="color:#FFF"><?php echo smartyTranslate(array('s'=>'Level','mod'=>'gamification'),$_smarty_tpl);?>
<?php echo intval($_smarty_tpl->tpl_vars['current_level']->value);?>
: <?php echo intval($_smarty_tpl->tpl_vars['current_level_percent']->value);?>
%</span>
</div>
</div>
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="gamification_tab" style="margin-left:10px">
<li class="active">
<a href="#home" data-toggle="tab" data-target="gamification_1" onclick="gamificationDisplayTab(this); return false;"><?php echo smartyTranslate(array('s'=>'Last badge :','mod'=>'gamification'),$_smarty_tpl);?>
</a>
</li>
<li>
<a href="#profile" data-toggle="tab" data-target="gamification_2" onclick="gamificationDisplayTab(this); return false;"><?php echo smartyTranslate(array('s'=>'Next badge :','mod'=>'gamification'),$_smarty_tpl);?>
</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane gamification-tab-pane active" id="gamification_1">
<ul id="gamification_badges_list" style="<?php if (count($_smarty_tpl->tpl_vars['badges_to_display']->value)<=2) {?> height:170px;<?php }?> padding-left:0">
<?php $_smarty_tpl->tpl_vars['badge'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['badge']->_loop = false;
$_smarty_tpl->tpl_vars["i"] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['unlock_badges']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['badge']->key => $_smarty_tpl->tpl_vars['badge']->value) {
$_smarty_tpl->tpl_vars['badge']->_loop = true;
$_smarty_tpl->tpl_vars["i"]->value = $_smarty_tpl->tpl_vars['badge']->key;
?>
<?php if ($_smarty_tpl->tpl_vars['badge']->value->id) {?>
<li class="<?php if ($_smarty_tpl->tpl_vars['badge']->value->validated) {?> unlocked <?php } else { ?> locked <?php }?>" style="float:left;">
<span class="<?php if ($_smarty_tpl->tpl_vars['badge']->value->validated) {?> unlocked_img <?php } else { ?> locked_img <?php }?>" <?php if ($_smarty_tpl->tpl_vars['badge']->value->validated) {?>style="left: 12px;"<?php }?>></span>
<div class="gamification_badges_title"><span><?php if ($_smarty_tpl->tpl_vars['badge']->value->validated) {?> <?php echo smartyTranslate(array('s'=>'Last badge :','mod'=>'gamification'),$_smarty_tpl);?>
<?php } else { ?> <?php echo smartyTranslate(array('s'=>'Next badge :','mod'=>'gamification'),$_smarty_tpl);?>
<?php }?></span></div>
<div class="gamification_badges_img" data-placement="<?php if ($_smarty_tpl->tpl_vars['i']->value<=1) {?>bottom<?php } else { ?>top<?php }?>" data-original-title="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['badge']->value->description, ENT_QUOTES, 'UTF-8', true);?>
"><img src="<?php echo $_smarty_tpl->tpl_vars['badge']->value->getBadgeImgUrl();?>
"></div>
<div class="gamification_badges_name"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['badge']->value->name, ENT_QUOTES, 'UTF-8', true);?>
</div>
</li>
<?php }?>
<?php } ?>
</ul>
</div>
<div class="tab-pane gamification-tab-pane" id="gamification_2">
<ul id="gamification_badges_list" style="<?php if (count($_smarty_tpl->tpl_vars['badges_to_display']->value)<=2) {?> height:170px;<?php }?> padding-left:0">
<?php $_smarty_tpl->tpl_vars['badge'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['badge']->_loop = false;
$_smarty_tpl->tpl_vars["i"] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['next_badges']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['badge']->key => $_smarty_tpl->tpl_vars['badge']->value) {
$_smarty_tpl->tpl_vars['badge']->_loop = true;
$_smarty_tpl->tpl_vars["i"]->value = $_smarty_tpl->tpl_vars['badge']->key;
?>
<?php if ($_smarty_tpl->tpl_vars['badge']->value->id&&!$_smarty_tpl->tpl_vars['badge']->value->awb) {?>
<li class="<?php if ($_smarty_tpl->tpl_vars['badge']->value->validated) {?> unlocked <?php } else { ?> locked <?php }?>" style="float:left;">
<span class="<?php if ($_smarty_tpl->tpl_vars['badge']->value->validated) {?> unlocked_img <?php } else { ?> locked_img <?php }?>" <?php if ($_smarty_tpl->tpl_vars['badge']->value->validated) {?>style="left: 12px;"<?php }?>></span>
<div class="gamification_badges_title"><span><?php if ($_smarty_tpl->tpl_vars['badge']->value->validated) {?> <?php echo smartyTranslate(array('s'=>'Last badge :','mod'=>'gamification'),$_smarty_tpl);?>
<?php } else { ?> <?php echo smartyTranslate(array('s'=>'Next badge :','mod'=>'gamification'),$_smarty_tpl);?>
<?php }?></span></div>
<div class="gamification_badges_img" data-placement="<?php if ($_smarty_tpl->tpl_vars['i']->value<=1) {?>bottom<?php } else { ?>top<?php }?>"data-toggle="tooltip" data-original-title="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['badge']->value->description, ENT_QUOTES, 'UTF-8', true);?>
"><img src="<?php echo $_smarty_tpl->tpl_vars['badge']->value->getBadgeImgUrl();?>
"></div>
<div class="gamification_badges_name"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['badge']->value->name, ENT_QUOTES, 'UTF-8', true);?>
</div>
</li>
<?php }?>
<?php } ?>
</ul>
</div>
</div>
<footer class="panel-footer">
<a href="<?php echo $_smarty_tpl->tpl_vars['link']->value->getAdminLink('AdminGamification');?>
"><?php echo smartyTranslate(array('s'=>'View my complete profile','mod'=>'gamification'),$_smarty_tpl);?>
</a>
</footer>
</section>
</div>
</li>
<?php }} ?>

View File

@@ -1,101 +0,0 @@
<?php /* Smarty version Smarty-3.1.19, created on 2016-10-14 12:50:30
compiled from "/home/rjain/www/html/d4/htld6/themes/javascript.tpl" */ ?>
<?php /*%%SmartyHeaderCode:3913045565800873e261804-31373410%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'ed043dadf49537335bd9273f5b052bbe404c2a7f' =>
array (
0 => '/home/rjain/www/html/d4/htld6/themes/javascript.tpl',
1 => 1475505927,
2 => 'file',
),
),
'nocache_hash' => '3913045565800873e261804-31373410',
'function' =>
array (
),
'variables' =>
array (
'js_def' => 0,
'k' => 0,
'def' => 0,
'js_files' => 0,
'js_uri' => 0,
'js_inline' => 0,
'inline' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_5800873e2e5a99_58260404',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5800873e2e5a99_58260404')) {function content_5800873e2e5a99_58260404($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_replace')) include '/home/rjain/www/html/d4/htld6/tools/smarty/plugins/modifier.replace.php';
?>
<?php if (isset($_smarty_tpl->tpl_vars['js_def']->value)&&is_array($_smarty_tpl->tpl_vars['js_def']->value)&&count($_smarty_tpl->tpl_vars['js_def']->value)) {?>
<script type="text/javascript">
<?php $_smarty_tpl->tpl_vars['def'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['def']->_loop = false;
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['js_def']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['def']->key => $_smarty_tpl->tpl_vars['def']->value) {
$_smarty_tpl->tpl_vars['def']->_loop = true;
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['def']->key;
?>
<?php if (!empty($_smarty_tpl->tpl_vars['k']->value)&&is_string($_smarty_tpl->tpl_vars['k']->value)) {?>
<?php if (is_bool($_smarty_tpl->tpl_vars['def']->value)) {?>
var <?php echo $_smarty_tpl->tpl_vars['k']->value;?>
= <?php echo var_export($_smarty_tpl->tpl_vars['def']->value,true);?>
;
<?php } elseif (is_int($_smarty_tpl->tpl_vars['def']->value)) {?>
var <?php echo $_smarty_tpl->tpl_vars['k']->value;?>
= <?php echo intval($_smarty_tpl->tpl_vars['def']->value);?>
;
<?php } elseif (is_float($_smarty_tpl->tpl_vars['def']->value)) {?>
var <?php echo $_smarty_tpl->tpl_vars['k']->value;?>
= <?php echo smarty_modifier_replace(floatval($_smarty_tpl->tpl_vars['def']->value),',','.');?>
;
<?php } elseif (is_string($_smarty_tpl->tpl_vars['def']->value)) {?>
var <?php echo $_smarty_tpl->tpl_vars['k']->value;?>
= '<?php echo strval($_smarty_tpl->tpl_vars['def']->value);?>
';
<?php } elseif (is_array($_smarty_tpl->tpl_vars['def']->value)||is_object($_smarty_tpl->tpl_vars['def']->value)) {?>
var <?php echo $_smarty_tpl->tpl_vars['k']->value;?>
= <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['json_encode'][0][0]->jsonEncode($_smarty_tpl->tpl_vars['def']->value);?>
;
<?php } elseif (is_null($_smarty_tpl->tpl_vars['def']->value)) {?>
var <?php echo $_smarty_tpl->tpl_vars['k']->value;?>
= null;
<?php } else { ?>
var <?php echo $_smarty_tpl->tpl_vars['k']->value;?>
= '<?php echo addcslashes($_smarty_tpl->tpl_vars['def']->value,'\'');?>
';
<?php }?>
<?php }?>
<?php } ?>
</script>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['js_files']->value)&&count($_smarty_tpl->tpl_vars['js_files']->value)) {?>
<?php $_smarty_tpl->tpl_vars['js_uri'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['js_uri']->_loop = false;
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['js_files']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['js_uri']->key => $_smarty_tpl->tpl_vars['js_uri']->value) {
$_smarty_tpl->tpl_vars['js_uri']->_loop = true;
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['js_uri']->key;
?>
<script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['js_uri']->value;?>
"></script>
<?php } ?>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['js_inline']->value)&&count($_smarty_tpl->tpl_vars['js_inline']->value)) {?>
<script type="text/javascript">
<?php $_smarty_tpl->tpl_vars['inline'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['inline']->_loop = false;
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['js_inline']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['inline']->key => $_smarty_tpl->tpl_vars['inline']->value) {
$_smarty_tpl->tpl_vars['inline']->_loop = true;
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['inline']->key;
?>
<?php echo $_smarty_tpl->tpl_vars['inline']->value;?>
<?php } ?>
</script>
<?php }?><?php }} ?>

View File

View File

@@ -678,25 +678,70 @@ class CartCore extends ObjectModel
$cart_shop_context
);
switch (Configuration::get('PS_ROUND_TYPE'))
{
case Order::ROUND_TOTAL:
$row['total'] = $row['price_with_reduction_without_tax'] * (int)$row['cart_quantity'];
$row['total_wt'] = $row['price_with_reduction'] * (int)$row['cart_quantity'];
break;
case Order::ROUND_LINE:
$row['total'] = Tools::ps_round($row['price_with_reduction_without_tax'] * (int)$row['cart_quantity'], _PS_PRICE_COMPUTE_PRECISION_);
$row['total_wt'] = Tools::ps_round($row['price_with_reduction'] * (int)$row['cart_quantity'], _PS_PRICE_COMPUTE_PRECISION_);
break;
case Order::ROUND_ITEM:
default:
$row['total'] = Tools::ps_round($row['price_with_reduction_without_tax'], _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity'];
$row['total_wt'] = Tools::ps_round($row['price_with_reduction'], _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity'];
break;
/*Before Changes by webkul*/
// switch (Configuration::get('PS_ROUND_TYPE'))
// {
// case Order::ROUND_TOTAL:
// $row['total'] = $row['price_with_reduction_without_tax'] * (int)$row['cart_quantity'];
// $row['total_wt'] = $row['price_with_reduction'] * (int)$row['cart_quantity'];
// break;
// case Order::ROUND_LINE:
// $row['total'] = Tools::ps_round($row['price_with_reduction_without_tax'] * (int)$row['cart_quantity'], _PS_PRICE_COMPUTE_PRECISION_);
// $row['total_wt'] = Tools::ps_round($row['price_with_reduction'] * (int)$row['cart_quantity'], _PS_PRICE_COMPUTE_PRECISION_);
// break;
// case Order::ROUND_ITEM:
// default:
// $row['total'] = Tools::ps_round($row['price_with_reduction_without_tax'], _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity'];
// $row['total_wt'] = Tools::ps_round($row['price_with_reduction'], _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity'];
// break;
// }
//$row['price_wt'] = $row['price_with_reduction'];
//
//
/*By Webkul */
if (Module::isInstalled('hotelreservationsystem') && Module::isEnabled('hotelreservationsystem')) {
require_once _PS_MODULE_DIR_.'hotelreservationsystem/define.php';
// by webkul to calculate rates of the product from hotelreservation syatem tables with feature prices....
$hotelCartBookingData = new HotelCartBookingData();
$roomTypesByIdProduct = $hotelCartBookingData->getCartInfoIdCartIdProduct($this->id, (int)$row['id_product']);
// by webkul to calculate rates of the product from hotelreservation syatem tables with feature prices....
$totalPriceByProductTaxIncl = 0;
$totalPriceByProductTaxExcl = 0;
$priceDisplay = Group::getPriceDisplayMethod(Group::getCurrent()->id);
foreach ($roomTypesByIdProduct as $key => $cartRoomInfo) {
$roomTotalPrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($cartRoomInfo['id_product'], $cartRoomInfo['date_from'], $cartRoomInfo['date_to']);
$totalPriceByProductTaxIncl += $roomTotalPrice['total_price_tax_incl'];
$totalPriceByProductTaxExcl += $roomTotalPrice['total_price_tax_excl'];
}
switch (Configuration::get('PS_ROUND_TYPE'))
{
case Order::ROUND_TOTAL:
$row['total'] = $totalPriceByProductTaxExcl;
$row['total_wt'] = $totalPriceByProductTaxIncl;
break;
case Order::ROUND_LINE:
$row['total'] = Tools::ps_round($totalPriceByProductTaxExcl, _PS_PRICE_COMPUTE_PRECISION_);
$row['total_wt'] = Tools::ps_round($totalPriceByProductTaxIncl, _PS_PRICE_COMPUTE_PRECISION_);
break;
case Order::ROUND_ITEM:
default:
$row['total'] = Tools::ps_round($totalPriceByProductTaxExcl, _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity'];
$row['total_wt'] = Tools::ps_round($totalPriceByProductTaxIncl, _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity'];
break;
}
}
/*END*/
$row['price_wt'] = $row['price_with_reduction'];
$row['description_short'] = Tools::nl2br($row['description_short']);
// check if a image associated with the attribute exists
@@ -1462,7 +1507,6 @@ class CartCore extends ObjectModel
$products_total = array();
$ecotax_total = 0;
foreach ($products as $product) // products refer to the cart details
{
if ($virtual_context->shop->id != $product['id_shop'])
@@ -1517,21 +1561,47 @@ class CartCore extends ObjectModel
if (!isset($products_total[$id_tax_rules_group.'_'.$id_address]))
$products_total[$id_tax_rules_group.'_'.$id_address] = 0;
// by webkul to calculate rates of the product from hotelreservation syatem tables with feature prices....
$hotelCartBookingData = new HotelCartBookingData();
$roomTypesByIdProduct = $hotelCartBookingData->getCartInfoIdCartIdProduct($this->id, $product['id_product']);
$totalPriceByProduct = 0;
$priceDisplay = Group::getPriceDisplayMethod(Group::getCurrent()->id);
foreach ($roomTypesByIdProduct as $key => $cartRoomInfo) {
$roomTotalPrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($cartRoomInfo['id_product'], $cartRoomInfo['date_from'], $cartRoomInfo['date_to']);
if ($with_taxes) {
$totalPriceByProduct += $roomTotalPrice['total_price_tax_incl'];
} else {
$totalPriceByProduct += $roomTotalPrice['total_price_tax_excl'];
}
}
switch ($ps_round_type)
{
case Order::ROUND_TOTAL:
$products_total[$id_tax_rules_group.'_'.$id_address] += $price * (int)$product['cart_quantity'];
// before
//$products_total[$id_tax_rules_group.'_'.$id_address] += $price * (int)$product['cart_quantity'];
//by webkul
$products_total[$id_tax_rules_group.'_'.$id_address] += $totalPriceByProduct;
break;
case Order::ROUND_LINE:
$product_price = $price * $product['cart_quantity'];
//Before
//$product_price = $price * $product['cart_quantity'];
//By webkul
$product_price = $totalPriceByProduct;
$products_total[$id_tax_rules_group] += Tools::ps_round($product_price, $compute_precision);
break;
case Order::ROUND_ITEM:
default:
$product_price = /*$with_taxes ? $tax_calculator->addTaxes($price) : */$price;
$products_total[$id_tax_rules_group] += Tools::ps_round($product_price, $compute_precision) * (int)$product['cart_quantity'];
//Before
//$product_price = /*$with_taxes ? $tax_calculator->addTaxes($price) : */$price;
//$products_total[$id_tax_rules_group] += Tools::ps_round($product_price, $compute_precision) * (int)$product['cart_quantity'];
// By Webkul
$product_price = $totalPriceByProduct;
$products_total[$id_tax_rules_group] += Tools::ps_round($product_price, $compute_precision);
break;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1038,6 +1038,7 @@ class ProductCore extends ObjectModel
}
SpecificPriceRule::applyAllRules(array((int)$this->id));
return true;
}

View File

@@ -147,6 +147,9 @@ class OrderCore extends ObjectModel
/** @var string Delivery creation date */
public $delivery_date;
/** @var string source */
public $source;
/** @var bool Order validity: current order status is logable (usually paid and not canceled) */
public $valid;
@@ -219,6 +222,7 @@ class OrderCore extends ObjectModel
'delivery_number' => array('type' => self::TYPE_INT),
'invoice_date' => array('type' => self::TYPE_DATE),
'delivery_date' => array('type' => self::TYPE_DATE),
'source' => array('type' => self::TYPE_STRING),
'valid' => array('type' => self::TYPE_BOOL),
'reference' => array('type' => self::TYPE_STRING),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),

File diff suppressed because it is too large Load Diff

View File

@@ -323,6 +323,16 @@ class WebserviceRequestCore
'product_customization_fields' => array('description' => 'Customization Field', 'class' => 'CustomizationField'),
'customizations' => array('description' => 'Customization values', 'class' => 'Customization'),
);
// Code from Prestashop 1.7.0.2
$extra_resources = Hook::exec('addWebserviceResources', array('resources' => $resources), null, true, false);
if (is_array($extra_resources) && count($extra_resources)) {
foreach ($extra_resources as $new_resources) {
if (is_array($new_resources) && count($new_resources)) {
$resources = array_merge($resources, $new_resources);
}
}
}
ksort($resources);
return $resources;
}
@@ -585,7 +595,8 @@ class WebserviceRequestCore
if (isset($this->objOutput)) {
$this->objOutput->setStatus($status);
}
$this->errors[] = $display_errors ? array($code, $label) : 'Internal error. To see this error please display the PHP errors.';
//$this->errors[] = $display_errors ? array($code, $label) : 'Internal error. To see this error please display the PHP errors.';
$this->errors[] = $display_errors ? array($code, $label) : 'Internal error. To see this error please display the PHP errors.'.$code.' '.$label;
}
/**

View File

@@ -265,6 +265,7 @@ class AdminDashboardControllerCore extends AdminController
'date_to' => $this->context->employee->stats_date_to,
'hookDashboardZoneOne' => Hook::exec('dashboardZoneOne', $params),
'hookDashboardZoneTwo' => Hook::exec('dashboardZoneTwo', $params),
'hookDashboardZoneThree' => Hook::exec('dashboardZoneThree', $params),
//'translations' => $translations,
'action' => '#',
'warning' => $this->getWarningDomainName(),

View File

@@ -55,26 +55,25 @@ class AdminOrdersControllerCore extends AdminController
$this->allow_export = true;
$this->deleted = false;
$this->context = Context::getContext();
$this->_select = '
(cap.total_order_amount - cap.total_paid_amount) AS `amount_due`,
a.id_currency,
a.id_order AS id_pdf,
CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,
osl.`name` AS `osname`,
os.`color`,
IF((SELECT so.id_order FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer AND so.id_order < a.id_order LIMIT 1) > 0, 0, 1) as new,
country_lang.name as cname,
IF(a.valid, 1, 0) badge_success';
(cap.total_order_amount - cap.total_paid_amount) AS `amount_due`, a.source AS order_source,
a.id_currency,
a.id_order AS id_pdf,
CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,
osl.`name` AS `osname`,
os.`color`,
IF((SELECT so.id_order FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer AND so.id_order < a.id_order LIMIT 1) > 0, 0, 1) as new,
country_lang.name as cname,
IF(a.valid, 1, 0) badge_success';
$this->_join = '
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`)
INNER JOIN `'._DB_PREFIX_.'address` address ON address.id_address = a.id_address_delivery
INNER JOIN `'._DB_PREFIX_.'country` country ON address.id_country = country.id_country
INNER JOIN `'._DB_PREFIX_.'country_lang` country_lang ON (country.`id_country` = country_lang.`id_country` AND country_lang.`id_lang` = '.(int) $this->context->language->id.')
LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = a.`current_state`)
LEFT JOIN `'._DB_PREFIX_.'htl_customer_adv_payment` cap ON (cap.`id_order` = a.`id_order`)
LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int) $this->context->language->id.')';
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`)
INNER JOIN `'._DB_PREFIX_.'address` address ON address.id_address = a.id_address_delivery
INNER JOIN `'._DB_PREFIX_.'country` country ON address.id_country = country.id_country
INNER JOIN `'._DB_PREFIX_.'country_lang` country_lang ON (country.`id_country` = country_lang.`id_country` AND country_lang.`id_lang` = '.(int) $this->context->language->id.')
LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = a.`current_state`)
LEFT JOIN `'._DB_PREFIX_.'htl_customer_adv_payment` cap ON (cap.`id_order` = a.`id_order`)
LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int) $this->context->language->id.')';
$this->_orderBy = 'id_order';
$this->_orderWay = 'DESC';
$this->_use_found_rows = false;
@@ -105,6 +104,10 @@ class AdminOrdersControllerCore extends AdminController
'title' => $this->l('Customer'),
'havingFilter' => true,
),
'order_source' => array(
'title' => $this->l('Order Source'),
'havingFilter' => true,
),
);
if (Configuration::get('PS_B2B_ENABLE')) {
@@ -163,13 +166,13 @@ class AdminOrdersControllerCore extends AdminController
if (Country::isCurrentlyUsed('country', true)) {
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT DISTINCT c.id_country, cl.`name`
FROM `'._DB_PREFIX_.'orders` o
'.Shop::addSqlAssociation('orders', 'o').'
INNER JOIN `'._DB_PREFIX_.'address` a ON a.id_address = o.id_address_delivery
INNER JOIN `'._DB_PREFIX_.'country` c ON a.id_country = c.id_country
INNER JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country` AND cl.`id_lang` = '.(int) $this->context->language->id.')
ORDER BY cl.name ASC');
SELECT DISTINCT c.id_country, cl.`name`
FROM `'._DB_PREFIX_.'orders` o
'.Shop::addSqlAssociation('orders', 'o').'
INNER JOIN `'._DB_PREFIX_.'address` a ON a.id_address = o.id_address_delivery
INNER JOIN `'._DB_PREFIX_.'country` c ON a.id_country = c.id_country
INNER JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country` AND cl.`id_lang` = '.(int) $this->context->language->id.')
ORDER BY cl.name ASC');
$country_array = array();
foreach ($result as $row) {
@@ -1843,7 +1846,7 @@ class AdminOrdersControllerCore extends AdminController
$order_detail_data = $obj_htl_bk_dtl->getOrderFormatedBookinInfoByIdOrder((int) Tools::getValue('id_order'));
$total_tax = 0;
$total_rooms_cost = 0;
$totalRoomsCostTE = 0;
if ($order_detail_data) {
foreach ($order_detail_data as $key => $value) {
//work on entring refund data
@@ -1871,20 +1874,13 @@ class AdminOrdersControllerCore extends AdminController
$order_detail_data[$key]['avail_rooms_to_swap'] = $obj_htl_bk_dtl->getAvailableRoomsForSwapping($value['date_from'], $value['date_to'], $value['id_product'], $value['id_hotel'], $value['id_room']);
/*Product price when order was created*/
$order_details_obj = new OrderDetail($value['id_order_detail']);
$unit_price_tax_excl = 0;
$unit_price_tax_incl = 0;
$unit_price_tax_excl = $order_details_obj->unit_price_tax_excl;
$unit_price_tax_incl = $order_details_obj->unit_price_tax_incl;
$tax_incl_price = $value['quantity'] * $unit_price_tax_incl;
$tax_excl_price = $value['quantity'] * $unit_price_tax_excl;
$total_tax += ($tax_incl_price - $tax_excl_price);
$total_rooms_cost += $tax_excl_price;
$order_detail_data[$key]['unit_amt_tax_excl'] = $unit_price_tax_excl;
$order_detail_data[$key]['unit_amt_tax_incl'] = $unit_price_tax_incl;
$order_detail_data[$key]['amt_with_qty_tax_excl'] = $tax_excl_price;
$order_detail_data[$key]['amt_with_qty_tax_incl'] = $tax_incl_price;
$totalRoomsCostTE += $value['total_price_tax_excl'];
$total_tax += $value['total_price_tax_incl']-$value['total_price_tax_excl'];
$num_days = $obj_htl_bk_dtl->getNumberOfDays($value['date_from'], $value['date_to']);
$order_detail_data[$key]['unit_amt_tax_excl'] = $value['total_price_tax_excl']/$num_days;
$order_detail_data[$key]['unit_amt_tax_incl'] = $value['total_price_tax_incl']/$num_days;
$order_detail_data[$key]['amt_with_qty_tax_excl'] = $value['total_price_tax_excl'];
$order_detail_data[$key]['amt_with_qty_tax_incl'] = $value['total_price_tax_incl'];
// For Order Refund Status
$order_detail_data[$key]['stage_name'] = $stage_name;
@@ -1892,7 +1888,6 @@ class AdminOrdersControllerCore extends AdminController
}
//end
//by webkul to send order status on order detail page
$obj_bookin_detail = new HotelBookingDetail();
$htl_booking_data_order_id = $obj_bookin_detail->getBookingDataByOrderId(Tools::getValue('id_order'));
if ($htl_booking_data_order_id) {
@@ -1938,7 +1933,7 @@ class AdminOrdersControllerCore extends AdminController
/*#################################################*/
/*Assigned variable to view.tpl By webkul*/
'total_rooms_cost' => $total_rooms_cost,
'totalRoomsCostTE' => $totalRoomsCostTE,
'total_tax_in_order' => $total_tax,
'htl_booking_order_data' => $htl_booking_data_order_id,
'hotel_order_status' => $htl_order_status,
@@ -2566,6 +2561,10 @@ class AdminOrdersControllerCore extends AdminController
$obj_htl_bk_dtl->comment = $obj_cart_bk_data->comment;
$obj_htl_bk_dtl->date_from = $obj_cart_bk_data->date_from;
$obj_htl_bk_dtl->date_to = $obj_cart_bk_data->date_to;
$total_price = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($product_informations['product_id'], $obj_cart_bk_data->date_from, $obj_cart_bk_data->date_to);
$obj_htl_bk_dtl->total_price_tax_excl = $total_price['total_price_tax_incl'];
$obj_htl_bk_dtl->total_price_tax_incl = $total_price['total_price_tax_excl'];
$obj_htl_bk_dtl->save();
}
}
@@ -2719,6 +2718,29 @@ class AdminOrdersControllerCore extends AdminController
)));
}
// By webkul to calculate rates of the product from hotelreservation syatem tables with feature prices....
$hotelCartBookingData = new HotelCartBookingData();
$totalProductPriceBeforeTE = (float) $order_detail->total_price_tax_excl;
$totalProductPriceBeforeTI = (float) $order_detail->total_price_tax_incl;
$totalProductPriceAfterTE = 0;
$totalProductPriceAfterTI = 0;
$bookedRooms = $obj_booking_detail->getBookedRoomsByIdOrderDetail((int) Tools::getValue('order_detail_id'), $id_product);
if ($bookedRooms) {
foreach ($bookedRooms as $roomInfo) {
if ($roomInfo['id_room'] == $id_room && (strtotime($roomInfo['date_from']) == strtotime($old_date_from))) {
$roomTotalPrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($roomInfo['id_product'], $new_date_from, $new_date_to);
$totalProductPriceAfterTE += (float) $roomTotalPrice['total_price_tax_excl'];
$totalProductPriceAfterTI += (float) $roomTotalPrice['total_price_tax_incl'];
} else {
$roomTotalPrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($roomInfo['id_product'], $roomInfo['date_from'], $roomInfo['date_to']);
$totalProductPriceAfterTE += (float) $roomInfo['total_price_tax_excl'];
$totalProductPriceAfterTI += (float) $roomInfo['total_price_tax_incl'];
}
}
}
// END
/*This code is commented by webkul because in our case quantity of the product will be number of days for which room is booked*/
// If multiple product_quantity, the order details concern a product customized
/*$product_quantity = 0;
@@ -2736,8 +2758,11 @@ class AdminOrdersControllerCore extends AdminController
$product_price_tax_incl = Tools::ps_round(Tools::getValue('product_price_tax_incl'), 2);
$product_price_tax_excl = Tools::ps_round(Tools::getValue('product_price_tax_excl'), 2);
// Calculate differences of price (Before / After)
$diff_price_tax_incl = $product_price_tax_incl * $qty_diff;
$diff_price_tax_excl = $product_price_tax_excl * $qty_diff;
//$diff_price_tax_incl = $product_price_tax_incl * $qty_diff;
$diff_price_tax_incl = $totalProductPriceAfterTI - $totalProductPriceBeforeTI;
//$diff_price_tax_excl = $product_price_tax_excl * $qty_diff;
$diff_price_tax_excl = $totalProductPriceAfterTE - $totalProductPriceBeforeTE;
//var_dump($order_invoice);
// Apply change on OrderInvoice
if (isset($order_invoice)) {
// If OrderInvoice to use is different, we update the old invoice and new invoice
@@ -2749,7 +2774,7 @@ class AdminOrdersControllerCore extends AdminController
$old_order_invoice->total_paid_tax_excl -= $order_detail->total_price_tax_excl;
$old_order_invoice->total_paid_tax_incl -= $order_detail->total_price_tax_incl;
ddd($old_order_invoice);
$res &= $old_order_invoice->update();
$order_invoice->total_products += $order_detail->total_price_tax_excl;
@@ -2761,7 +2786,6 @@ class AdminOrdersControllerCore extends AdminController
$order_detail->id_order_invoice = $order_invoice->id;
}
}
if ($diff_price_tax_incl != 0 && $diff_price_tax_excl != 0) {
$order_detail->unit_price_tax_excl = $product_price_tax_excl;
$order_detail->unit_price_tax_incl = $product_price_tax_incl;
@@ -2950,10 +2974,21 @@ class AdminOrdersControllerCore extends AdminController
/*END*/
$this->doDeleteProductLineValidation($order_detail, $order);
$bookingInfo = $obj_booking_detail->getRowByIdOrderIdProductInDateRange($id_order, $id_product, $date_from, $date_to);
$bookingPriceTaxIncl = $bookingInfo['total_price_tax_incl'];
$bookingPriceTaxExcl = $bookingInfo['total_price_tax_excl'];
/*$totalProductPriceBeforeTE = $order_detail->total_price_tax_excl;
$totalProductPriceBeforeTI = $order_detail->total_price_tax_incl;*/
// by webkul to calculate rates of the product from hotelreservation syatem tables with feature prices....
/* $hotelCartBookingData = new HotelCartBookingData();
$roomTypesByIdProduct = $hotelCartBookingData->getCartInfoIdCartIdProduct($this->id, $product['id_product']);*/
/*This code below to alter the values in the order detail table*/
$diff_products_tax_incl = $order_detail->unit_price_tax_incl * $product_quantity;
$diff_products_tax_excl = $order_detail->unit_price_tax_excl * $product_quantity;
//$diff_products_tax_incl = $order_detail->unit_price_tax_incl * $product_quantity;
//$diff_products_tax_excl = $order_detail->unit_price_tax_excl * $product_quantity;
$diff_products_tax_incl = $bookingPriceTaxIncl;
$diff_products_tax_excl = $bookingPriceTaxExcl;
$delete = false;
if ($product_quantity >= $order_detail->product_quantity) {
$delete = true;

View File

@@ -174,19 +174,19 @@ class AdminProductsControllerCore extends AdminController
}
$this->_join .= '
LEFT JOIN `'._DB_PREFIX_.'stock_available` sav ON (sav.`id_product` = a.`id_product` AND sav.`id_product_attribute` = 0
'.StockAvailable::addSqlShopRestriction(null, null, 'sav').') ';
LEFT JOIN `'._DB_PREFIX_.'stock_available` sav ON (sav.`id_product` = a.`id_product` AND sav.`id_product_attribute` = 0
'.StockAvailable::addSqlShopRestriction(null, null, 'sav').') ';
$alias = 'sa';
$alias_image = 'image_shop';
$id_shop = Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP ? (int) $this->context->shop->id : 'a.id_shop_default';
$this->_join .= ' JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = '.$id_shop.')
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = '.$id_shop.')
LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = '.$id_shop.')
LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_product` = a.`id_product` AND image_shop.`cover` = 1 AND image_shop.id_shop = '.$id_shop.')
LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_image` = image_shop.`id_image`)
LEFT JOIN `'._DB_PREFIX_.'product_download` pd ON (pd.`id_product` = a.`id_product`)';
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = '.$id_shop.')
LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = '.$id_shop.')
LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_product` = a.`id_product` AND image_shop.`cover` = 1 AND image_shop.id_shop = '.$id_shop.')
LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_image` = image_shop.`id_image`)
LEFT JOIN `'._DB_PREFIX_.'product_download` pd ON (pd.`id_product` = a.`id_product`)';
$this->_select .= 'shop.`name` AS `shopname`, a.`id_shop_default`, ';
$this->_select .= $alias_image.'.`id_image` AS `id_image`, cl.`name` AS `name_category`, '.$alias.'.`price`, 0 AS `price_final`, a.`is_virtual`, pd.`nb_downloadable`, sav.`quantity` AS `sav_quantity`, '.$alias.'.`active`, IF(sav.`quantity`<=0, 1, 0) AS `badge_danger`';
@@ -1662,14 +1662,14 @@ class AdminProductsControllerCore extends AdminController
// Clean covers in image table
$count_cover_image = Db::getInstance()->getValue('
SELECT COUNT(*) FROM '._DB_PREFIX_.'image i
INNER JOIN '._DB_PREFIX_.'image_shop ish ON (i.id_image = ish.id_image AND ish.id_shop = '.(int) $id_shop.')
WHERE i.cover = 1 AND `id_product` = '.(int) $id_product);
SELECT COUNT(*) FROM '._DB_PREFIX_.'image i
INNER JOIN '._DB_PREFIX_.'image_shop ish ON (i.id_image = ish.id_image AND ish.id_shop = '.(int) $id_shop.')
WHERE i.cover = 1 AND `id_product` = '.(int) $id_product);
$id_image = Db::getInstance()->getValue('
SELECT i.`id_image` FROM '._DB_PREFIX_.'image i
INNER JOIN '._DB_PREFIX_.'image_shop ish ON (i.id_image = ish.id_image AND ish.id_shop = '.(int) $id_shop.')
WHERE `id_product` = '.(int) $id_product);
SELECT i.`id_image` FROM '._DB_PREFIX_.'image i
INNER JOIN '._DB_PREFIX_.'image_shop ish ON (i.id_image = ish.id_image AND ish.id_shop = '.(int) $id_shop.')
WHERE `id_product` = '.(int) $id_product);
if ($count_cover_image < 1) {
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'image i SET i.cover = 1 WHERE i.id_image = '.(int) $id_image.' AND i.`id_product` = '.(int) $id_product.' LIMIT 1');
@@ -1681,10 +1681,10 @@ class AdminProductsControllerCore extends AdminController
// Clean covers in image_shop table
$count_cover_image_shop = Db::getInstance()->getValue('
SELECT COUNT(*)
FROM '._DB_PREFIX_.'image_shop ish
INNER JOIN '._DB_PREFIX_.'image i ON (i.id_image = ish.id_image AND i.`id_product` = '.(int) $id_product.')
WHERE ish.id_shop = '.(int) $id_shop.' AND ish.cover = 1');
SELECT COUNT(*)
FROM '._DB_PREFIX_.'image_shop ish
INNER JOIN '._DB_PREFIX_.'image i ON (i.id_image = ish.id_image AND i.`id_product` = '.(int) $id_product.')
WHERE ish.id_shop = '.(int) $id_shop.' AND ish.cover = 1');
if ($count_cover_image_shop < 1) {
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'image_shop ish SET ish.cover = 1 WHERE ish.id_image = '.(int) $id_image.' AND ish.id_shop = '.(int) $id_shop.' LIMIT 1');
@@ -1753,18 +1753,18 @@ class AdminProductsControllerCore extends AdminController
// if deleted image was the cover, change it to the first one
if (!Image::getCover($image->id_product)) {
$res &= Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'image_shop` image_shop, '._DB_PREFIX_.'image i
SET image_shop.`cover` = 1,
i.cover = 1
WHERE image_shop.`id_image` = (SELECT id_image FROM
(SELECT image_shop.id_image
FROM '._DB_PREFIX_.'image i'.
UPDATE `'._DB_PREFIX_.'image_shop` image_shop, '._DB_PREFIX_.'image i
SET image_shop.`cover` = 1,
i.cover = 1
WHERE image_shop.`id_image` = (SELECT id_image FROM
(SELECT image_shop.id_image
FROM '._DB_PREFIX_.'image i'.
Shop::addSqlAssociation('image', 'i').'
WHERE i.id_product ='.(int) $image->id_product.' LIMIT 1
) tmpImage)
AND id_shop='.(int) $this->context->shop->id.'
AND i.id_image = image_shop.id_image
');
WHERE i.id_product ='.(int) $image->id_product.' LIMIT 1
) tmpImage)
AND id_shop='.(int) $this->context->shop->id.'
AND i.id_image = image_shop.id_image
');
}
if (file_exists(_PS_TMP_IMG_DIR_.'product_'.$image->id_product.'.jpg')) {
@@ -2725,20 +2725,20 @@ class AdminProductsControllerCore extends AdminController
$level = $current['infos']['level_depth'] + 1;
$content .= '
<tr class="'.($irow++ % 2 ? 'alt_row' : '').'">
<td>
<input type="checkbox" name="categoryBox[]" class="categoryBox'.($id_category_default == $id_category ? ' id_category_default' : '').'" id="categoryBox_'.$id_category.'" value="'.$id_category.'"'.((in_array($id_category, $indexedCategories) || ((int) (Tools::getValue('id_category')) == $id_category && !(int) ($id_obj))) ? ' checked="checked"' : '').' />
</td>
<td>
'.$id_category.'
</td>
<td>';
<tr class="'.($irow++ % 2 ? 'alt_row' : '').'">
<td>
<input type="checkbox" name="categoryBox[]" class="categoryBox'.($id_category_default == $id_category ? ' id_category_default' : '').'" id="categoryBox_'.$id_category.'" value="'.$id_category.'"'.((in_array($id_category, $indexedCategories) || ((int) (Tools::getValue('id_category')) == $id_category && !(int) ($id_obj))) ? ' checked="checked"' : '').' />
</td>
<td>
'.$id_category.'
</td>
<td>';
for ($i = 2; $i < $level; ++$i) {
$content .= '<img src="../img/admin/lvl_'.$has_suite[$i - 2].'.gif" alt="" />';
}
$content .= '<img src="../img/admin/'.($level == 1 ? 'lv1.gif' : 'lv2_'.($todo == $doneC ? 'f' : 'b').'.gif').'" alt="" /> &nbsp;
<label for="categoryBox_'.$id_category.'" class="t">'.stripslashes($current['infos']['name']).'</label></td>
</tr>';
<label for="categoryBox_'.$id_category.'" class="t">'.stripslashes($current['infos']['name']).'</label></td>
</tr>';
if ($level > 1) {
$has_suite[] = ($todo == $doneC ? 0 : 1);
@@ -2757,10 +2757,10 @@ class AdminProductsControllerCore extends AdminController
protected function _displayDraftWarning($active)
{
$content = '<div class="warn draft" style="'.($active ? 'display:none' : '').'">
<span>'.$this->l('Your room type will be saved as a draft.').'</span>
<a href="#" class="btn btn-default pull-right" onclick="submitAddProductAndPreview()" ><i class="icon-external-link-sign"></i> '.$this->l('Save and preview').'</a>
<input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" />
</div>';
<span>'.$this->l('Your room type will be saved as a draft.').'</span>
<a href="#" class="btn btn-default pull-right" onclick="submitAddProductAndPreview()" ><i class="icon-external-link-sign"></i> '.$this->l('Save and preview').'</a>
<input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" />
</div>';
$this->tpl_form_vars['draft_warning'] = $content;
}
@@ -2930,7 +2930,7 @@ class AdminProductsControllerCore extends AdminController
$page = (int) Tools::getValue('page');
$this->tpl_form_vars['form_action'] = $this->context->link->getAdminLink('AdminProducts').'&'.($id_product ? 'id_product='.(int) $id_product : 'addproduct').($page > 1 ? '&page='.(int) $page : '');
$this->tpl_form_vars['form_action'] = $this->context->link->getAdminLink('AdminProducts').'&'.($id_product ? 'updateproduct&id_product='.(int)$id_product : 'addproduct').($page > 1 ? '&page='.(int)$page : '');
$this->tpl_form_vars['id_product'] = $id_product;
// Transform configuration option 'upload_max_filesize' in octets
@@ -3143,8 +3143,8 @@ class AdminProductsControllerCore extends AdminController
'wholesale_price' => (float) Tools::convertPrice($price, $id_currency),
);
$where = '
a.id_product = '.(int) $product->id.'
AND a.id_product_attribute = '.(int) $attribute['id_product_attribute'];
a.id_product = '.(int) $product->id.'
AND a.id_product_attribute = '.(int) $attribute['id_product_attribute'];
ObjectModel::updateMultishopTable('Combination', $data, $where);
} else {
$product->wholesale_price = (float) Tools::convertPrice($price, $id_currency); //converted in the default currency
@@ -3264,30 +3264,40 @@ class AdminProductsControllerCore extends AdminController
$data = $this->createTemplate($this->tpl_form);
if ($obj->id) {
if ($this->product_exists_in_shop) {
$obj_htl_info = new HotelBranchInformation();
$htl_info = $obj_htl_info->hotelsNameAndId();
if ($htl_info) {
$obj_room_status = new HotelRoomStatus();
$rm_status = $obj_room_status->getAllRoomStatus();
$objHotelInfo = new HotelBranchInformation();
$hotelInfo = $objHotelInfo->hotelsNameAndId();
if ($hotelInfo) {
$objRoomStatus = new HotelRoomStatus();
$roomStatus = $objRoomStatus->getAllRoomStatus();
$obj_room_type = new HotelRoomType();
$htl_room_type = $obj_room_type->getRoomTypeInfoByIdProduct($obj->id);
if ($htl_room_type) {
$data->assign('htl_room_type', $htl_room_type);
$objRoomType = new HotelRoomType();
$hotelRoomType = $objRoomType->getRoomTypeInfoByIdProduct($obj->id);
if ($hotelRoomType) {
$data->assign('htl_room_type', $hotelRoomType);
$htl_full_info = $obj_htl_info->hotelBranchInfoById($htl_room_type['id_hotel']);
$data->assign('htl_full_info', $htl_full_info);
$hotelFullInfo = $objHotelInfo->hotelBranchInfoById($hotelRoomType['id_hotel']);
$data->assign('htl_full_info', $hotelFullInfo);
$obj_room_info = new HotelRoomInformation();
$htl_room_info = $obj_room_info->getHotelRoomInfo($obj->id, $htl_room_type['id_hotel']);
if ($htl_room_info) {
$data->assign('htl_room_info', $htl_room_info);
$objRoomInfo = new HotelRoomInformation();
$objRoomDisableDates = new HotelRoomDisableDates();
$hotelRoomInfo = $objRoomInfo->getHotelRoomInfo($obj->id, $hotelRoomType['id_hotel']);
if ($hotelRoomInfo) {
foreach ($hotelRoomInfo as &$room) {
if ($room['id_status'] == 3) {
$disabledDates = $objRoomDisableDates->getRoomDisableDates($room['id']);
$room['disabled_dates_json'] = Tools::jsonEncode($disabledDates);
}
}
$data->assign('htl_room_info', $hotelRoomInfo);
}
}
$data->assign(array(
'product' => $obj,
'htl_info' => $htl_info,
'rm_status' => $rm_status,
'htl_info' => $hotelInfo,
'rm_status' => $roomStatus,
'datesMissing' => $this->l('Please fill all Date From and Date To'),
'datesOverlapping' => $this->l('Some date are conflicting with each other. Please check and reselect the date ranges.'),
));
} else {
$this->displayWarning($this->l('Add Hotel Before configurate this product.'));
@@ -3302,11 +3312,39 @@ class AdminProductsControllerCore extends AdminController
$this->tpl_form_vars['custom_form'] = $data->fetch();
}
public function validateDisableDateRanges($disableDates)
{
if (count($disableDates)) {
foreach ($disableDates as $disable_key => $disableDate) {
if (!$disableDate['date_to'] && !$disableDate['date_from']) {
unset($disableDates[$disable_key]);
} elseif (!Validate::isDate($disableDate['date_from']) || !Validate::isDate($disableDate['date_to'])) {
$this->errors[] = Tools::displayError('Please fill valid date in disable date fields.');
} elseif (($disableDate['date_from'] && !$disableDate['date_to']) || (!$disableDate['date_from'] && $disableDate['date_to'])) {
$this->errors[] = Tools::displayError('Please fill all date from and date to for disable dates fields.');
} else {
foreach ($disableDates as $key => $disDate) {
if ($key != $disable_key) {
if ((($disableDate['date_from'] < $disDate['date_from']) && ($disableDate['date_to'] <= $disDate['date_from'])) || (($disableDate['date_from'] > $disDate['date_from']) && ($disableDate['date_from'] >= $disDate['date_to']))) {
// continue
} else {
$this->errors[] = Tools::displayError('Some date are conflicting with each other. Please check and reselect the date ranges.');
}
}
}
}
}
}
if (!count($disableDates)) {
$this->errors[] = Tools::displayError('Please enter disable dates for status temporary disable.');
}
}
public function processConfiguration()
{
/*Check if save of configuration tab is clicked*/
$checkConfSubmit = Tools::getValue('checkConfSubmit');
if ($checkConfSubmit) {
$wk_id_room_type = Tools::getValue('wk_id_room_type'); // htl_room_type id field use only in edit case
@@ -3333,53 +3371,83 @@ class AdminProductsControllerCore extends AdminController
$room_num = Tools::getValue('room_num');
if ($room_num) {
$room_floor = Tools::getValue('room_floor');
$room_status = Tools::getValue('room_status');
$room_comment = Tools::getValue('room_comment');
$disable_dates = Tools::getValue('disableDatesJSON');
$room_status = Tools::getValue('room_status');
if (count($room_num) != count($room_status)) {
$this->errors[] = Tools::displayError('There is some problem while setting room information');
} else {
foreach ($room_status as $key => $status) {
if ($status == 3) {
$disableDatesArray = Tools::jsonDecode($disable_dates[$key], true);
$this->validateDisableDateRanges($disableDatesArray);
}
}
}
if (!count($this->errors)) {
if ($wk_id_room_type) {
$obj_room_type = new HotelRoomType($wk_id_room_type);
$id_hotel = $obj_room_type->id_hotel;
$objRoomType = new HotelRoomType($wk_id_room_type);
$id_hotel = $objRoomType->id_hotel;
} else {
$obj_room_type = new HotelRoomType();
$obj_room_type->id_product = $id_product;
$obj_room_type->id_hotel = $id_hotel;
$objRoomType = new HotelRoomType();
$objRoomType->id_product = $id_product;
$objRoomType->id_hotel = $id_hotel;
}
$obj_room_type->adult = $adult;
$obj_room_type->children = $children;
$obj_room_type->save();
$objRoomType->adult = $adult;
$objRoomType->children = $children;
$objRoomType->save();
$id_rm_type = $obj_room_type->id;
$id_rm_type = $objRoomType->id;
// Associate categories to Room Type
$product = new Product((int) $id_product);
$objHotelInfo = new HotelBranchInformation($id_hotel);
$hotelIdCategory = $objHotelInfo->id_category;
$category = new Category($hotelIdCategory);
$hotelCategories = $category->getParentsCategories();
$categoryIds = array_column($hotelCategories, 'id_category');
$product->updateCategories($categoryIds);
// Associate categories to Room Type
$id_room_info = Tools::getValue('id_room_info');
foreach ($room_num as $key => $value) {
if ($value) {
if ($id_room_info) {
if ($key <= (count($id_room_info) - 1)) {
$obj_room_info = new HotelRoomInformation($id_room_info[$key]);
$objRoomInfo = new HotelRoomInformation($id_room_info[$key]);
} else {
//if any new room is added at the time of edit
$obj_room_info = new HotelRoomInformation();
$obj_room_info->id_product = $id_product;
$obj_room_info->id_hotel = $id_hotel;
$objRoomInfo = new HotelRoomInformation();
$objRoomInfo->id_product = $id_product;
$objRoomInfo->id_hotel = $id_hotel;
}
} else {
$obj_room_info = new HotelRoomInformation();
$obj_room_info->id_product = $id_product;
$obj_room_info->id_hotel = $id_hotel;
$objRoomInfo = new HotelRoomInformation();
$objRoomInfo->id_product = $id_product;
$objRoomInfo->id_hotel = $id_hotel;
}
$objRoomInfo->room_num = $value;
$objRoomInfo->id_status = $room_status[$key];
$objRoomInfo->floor = $room_floor[$key];
$objRoomInfo->comment = $room_comment[$key];
if ($objRoomInfo->save()) {
if ($room_status[$key] == 3) {
if ($disableDatesArray) {
$objRoomDisableDates = new HotelRoomDisableDates();
$objRoomDisableDates->deleteRoomDisableDates($objRoomInfo->id);
foreach ($disableDatesArray as $disableDateRange) {
$objRoomDisableDates->id_room_type = $id_product;
$objRoomDisableDates->id_room = $objRoomInfo->id;
$objRoomDisableDates->date_from = $disableDateRange['date_from'];
$objRoomDisableDates->date_to = $disableDateRange['date_to'];
$objRoomDisableDates->reason = $disableDateRange['reason'];
$objRoomDisableDates->add();
}
}
}
}
$obj_room_info->room_num = $value;
$obj_room_info->id_status = $room_status[$key];
$obj_room_info->floor = $room_floor[$key];
$obj_room_info->comment = $room_comment[$key];
$obj_room_info->save();
}
}
}
@@ -3392,8 +3460,8 @@ class AdminProductsControllerCore extends AdminController
{
$id_htl_info = Tools::getValue('id');
$obj_room_info = new HotelRoomInformation();
$return = $obj_room_info->deleteHotelRoomInfoById($id_htl_info);
$objRoomInfo = new HotelRoomInformation();
$return = $objRoomInfo->deleteHotelRoomInfoById($id_htl_info);
echo $return;
}
@@ -3740,6 +3808,12 @@ class AdminProductsControllerCore extends AdminController
}
}
}
// For Feature Price Plans
if ($obj->id) {
$htlFeaturePrices = new HotelRoomTypeFeaturePricing();
$productFeaturePrices = $htlFeaturePrices->getFeaturePricesbyIdProduct($product->id);
$data->assign('productFeaturePrices', $productFeaturePrices);
}
$this->tpl_form_vars['custom_form'] = $data->fetch();
}
@@ -4023,30 +4097,30 @@ class AdminProductsControllerCore extends AdminController
if (!$specific_price['id_shop'] || in_array($specific_price['id_shop'], Shop::getContextListShopID())) {
$content .= '
<tr '.($i % 2 ? 'class="alt_row"' : '').'>
<td>'.$rule_name.'</td>
<td>'.$attributes_name.'</td>';
<tr '.($i % 2 ? 'class="alt_row"' : '').'>
<td>'.$rule_name.'</td>
<td>'.$attributes_name.'</td>';
$can_delete_specific_prices = true;
if (Shop::isFeatureActive()) {
$id_shop_sp = $specific_price['id_shop'];
$can_delete_specific_prices = (count($this->context->employee->getAssociatedShops()) > 1 && !$id_shop_sp) || $id_shop_sp;
$content .= '
<td>'.($id_shop_sp ? $shops[$id_shop_sp]['name'] : $this->l('All shops')).'</td>';
<td>'.($id_shop_sp ? $shops[$id_shop_sp]['name'] : $this->l('All shops')).'</td>';
}
$price = Tools::ps_round($specific_price['price'], 2);
$fixed_price = ($price == Tools::ps_round($obj->price, 2) || $specific_price['price'] == -1) ? '--' : Tools::displayPrice($price, $current_specific_currency);
$content .= '
<td>'.($specific_price['id_currency'] ? $currencies[$specific_price['id_currency']]['name'] : $this->l('All currencies')).'</td>
<td>'.($specific_price['id_country'] ? $countries[$specific_price['id_country']]['name'] : $this->l('All countries')).'</td>
<td>'.($specific_price['id_group'] ? $groups[$specific_price['id_group']]['name'] : $this->l('All groups')).'</td>
<td title="'.$this->l('ID:').' '.$specific_price['id_customer'].'">'.(isset($customer_full_name) ? $customer_full_name : $this->l('All customers')).'</td>
<td>'.$fixed_price.'</td>
<td>'.$impact.'</td>
<td>'.$period.'</td>
<td>'.$specific_price['from_quantity'].'</th>
<td>'.((!$rule->id && $can_delete_specific_prices) ? '<a class="btn btn-default" name="delete_link" href="'.self::$currentIndex.'&id_product='.(int) Tools::getValue('id_product').'&action=deleteSpecificPrice&id_specific_price='.(int) ($specific_price['id_specific_price']).'&token='.Tools::getValue('token').'"><i class="icon-trash"></i></a>' : '').'</td>
</tr>';
<td>'.($specific_price['id_currency'] ? $currencies[$specific_price['id_currency']]['name'] : $this->l('All currencies')).'</td>
<td>'.($specific_price['id_country'] ? $countries[$specific_price['id_country']]['name'] : $this->l('All countries')).'</td>
<td>'.($specific_price['id_group'] ? $groups[$specific_price['id_group']]['name'] : $this->l('All groups')).'</td>
<td title="'.$this->l('ID:').' '.$specific_price['id_customer'].'">'.(isset($customer_full_name) ? $customer_full_name : $this->l('All customers')).'</td>
<td>'.$fixed_price.'</td>
<td>'.$impact.'</td>
<td>'.$period.'</td>
<td>'.$specific_price['from_quantity'].'</th>
<td>'.((!$rule->id && $can_delete_specific_prices) ? '<a class="btn btn-default" name="delete_link" href="'.self::$currentIndex.'&id_product='.(int) Tools::getValue('id_product').'&action=deleteSpecificPrice&id_specific_price='.(int) ($specific_price['id_specific_price']).'&token='.Tools::getValue('token').'"><i class="icon-trash"></i></a>' : '').'</td>
</tr>';
++$i;
unset($customer_full_name);
}
@@ -4055,39 +4129,39 @@ class AdminProductsControllerCore extends AdminController
if ($length_before === strlen($content)) {
$content .= '
<tr>
<td class="text-center" colspan="13"><i class="icon-warning-sign"></i>&nbsp;'.$this->l('No specific prices.').'</td>
</tr>';
<tr>
<td class="text-center" colspan="13"><i class="icon-warning-sign"></i>&nbsp;'.$this->l('No specific prices.').'</td>
</tr>';
}
$content .= '
</tbody>
</table>
</div>
<div class="panel-footer">
<a href="'.$this->context->link->getAdminLink('AdminProducts').($page > 1 ? '&submitFilter'.$this->table.'='.(int) $page : '').'" class="btn btn-default"><i class="process-icon-cancel"></i> '.$this->l('Cancel').'</a>
<button id="product_form_submit_btn" type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> '.$this->l('Save').'</button>
<button id="product_form_submit_btn" type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> '.$this->l('Save and stay').'</button>
</div>
</div>';
</tbody>
</table>
</div>
<div class="panel-footer">
<a href="'.$this->context->link->getAdminLink('AdminProducts').($page > 1 ? '&submitFilter'.$this->table.'='.(int) $page : '').'" class="btn btn-default"><i class="process-icon-cancel"></i> '.$this->l('Cancel').'</a>
<button id="product_form_submit_btn" type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> '.$this->l('Save').'</button>
<button id="product_form_submit_btn" type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> '.$this->l('Save and stay').'</button>
</div>
</div>';
$content .= '
<script type="text/javascript">
var currencies = new Array();
currencies[0] = new Array();
currencies[0]["sign"] = "'.$defaultCurrency->sign.'";
currencies[0]["format"] = '.intval($defaultCurrency->format).';
';
<script type="text/javascript">
var currencies = new Array();
currencies[0] = new Array();
currencies[0]["sign"] = "'.$defaultCurrency->sign.'";
currencies[0]["format"] = '.intval($defaultCurrency->format).';
';
foreach ($currencies as $currency) {
$content .= '
currencies['.$currency['id_currency'].'] = new Array();
currencies['.$currency['id_currency'].']["sign"] = "'.$currency['sign'].'";
currencies['.$currency['id_currency'].']["format"] = '.intval($currency['format']).';
';
currencies['.$currency['id_currency'].'] = new Array();
currencies['.$currency['id_currency'].']["sign"] = "'.$currency['sign'].'";
currencies['.$currency['id_currency'].']["format"] = '.intval($currency['format']).';
';
}
$content .= '
</script>
';
</script>
';
// Not use id_customer
if ($specific_price_priorities[0] == 'id_customer') {
@@ -4097,58 +4171,58 @@ class AdminProductsControllerCore extends AdminController
$specific_price_priorities = array_values($specific_price_priorities);
$content .= '<div class="panel">
<h3>'.$this->l('Priority management').'</h3>
<div class="alert alert-info">
'.$this->l('Sometimes one customer can fit into multiple price rules. Priorities allow you to define which rule applies to the customer.').'
</div>';
<h3>'.$this->l('Priority management').'</h3>
<div class="alert alert-info">
'.$this->l('Sometimes one customer can fit into multiple price rules. Priorities allow you to define which rule applies to the customer.').'
</div>';
$content .= '
<div class="form-group">
<label class="control-label col-lg-3" for="specificPricePriority1">'.$this->l('Priorities').'</label>
<div class="input-group col-lg-9">
<select id="specificPricePriority1" name="specificPricePriority[]">
<option value="id_shop"'.($specific_price_priorities[0] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option>
<option value="id_currency"'.($specific_price_priorities[0] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option>
<option value="id_country"'.($specific_price_priorities[0] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option>
<option value="id_group"'.($specific_price_priorities[0] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option>
</select>
<span class="input-group-addon"><i class="icon-chevron-right"></i></span>
<select name="specificPricePriority[]">
<option value="id_shop"'.($specific_price_priorities[1] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option>
<option value="id_currency"'.($specific_price_priorities[1] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option>
<option value="id_country"'.($specific_price_priorities[1] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option>
<option value="id_group"'.($specific_price_priorities[1] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option>
</select>
<span class="input-group-addon"><i class="icon-chevron-right"></i></span>
<select name="specificPricePriority[]">
<option value="id_shop"'.($specific_price_priorities[2] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option>
<option value="id_currency"'.($specific_price_priorities[2] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option>
<option value="id_country"'.($specific_price_priorities[2] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option>
<option value="id_group"'.($specific_price_priorities[2] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option>
</select>
<span class="input-group-addon"><i class="icon-chevron-right"></i></span>
<select name="specificPricePriority[]">
<option value="id_shop"'.($specific_price_priorities[3] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option>
<option value="id_currency"'.($specific_price_priorities[3] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option>
<option value="id_country"'.($specific_price_priorities[3] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option>
<option value="id_group"'.($specific_price_priorities[3] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<p class="checkbox">
<label for="specificPricePriorityToAll"><input type="checkbox" name="specificPricePriorityToAll" id="specificPricePriorityToAll" />'.$this->l('Apply to all products').'</label>
</p>
</div>
</div>
<div class="panel-footer">
<a href="'.$this->context->link->getAdminLink('AdminProducts').($page > 1 ? '&submitFilter'.$this->table.'='.(int) $page : '').'" class="btn btn-default"><i class="process-icon-cancel"></i> '.$this->l('Cancel').'</a>
<button id="product_form_submit_btn" type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> '.$this->l('Save').'</button>
<button id="product_form_submit_btn" type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> '.$this->l('Save and stay').'</button>
</div>
</div>
';
<div class="form-group">
<label class="control-label col-lg-3" for="specificPricePriority1">'.$this->l('Priorities').'</label>
<div class="input-group col-lg-9">
<select id="specificPricePriority1" name="specificPricePriority[]">
<option value="id_shop"'.($specific_price_priorities[0] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option>
<option value="id_currency"'.($specific_price_priorities[0] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option>
<option value="id_country"'.($specific_price_priorities[0] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option>
<option value="id_group"'.($specific_price_priorities[0] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option>
</select>
<span class="input-group-addon"><i class="icon-chevron-right"></i></span>
<select name="specificPricePriority[]">
<option value="id_shop"'.($specific_price_priorities[1] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option>
<option value="id_currency"'.($specific_price_priorities[1] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option>
<option value="id_country"'.($specific_price_priorities[1] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option>
<option value="id_group"'.($specific_price_priorities[1] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option>
</select>
<span class="input-group-addon"><i class="icon-chevron-right"></i></span>
<select name="specificPricePriority[]">
<option value="id_shop"'.($specific_price_priorities[2] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option>
<option value="id_currency"'.($specific_price_priorities[2] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option>
<option value="id_country"'.($specific_price_priorities[2] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option>
<option value="id_group"'.($specific_price_priorities[2] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option>
</select>
<span class="input-group-addon"><i class="icon-chevron-right"></i></span>
<select name="specificPricePriority[]">
<option value="id_shop"'.($specific_price_priorities[3] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option>
<option value="id_currency"'.($specific_price_priorities[3] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option>
<option value="id_country"'.($specific_price_priorities[3] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option>
<option value="id_group"'.($specific_price_priorities[3] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<p class="checkbox">
<label for="specificPricePriorityToAll"><input type="checkbox" name="specificPricePriorityToAll" id="specificPricePriorityToAll" />'.$this->l('Apply to all products').'</label>
</p>
</div>
</div>
<div class="panel-footer">
<a href="'.$this->context->link->getAdminLink('AdminProducts').($page > 1 ? '&submitFilter'.$this->table.'='.(int) $page : '').'" class="btn btn-default"><i class="process-icon-cancel"></i> '.$this->l('Cancel').'</a>
<button id="product_form_submit_btn" type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> '.$this->l('Save').'</button>
<button id="product_form_submit_btn" type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> '.$this->l('Save and stay').'</button>
</div>
</div>
';
return $content;
}
@@ -4630,9 +4704,9 @@ class AdminProductsControllerCore extends AdminController
$data->assign('shops', $shops);
$count_images = Db::getInstance()->getValue('
SELECT COUNT(id_product)
FROM '._DB_PREFIX_.'image
WHERE id_product = '.(int) $obj->id
SELECT COUNT(id_product)
FROM '._DB_PREFIX_.'image
WHERE id_product = '.(int) $obj->id
);
$images = Image::getImages($this->context->language->id, $obj->id);
@@ -5455,10 +5529,10 @@ class AdminProductsControllerCore extends AdminController
protected function _displayUnavailableProductWarning()
{
$content = '<div class="alert">
<span>'.$this->l('Your room type will be saved as a draft.').'</span>
<a href="#" class="btn btn-default pull-right" onclick="submitAddProductAndPreview()" ><i class="icon-external-link-sign"></i> '.$this->l('Save and preview').'</a>
<input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" />
</div>';
<span>'.$this->l('Your room type will be saved as a draft.').'</span>
<a href="#" class="btn btn-default pull-right" onclick="submitAddProductAndPreview()" ><i class="icon-external-link-sign"></i> '.$this->l('Save and preview').'</a>
<input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" />
</div>';
$this->tpl_form_vars['warning_unavailable_product'] = $content;
}
@@ -5472,14 +5546,14 @@ class AdminProductsControllerCore extends AdminController
$result = false;
} else {
$result = Db::getInstance()->executeS('
SELECT DISTINCT pl.`name`, p.`id_product`, pl.`id_shop`
FROM `'._DB_PREFIX_.'product` p
LEFT JOIN `'._DB_PREFIX_.'product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop ='.(int) Context::getContext()->shop->id.')
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl
ON (pl.`id_product` = p.`id_product` AND pl.`id_lang` = '.(int) $id_lang.')
WHERE pl.`name` LIKE "%'.pSQL($search).'%" AND ps.id_product IS NULL
GROUP BY pl.`id_product`
LIMIT '.(int) $limit);
SELECT DISTINCT pl.`name`, p.`id_product`, pl.`id_shop`
FROM `'._DB_PREFIX_.'product` p
LEFT JOIN `'._DB_PREFIX_.'product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop ='.(int) Context::getContext()->shop->id.')
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl
ON (pl.`id_product` = p.`id_product` AND pl.`id_lang` = '.(int) $id_lang.')
WHERE pl.`name` LIKE "%'.pSQL($search).'%" AND ps.id_product IS NULL
GROUP BY pl.`id_product`
LIMIT '.(int) $limit);
}
die(Tools::jsonEncode($result));
}

View File

@@ -176,6 +176,14 @@ class CategoryControllerCore extends FrontController
}
/*End*/
if (isset($booking_data['rm_data']) && $booking_data['rm_data']) {
$useTax = HotelBookingDetail::useTax();
foreach ($booking_data['rm_data'] as $key => $roomType) {
$feature_price = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay($roomType['id_product'], $date_from, $date_to, $useTax);
$booking_data['rm_data'][$key]['feature_price'] = $feature_price;
$booking_data['rm_data'][$key]['feature_price_diff'] = (float)($roomType['price_without_reduction']-$feature_price);
}
}
$this->context->smarty->assign(array(
'warning_num' => $warning_num,
'num_days' => $num_days,

View File

@@ -54,9 +54,8 @@ class HistoryControllerCore extends FrontController
{
parent::initContent();
if ($is_htlInst = Module::isInstalled('hotelreservationsystem'))
{
require_once (_PS_MODULE_DIR_.'hotelreservationsystem/define.php');
if ($is_htlInst = Module::isInstalled('hotelreservationsystem')) {
require_once(_PS_MODULE_DIR_.'hotelreservationsystem/define.php');
$advance_payment_active = Configuration::get('WK_ALLOW_ADVANCED_PAYMENT');
$obj_customer_adv = new HotelCustomerAdvancedPayment();
@@ -65,62 +64,54 @@ class HistoryControllerCore extends FrontController
$order_refund_info = array();
if ($advance_payment_active)
if ($advance_payment_active) {
$this->context->smarty->assign('adv_active', $advance_payment_active);
}
}
if ($orders = Order::getCustomerOrders($this->context->customer->id))
{
foreach ($orders as &$order)
{
if ($orders = Order::getCustomerOrders($this->context->customer->id)) {
foreach ($orders as &$order) {
$myOrder = new Order((int)$order['id_order']);
if (Validate::isLoadedObject($myOrder))
{
if (Validate::isLoadedObject($myOrder)) {
$order['virtual'] = $myOrder->isVirtual(false);
}
if ($is_htlInst)
{
if ($is_htlInst) {
//For Advanced Payment
if ($advance_payment_active)
{
if ($advance_payment_active) {
$order_adv_dtl = $obj_customer_adv->getCstAdvPaymentDtlByIdOrder($myOrder->id);
if ($order_adv_dtl)
{
if ($order_adv_dtl) {
$order['due_amount'] = $order_adv_dtl['total_order_amount'] - $order_adv_dtl['total_paid_amount'];
$order['pay_currency'] = $order_adv_dtl['id_currency'];
}
else
{
} else {
$order['due_amount'] = 0;
}
}
// For order Refund
$order_refund_data = $obj_ord_ref_info->getOrderRefundInforDataByOrderId((int)$order['id_order']);
if ($order_refund_data)
{
if ($order_refund_data) {
$waitting = 0;
$accepted = 0;
$refunded = 0;
$rejected = 0;
foreach ($order_refund_data as $key_ref_data => $val_ref_data)
{
if ($val_ref_data['refund_stage_id'] == 1)
foreach ($order_refund_data as $key_ref_data => $val_ref_data) {
if ($val_ref_data['refund_stage_id'] == 1) {
$order_refund_info[$order['id_order']]['waitting'] = ++$waitting;
else if ($val_ref_data['refund_stage_id'] == 2)
} elseif ($val_ref_data['refund_stage_id'] == 2) {
$order_refund_info[$order['id_order']]['accepted'] = ++$accepted;
else if ($val_ref_data['refund_stage_id'] == 3)
} elseif ($val_ref_data['refund_stage_id'] == 3) {
$order_refund_info[$order['id_order']]['refunded'] = ++$refunded;
else if ($val_ref_data['refund_stage_id'] == 4)
} elseif ($val_ref_data['refund_stage_id'] == 4) {
$order_refund_info[$order['id_order']]['rejected'] = ++$rejected;
}
}
}
}
}
}
$this->context->smarty->assign(array(
'order_refund_info' => $order_refund_info,// by webkul
'order_refund_info' => $order_refund_info, // by webkul
'orders' => $orders,
'invoiceAllowed' => (int)Configuration::get('PS_INVOICE'),
'reorderingAllowed' => !(bool)Configuration::get('PS_DISALLOW_HISTORY_REORDERING'),

View File

@@ -0,0 +1,487 @@
<?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

@@ -143,21 +143,16 @@ class OrderConfirmationControllerCore extends FrontController
$cart_htl_data[$type_key]['adult'] = $rm_dtl['adult'];
$cart_htl_data[$type_key]['children'] = $rm_dtl['children'];
// by webkul to calculate rates of the product from hotelreservation syatem tables with feature prices....
$hotelCartBookingData = new HotelCartBookingData();
//END
foreach ($order_bk_data as $data_k => $data_v) {
$date_join = strtotime($data_v['date_from']).strtotime($data_v['date_to']);
/*Product price when order was created*/
$order_details_obj = new OrderDetail($data_v['id_order_detail']);
$unit_price_tax_excl = 0;
$unit_price_tax_incl = 0;
$unit_price_tax_excl = $order_details_obj->unit_price_tax_excl;
$unit_price_tax_incl = $order_details_obj->unit_price_tax_incl;
$prod_ord_dtl_name = $order_details_obj->product_name;
$cart_htl_data[$type_key]['name'] = $prod_ord_dtl_name;
$cart_htl_data[$type_key]['unit_price_tax_excl'] = $unit_price_tax_excl;
$cart_htl_data[$type_key]['unit_price_tax_incl'] = $unit_price_tax_incl;
//work on entring refund data
$obj_ord_ref_info = new HotelOrderRefundInfo();
$ord_refnd_info = $obj_ord_ref_info->getOderRefundInfoByIdOrderIdProductByDate($this->id_order, $type_value['product_id'], $data_v['date_from'], $data_v['date_to']);
@@ -172,13 +167,13 @@ class OrderConfirmationControllerCore extends FrontController
$cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'] += 1;
$num_days = $cart_htl_data[$type_key]['date_diff'][$date_join]['num_days'];
$vart_quant = (int) $cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'] * $num_days;
$var_quant = (int) $cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'];
$amount_tax_excl = $unit_price_tax_excl * $vart_quant;
$amount_tax_incl = $unit_price_tax_incl * $vart_quant;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $amount_tax_incl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $amount_tax_excl;
//// By webkul New way to calculate product prices with feature Prices
$cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_excl'] = $data_v['total_price_tax_excl']/$num_days;
$cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl'] = $data_v['total_price_tax_incl']/$num_days;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $data_v['total_price_tax_incl']*$var_quant;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $data_v['total_price_tax_excl']*$var_quant;
$cart_htl_data[$type_key]['date_diff'][$date_join]['is_backorder'] = $data_v['is_back_order'];
if ($data_v['is_back_order']) {
$any_back_order = 1;
@@ -194,11 +189,11 @@ class OrderConfirmationControllerCore extends FrontController
$cart_htl_data[$type_key]['date_diff'][$date_join]['data_to'] = $data_v['date_to'];
$cart_htl_data[$type_key]['date_diff'][$date_join]['num_days'] = $num_days;
$amount_tax_excl = $unit_price_tax_excl * $num_days;
$amount_tax_incl = $unit_price_tax_incl * $num_days;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $amount_tax_incl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $amount_tax_excl;
// By webkul New way to calculate product prices with feature Prices
$cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_excl'] = $data_v['total_price_tax_excl']/$num_days;
$cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl'] = $data_v['total_price_tax_incl']/$num_days;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $data_v['total_price_tax_incl'];
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $data_v['total_price_tax_excl'];
if ($data_v['is_back_order']) {
$any_back_order = 1;
}
@@ -206,6 +201,13 @@ class OrderConfirmationControllerCore extends FrontController
$cart_htl_data[$type_key]['date_diff'][$date_join]['stage_name'] = $stage_name;
$cart_htl_data[$type_key]['date_diff'][$date_join]['is_backorder'] = $data_v['is_back_order'];
}
$cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_tax_excl'] = $order_details_obj->unit_price_tax_excl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_tax_incl'] = $order_details_obj->unit_price_tax_incl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_excl'] = $order_details_obj->unit_price_tax_excl + $order_details_obj->reduction_amount_tax_excl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] = $order_details_obj->unit_price_tax_incl + $order_details_obj->reduction_amount_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;
}
}
$redirect_link_terms = $this->context->link->getCMSLink(new CMS(3, $this->context->language->id), null, $this->context->language->id);

View File

@@ -110,17 +110,19 @@ class OrderDetailControllerCore extends FrontController
}
if (Validate::isLoadedObject($customer)) {
Mail::Send($this->context->language->id, 'order_customer_comment', Mail::l('Message from a customer'),
array(
'{lastname}' => $customer->lastname,
'{firstname}' => $customer->firstname,
'{email}' => $customer->email,
'{id_order}' => (int) $order->id,
'{order_name}' => $order->getUniqReference(),
'{message}' => Tools::nl2br($msgText),
'{product_name}' => $product_name,
),
$to, $toName, $customer->email, $customer->firstname.' '.$customer->lastname);
Mail::Send(
$this->context->language->id, 'order_customer_comment', Mail::l('Message from a customer'),
array(
'{lastname}' => $customer->lastname,
'{firstname}' => $customer->firstname,
'{email}' => $customer->email,
'{id_order}' => (int) $order->id,
'{order_name}' => $order->getUniqReference(),
'{message}' => Tools::nl2br($msgText),
'{product_name}' => $product_name,
),
$to, $toName, $customer->email, $customer->firstname.' '.$customer->lastname
);
}
if (Tools::getValue('ajax') != 'true') {
@@ -165,18 +167,18 @@ class OrderDetailControllerCore extends FrontController
$amount = Tools::getValue('amount');
$cancellation_reason = Tools::getValue('cancellation_reason');
$obj_htl_ord_ref = new HotelOrderRefundInfo();
$obj_htl_ord_ref->id_order = $id_order;
$obj_htl_ord_ref->id_product = $id_product;
$obj_htl_ord_ref->id_customer = $id_customer;
$obj_htl_ord_ref->id_currency = $id_currency;
$obj_htl_ord_ref->refund_stage_id = 1;
$obj_htl_ord_ref->order_amount = $amount;
$obj_htl_ord_ref->cancellation_reason = $cancellation_reason;
$obj_htl_ord_ref->num_rooms = $num_rooms;
$obj_htl_ord_ref->date_from = $date_from;
$obj_htl_ord_ref->date_to = $date_to;
$obj_htl_ord_ref->save();
$objHtlRefundInfo = new HotelOrderRefundInfo();
$objHtlRefundInfo->id_order = $id_order;
$objHtlRefundInfo->id_product = $id_product;
$objHtlRefundInfo->id_customer = $id_customer;
$objHtlRefundInfo->id_currency = $id_currency;
$objHtlRefundInfo->refund_stage_id = 1;
$objHtlRefundInfo->order_amount = $amount;
$objHtlRefundInfo->cancellation_reason = $cancellation_reason;
$objHtlRefundInfo->num_rooms = $num_rooms;
$objHtlRefundInfo->date_from = $date_from;
$objHtlRefundInfo->date_to = $date_to;
$objHtlRefundInfo->save();
$id_shop = Context::getContext()->shop->id;
@@ -210,7 +212,7 @@ class OrderDetailControllerCore extends FrontController
$temp_path = _PS_MODULE_DIR_.'hotelreservationsystem/mails/';
$template_name = 'request_processed';
if ($obj_htl_ord_ref->id) {
if ($objHtlRefundInfo->id) {
if (Mail::Send($id_lang, $template_name, Mail::l('Order Cancellation Status', $id_lang), $templateVars, $to, null, null, null, null, null, $temp_path, false, null, null)) {
$mail_err = 0;
} else {
@@ -233,24 +235,25 @@ class OrderDetailControllerCore extends FrontController
$id_order = Tools::getValue('id_order');
if (isset($total_order_data) && $total_order_data) {
$objHtlRefund = new HotelOrderRefundInfo();
foreach ($total_order_data as $data_k => $data_v) {
foreach ($data_v['date_diff'] as $rm_k => $rm_v) {
$obj_htl_ord_ref = new HotelOrderRefundInfo();
$exist_info_refund = $obj_htl_ord_ref->getOderRefundInfoByIdOrderIdProductByDate($id_order, $data_v['id_product'], $rm_v['data_form'], $rm_v['data_to']);
$exist_info_refund = $objHtlRefund->getOderRefundInfoByIdOrderIdProductByDate($id_order, $data_v['id_product'], $rm_v['data_form'], $rm_v['data_to']);
// any room existin htl_order_refund_info
// any room existing in htl_order_refund_info
if (!$exist_info_refund) {
$obj_htl_ord_ref->id_order = $id_order;
$obj_htl_ord_ref->id_product = $data_v['id_product'];
$obj_htl_ord_ref->id_customer = $id_customer;
$obj_htl_ord_ref->id_currency = $id_currency;
$obj_htl_ord_ref->refund_stage_id = 1;
$obj_htl_ord_ref->order_amount = $rm_v['amount_tax_incl'];
$obj_htl_ord_ref->cancellation_reason = $cancellation_reason;
$obj_htl_ord_ref->num_rooms = $rm_v['num_rm'];
$obj_htl_ord_ref->date_from = $rm_v['data_form'];
$obj_htl_ord_ref->date_to = $rm_v['data_to'];
$obj_htl_ord_ref->save();
$objHtlRefundInfo = new HotelOrderRefundInfo();
$objHtlRefundInfo->id_order = $id_order;
$objHtlRefundInfo->id_product = $data_v['id_product'];
$objHtlRefundInfo->id_customer = $id_customer;
$objHtlRefundInfo->id_currency = $id_currency;
$objHtlRefundInfo->refund_stage_id = 1;
$objHtlRefundInfo->order_amount = $rm_v['amount_tax_incl'];
$objHtlRefundInfo->cancellation_reason = $cancellation_reason;
$objHtlRefundInfo->num_rooms = $rm_v['num_rm'];
$objHtlRefundInfo->date_from = $rm_v['data_form'];
$objHtlRefundInfo->date_to = $rm_v['data_to'];
$objHtlRefundInfo->save();
}
}
}
@@ -274,16 +277,15 @@ class OrderDetailControllerCore extends FrontController
$temp_path = _PS_MODULE_DIR_.'hotelreservationsystem/mails/';
$template_name = 'total_order_processed';
if ($obj_htl_ord_ref->id) {
if ($objHtlRefundInfo->id) {
if (Mail::Send($id_lang, $template_name, Mail::l('Order Cancellation Status', $id_lang), $templateVars, $to, null, null, null, null, null, $temp_path, false, null, null)) {
$mail_err = 0;
} else {
$mail_err = 1;
}
die(Tools::jsonEncode(array('status' => 'success', 'mail_err' => $mail_err)));
} else {
die(Tools::jsonEncode(array('status' => 'failed', 'mail_err' => $mail_err)));
die(Tools::jsonEncode(array('status' => 'failed')));
}
}
//end
@@ -357,20 +359,20 @@ class OrderDetailControllerCore extends FrontController
$cart_htl_data[$type_key]['adult'] = $rm_dtl['adult'];
$cart_htl_data[$type_key]['children'] = $rm_dtl['children'];
// by webkul to calculate rates of the product from hotelreservation syatem tables with feature prices....
$hotelCartBookingData = new HotelCartBookingData();
//END
foreach ($order_bk_data as $data_k => $data_v) {
$date_join = strtotime($data_v['date_from']).strtotime($data_v['date_to']);
/*Product price when order was created*/
$order_details_obj = new OrderDetail($data_v['id_order_detail']);
$unit_price_tax_excl = 0;
$unit_price_tax_incl = 0;
$unit_price_tax_excl = $order_details_obj->unit_price_tax_excl;
$unit_price_tax_incl = $order_details_obj->unit_price_tax_incl;
$prod_ord_dtl_name = $order_details_obj->product_name;
$cart_htl_data[$type_key]['name'] = $prod_ord_dtl_name;
$cart_htl_data[$type_key]['unit_price_tax_excl'] = $unit_price_tax_excl;
$cart_htl_data[$type_key]['unit_price_tax_incl'] = $unit_price_tax_incl;
$cart_htl_data[$type_key]['paid_unit_price_tax_excl'] = ($order_details_obj->total_price_tax_excl)/$order_details_obj->product_quantity;
$cart_htl_data[$type_key]['paid_unit_price_tax_incl'] = ($order_details_obj->total_price_tax_incl)/$order_details_obj->product_quantity;
//work on entring refund data
$obj_ord_ref_info = new HotelOrderRefundInfo();
@@ -386,13 +388,12 @@ class OrderDetailControllerCore extends FrontController
$cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'] += 1;
$num_days = $cart_htl_data[$type_key]['date_diff'][$date_join]['num_days'];
$vart_quant = (int) $cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'] * $num_days;
$var_quant = (int) $cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'];
$amount_tax_excl = $unit_price_tax_excl * $vart_quant;
$amount_tax_incl = $unit_price_tax_incl * $vart_quant;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $amount_tax_incl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $amount_tax_excl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_excl'] = $data_v['total_price_tax_excl']/$num_days;
$cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl'] = $data_v['total_price_tax_incl']/$num_days;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $data_v['total_price_tax_incl']*$var_quant;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $data_v['total_price_tax_excl']*$var_quant;
$cart_htl_data[$type_key]['date_diff'][$date_join]['is_backorder'] = $data_v['is_back_order'];
if ($data_v['is_back_order']) {
$any_back_order = 1;
@@ -407,11 +408,10 @@ class OrderDetailControllerCore extends FrontController
$cart_htl_data[$type_key]['date_diff'][$date_join]['data_to'] = $data_v['date_to'];
$cart_htl_data[$type_key]['date_diff'][$date_join]['num_days'] = $num_days;
$amount_tax_excl = $unit_price_tax_excl * $num_days;
$amount_tax_incl = $unit_price_tax_incl * $num_days;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $amount_tax_incl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $amount_tax_excl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_excl'] = $data_v['total_price_tax_excl']/$num_days;
$cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl'] = $data_v['total_price_tax_incl']/$num_days;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $data_v['total_price_tax_incl'];
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $data_v['total_price_tax_excl'];
$cart_htl_data[$type_key]['date_diff'][$date_join]['is_backorder'] = $data_v['is_back_order'];
if ($data_v['is_back_order']) {
$any_back_order = 1;
@@ -419,6 +419,14 @@ class OrderDetailControllerCore extends FrontController
//refund_stage
$cart_htl_data[$type_key]['date_diff'][$date_join]['stage_name'] = $stage_name;
}
$cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_tax_excl'] = $order_details_obj->unit_price_tax_excl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_tax_incl'] = $order_details_obj->unit_price_tax_incl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_excl'] = $order_details_obj->unit_price_tax_excl + $order_details_obj->reduction_amount_tax_excl;
$cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] = $order_details_obj->unit_price_tax_incl + $order_details_obj->reduction_amount_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;
}
}
$redirect_link_terms = $this->context->link->getCMSLink(new CMS(3, $this->context->language->id), null, $this->context->language->id);

File diff suppressed because it is too large Load Diff

View File

@@ -276,21 +276,35 @@ class ProductControllerCore extends FrontController
if ($hotel_room_data) {
if ($total_available_rooms >= $quantity) {
$priceDisplay = Group::getPriceDisplayMethod(Group::getCurrent()->id);
if (!$priceDisplay || $priceDisplay == 2) {
$price_tax = true;
} elseif ($priceDisplay == 1) {
$price_tax = false;
}
$useTax = HotelBookingDetail::useTax();
$product = new Product($id_product);
$productPriceWithoutReduction = $product->getPriceWithoutReduct(!$useTax);
$obj_booking_detail = new HotelBookingDetail();
$num_days = $obj_booking_detail->getNumberOfDays($date_from, $date_to);
$price_tax_incl = Product::getPriceStatic($id_product, $price_tax);
$total_price = $price_tax_incl * $num_days * $quantity;
$roomTypeDateRangePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($id_product, $date_from, $date_to);
if ($useTax) {
$priceProduct = Product::getPriceStatic($id_product, true);
$feature_price = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay($id_product, $date_from, $date_to, true);
$roomTypeDateRangePrice = $roomTypeDateRangePrice['total_price_tax_incl'];
} else {
$priceProduct = Product::getPriceStatic($id_product, false);
$feature_price = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay($id_product, $date_from, $date_to, false);
$roomTypeDateRangePrice = $roomTypeDateRangePrice['total_price_tax_excl'];
}
$feature_price_diff = (float)($productPriceWithoutReduction - $feature_price);
//$price_tax_incl = Product::getPriceStatic($id_product, $price_tax);
$total_price = $roomTypeDateRangePrice * $quantity;
$result['msg'] = 'success';
$result['total_price'] = $total_price;
$result['num_days'] = $num_days;
$result['avail_rooms'] = $total_available_rooms;
$result['original_product_price'] = $priceProduct;
$result['feature_price'] = $feature_price;
$result['feature_price_diff'] = $feature_price_diff;
return Tools::jsonEncode($result);
} else {
$result['msg'] = 'unavailable_quantity';
@@ -326,7 +340,6 @@ class ProductControllerCore extends FrontController
public function initContent()
{
parent::initContent();
if (!$this->errors) {
if (Pack::isPack((int) $this->product->id) && !Pack::isInStock((int) $this->product->id)) {
$this->product->quantity = 0;
@@ -423,6 +436,7 @@ class ProductControllerCore extends FrontController
$obj_hotel_room_type = new HotelRoomType();
$room_info_by_product_id = $obj_hotel_room_type->getRoomTypeInfoByIdProduct($this->product->id);
$hotel_id = $room_info_by_product_id['id_hotel'];
$useTax = HotelBookingDetail::useTax();
if (isset($hotel_id) && $hotel_id) {
$obj_hotel_branch = new HotelBranchInformation();
$hotel_info_by_id = $obj_hotel_branch->hotelBranchInfoById($hotel_id);
@@ -454,15 +468,23 @@ class ProductControllerCore extends FrontController
$date_to = date('Y-m-d', strtotime($date_from) + 86400);
}
$obj_htl_cart_booking_data = new HotelCartBookingData();
$obj_booking_detail = new HotelBookingDetail();
$num_days = $obj_booking_detail->getNumberOfDays($date_from, $date_to);
$price_tax_incl = Product::getPriceStatic($this->product->id, HotelBookingDetail::useTax());
$total_price = $price_tax_incl * $num_days;
//$price_tax_incl = Product::getPriceStatic($this->product->id, HotelBookingDetail::useTax());
//$total_price = $price_tax_incl * $num_days;
//
//// By webkul New way to calculate product prices with feature Prices
$roomTypeDateRangePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($this->product->id, $date_from, $date_to);
if ($useTax) {
$total_price = $roomTypeDateRangePrice['total_price_tax_incl'];
} else {
$total_price = $roomTypeDateRangePrice['total_price_tax_excl'];
}
//END
$obj_booking_dtl = new HotelBookingDetail();
$hotel_room_data = $obj_booking_dtl->DataForFrontSearch($date_from, $date_to, $hotel_id, $this->product->id, 1);
$obj_htl_cart_booking_data = new HotelCartBookingData();
if ($hotel_room_data) {
$total_available_rooms = $hotel_room_data['stats']['num_avail'];
@@ -511,7 +533,6 @@ class ProductControllerCore extends FrontController
);
}
$this->context->smarty->assign(array(
'booking_date_to' => $date_to,
'max_order_date' => $max_order_date,
'warning_num' => $warning_num,
'ratting_img_path' => _MODULE_DIR_.'hotelreservationsystem/views/img/Slices/icons-sprite.png',
@@ -521,8 +542,8 @@ class ProductControllerCore extends FrontController
'total_price' => $total_price,
'product_controller_url' => $this->context->link->getPageLink('product'),
'num_days' => $num_days,
'date_from' => date('d-m-Y', strtotime($date_from)),
'date_to' => date('d-m-Y', strtotime($date_to)),
'date_from' => $date_from,
'date_to' => $date_to,
'hotel_location' => $hotel_location,
'hotel_name' => $hotel_name,
'hotel_policies' => $hotel_policies,
@@ -530,10 +551,24 @@ class ProductControllerCore extends FrontController
'ftr_img_src' => _PS_IMG_.'rf/',
'search_data' => $search_data,
));
// product price after imposing feature prices...
if ($useTax) {
$priceProduct = Product::getPriceStatic($this->product->id, true);
$feature_price = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay($this->product->id, $date_from, $date_to, true);
} else {
$priceProduct = Product::getPriceStatic($this->product->id, false);
$feature_price = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay($this->product->id, $date_from, $date_to, false);
}
$productPriceWithoutReduction = $this->product->getPriceWithoutReduct(!$useTax);
$feature_price_diff = (float)($productPriceWithoutReduction - $feature_price);
$this->context->smarty->assign('feature_price', $feature_price);
$this->context->smarty->assign('feature_price_diff', $feature_price_diff);
//END
}
$this->context->smarty->assign('product_id_hotel', $hotel_id);
$this->context->smarty->assign(array(
'stock_management' => Configuration::get('PS_STOCK_MANAGEMENT'),
'customizationFields' => $customization_fields,
'id_customization' => empty($customization_datas) ? null : $customization_datas[0]['id_customization'],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
img/logo_mail.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
img/logo_stores.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -1129,6 +1129,7 @@ CREATE TABLE `PREFIX_orders` (
`delivery_number` int(10) unsigned NOT NULL DEFAULT '0',
`invoice_date` datetime NOT NULL,
`delivery_date` datetime NOT NULL,
`source` varchar(255) DEFAULT NULL,
`valid` int(1) unsigned NOT NULL DEFAULT '0',
`date_add` datetime NOT NULL,
`date_upd` datetime NOT NULL,

File diff suppressed because it is too large Load Diff

View File

@@ -602,6 +602,47 @@ class InstallModelInstall extends InstallAbstractModel
Configuration::updateGlobalValue('PS_REWRITING_SETTINGS', 0);
}
$qloData = [
'shopDomain' => Tools::getHttpHost(),
'shopDomainSsl' => Tools::getHttpHost(),
'physicalUri' => __PS_BASE_URI__,
'email' => $data['admin_email'],
'firstname' => Tools::ucfirst($data['admin_firstname']),
'lastname' => Tools::ucfirst($data['admin_lastname']),
'countryCode' => $data['shop_country'],
];
// Qlo Notification
$this->setNotification($qloData);
return true;
}
public function setNotification($notificationData)
{
if (function_exists('curl_version')) {
$params = [
'url' => 'https://prestashop.webkul.com/hotel-reservation-clients/getNotification.php',
'method' => 'POST',
'headers' => 'Content-Type: application/json',
'postdata' => json_encode($notificationData),
];
$curlInit = curl_init();
curl_setopt($curlInit, CURLOPT_URL, $params['url']);
curl_setopt($curlInit, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curlInit, CURLOPT_HTTPHEADER,$params['headers']);
curl_setopt($curlInit, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curlInit, CURLOPT_CUSTOMREQUEST, $params['method']);
curl_setopt($curlInit, CURLOPT_RETURNTRANSFER, 1);
if (isset($params['postdata'])) {
curl_setopt( $curlInit, CURLOPT_POSTFIELDS, $params['postdata']);
}
$response = curl_exec($curlInit);
} else {
// Mail Code
}
return true;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -333,7 +333,7 @@ div.field {
float:left;
margin:5px 0 0 10px;
height: 51px;
width: 192px;
width: 278px;
text-indent: -5000px;
background:transparent url(img/logo.png) no-repeat 0 0;
}

View File

@@ -1,20 +1,20 @@
<?php $this->displayTemplate('header') ?>
<?php if (Tools::getMemoryLimit() < Tools::getOctets('32M')): ?>
<div class="warnBlock"><?php echo $this->l('PrestaShop requires at least 32 MB of memory to run: please check the memory_limit directive in your php.ini file or contact your host provider about this.'); ?></div>
<div class="warnBlock"><?php echo $this->l('QloApps requires at least 32 MB of memory to run: please check the memory_limit directive in your php.ini file or contact your host provider about this.'); ?></div>
<?php endif; ?>
<?php if ($this->can_upgrade): ?>
<div class="warnBlock">
<img src="theme/img/pict_error.png" alt="" style="vertical-align: middle;" /> &nbsp;
<?php echo $this->l(
'<b>Warning: You cannot use this tool to upgrade your store anymore.</b><br /><br />You already have <b>PrestaShop version %1$s installed</b>.<br /><br />If you want to upgrade to the latest version, please read our documentation: <a href="%2$s">%2$s</a>',
'<b>Warning: You cannot use this tool to upgrade your store anymore.</b><br /><br />You already have <b>QloApps version %1$s installed</b>.<br /><br />If you want to upgrade to the latest version, please read our documentation: <a href="%2$s">%2$s</a>',
$this->ps_version, $this->getDocumentationUpgradeLink()
) ?></div>
<?php endif; ?>
<h2><?php echo $this->l('Welcome to the PrestaShop %s Installer', _PS_INSTALL_VERSION_) ?></h2>
<p><?php echo $this->l('Installing PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 250,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.') ?></p>
<h2><?php echo $this->l('Welcome to the QloApps %s Installer', _PS_INSTALL_VERSION_) ?></h2>
<p><?php echo $this->l('Installing QloApps is quick and easy. In just a few moments, you will become part of a community consisting of more than 250,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.') ?></p>
<p><?php echo $this->l('If you need help, do not hesitate to <a href="%1$s" target="_blank">watch this short tutorial</a>, or check <a href="%2$s" target="_blank">our documentation</a>.', $this->getTutorialLink(), $this->getDocumentationLink()) ?></p>
<!-- List of languages -->

View File

@@ -1,26 +1,26 @@
/*
*
* 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
*/
*
* 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
*/
// This variables are defined in the dashboard view.tpl
// dashboard_ajax_url
@@ -30,295 +30,280 @@
// read_more
function refreshDashboard(module_name, use_push, extra) {
var module_list = [];
this.getWidget = function(module_id) {
$.ajax({
url : dashboard_ajax_url,
data : {
ajax: true,
action:'refreshDashboard',
module: module_list[module_id],
dashboard_use_push: Number(use_push),
extra: extra
},
// Ensure to get fresh data
headers: { "cache-control": "no-cache" },
cache: false,
global: false,
dataType: 'json',
success : function(widgets){
for (var widget_name in widgets) {
for (var data_type in widgets[widget_name]) {
window[data_type](widget_name, widgets[widget_name][data_type]);
}
}
if (parseInt(dashboard_use_push) === 1) {
refreshDashboard(false, true);
}
},
contentType: 'application/json'
});
};
if (module_name === false) {
$('.widget').each( function () {
module_list.push($(this).attr('id'));
if (!use_push) {
$(this).addClass('loading');
}
});
}
else {
module_list.push(module_name);
if (!use_push) {
$('#'+module_name+' section').each( function (){
$(this).addClass('loading');
});
}
}
for (var module_id in module_list) {
if (use_push && !$('#'+module_list[module_id]).hasClass('allow_push')) {
continue;
}
this.getWidget(module_id);
}
var module_list = [];
this.getWidget = function(module_id) {
$.ajax({
url: dashboard_ajax_url,
data: {
ajax: true,
action: 'refreshDashboard',
module: module_list[module_id],
dashboard_use_push: Number(use_push),
extra: extra
},
// Ensure to get fresh data
headers: { "cache-control": "no-cache" },
cache: false,
global: false,
dataType: 'json',
success: function(widgets) {
for (var widget_name in widgets) {
for (var data_type in widgets[widget_name]) {
window[data_type](widget_name, widgets[widget_name][data_type]);
}
}
if (parseInt(dashboard_use_push) === 1) {
refreshDashboard(false, true);
}
},
contentType: 'application/json'
});
};
if (module_name === false) {
$('.widget').each(function() {
module_list.push($(this).attr('id'));
if (!use_push) {
$(this).addClass('loading');
}
});
} else {
module_list.push(module_name);
if (!use_push) {
$('#' + module_name + ' section').each(function() {
$(this).addClass('loading');
});
}
}
for (var module_id in module_list) {
if (use_push && !$('#' + module_list[module_id]).hasClass('allow_push')) {
continue;
}
this.getWidget(module_id);
}
}
function setDashboardDateRange(action) {
$('#datepickerFrom, #datepickerTo').parent('.input-group').removeClass('has-error');
var data = 'ajax=true&action=setDashboardDateRange&submitDatePicker=true&'+$('#calendar_form').serialize()+'&'+action+'=1';
$.ajax({
url : adminstats_ajax_url,
data : data,
dataType: 'json',
type: 'POST',
success : function(jsonData){
if (!jsonData.has_errors) {
refreshDashboard(false, false);
$('#datepickerFrom').val(jsonData.date_from);
$('#datepickerTo').val(jsonData.date_to);
}
else {
$('#datepickerFrom, #datepickerTo').parent('.input-group').addClass('has-error');
}
}
});
$('#datepickerFrom, #datepickerTo').parent('.input-group').removeClass('has-error');
var data = 'ajax=true&action=setDashboardDateRange&submitDatePicker=true&' + $('#calendar_form').serialize() + '&' + action + '=1';
$.ajax({
url: adminstats_ajax_url,
data: data,
dataType: 'json',
type: 'POST',
success: function(jsonData) {
if (!jsonData.has_errors) {
refreshDashboard(false, false);
$('#datepickerFrom').val(jsonData.date_from);
$('#datepickerTo').val(jsonData.date_to);
} else {
$('#datepickerFrom, #datepickerTo').parent('.input-group').addClass('has-error');
}
}
});
}
function data_value(widget_name, data) {
for (var data_id in data) {
$('#'+data_id+' ').html(data[data_id]);
$('#'+data_id+', #'+widget_name).closest('section').removeClass('loading');
}
for (var data_id in data) {
$('#' + data_id + ' ').html(data[data_id]);
$('#' + data_id + ', #' + widget_name).closest('section').removeClass('loading');
}
}
function data_trends(widget_name, data) {
for (var data_id in data) {
this.el = $('#'+data_id);
this.el.html(data[data_id].value);
if (data[data_id].way === 'up') {
this.el.parent().removeClass('dash_trend_down').removeClass('dash_trend_right').addClass('dash_trend_up');
}
else if (data[data_id].way === 'down') {
this.el.parent().removeClass('dash_trend_up').removeClass('dash_trend_right').addClass('dash_trend_down');
}
else {
this.el.parent().removeClass('dash_trend_down').removeClass('dash_trend_up').addClass('dash_trend_right');
}
this.el.closest('section').removeClass('loading');
}
for (var data_id in data) {
this.el = $('#' + data_id);
this.el.html(data[data_id].value);
if (data[data_id].way === 'up') {
this.el.parent().removeClass('dash_trend_down').removeClass('dash_trend_right').addClass('dash_trend_up');
} else if (data[data_id].way === 'down') {
this.el.parent().removeClass('dash_trend_up').removeClass('dash_trend_right').addClass('dash_trend_down');
} else {
this.el.parent().removeClass('dash_trend_down').removeClass('dash_trend_up').addClass('dash_trend_right');
}
this.el.closest('section').removeClass('loading');
}
}
function data_table(widget_name, data) {
for (var data_id in data) {
//fill header
var tr = '<tr>';
for (var header in data[data_id].header) {
var head = data[data_id].header[header];
var th = '<th '+ (head.class ? ' class="'+head.class+'" ' : '' )+ ' '+(head.id ? ' id="'+head.id+'" ' : '' )+'>';
th += (head.wrapper_start ? ' '+head.wrapper_start+' ' : '' );
th += head.title;
th += (head.wrapper_stop ? ' '+head.wrapper_stop+' ' : '' );
th += '</th>';
tr += th;
}
tr += '</tr>';
$('#'+data_id+' thead').html(tr);
for (var data_id in data) {
//fill header
var tr = '<tr>';
for (var header in data[data_id].header) {
var head = data[data_id].header[header];
var th = '<th ' + (head.class ? ' class="' + head.class + '" ' : '') + ' ' + (head.id ? ' id="' + head.id + '" ' : '') + '>';
th += (head.wrapper_start ? ' ' + head.wrapper_start + ' ' : '');
th += head.title;
th += (head.wrapper_stop ? ' ' + head.wrapper_stop + ' ' : '');
th += '</th>';
tr += th;
}
tr += '</tr>';
$('#' + data_id + ' thead').html(tr);
//fill body
$('#'+data_id+' tbody').html('');
//fill body
$('#' + data_id + ' tbody').html('');
if(typeof data[data_id].body === 'string') {
$('#'+data_id+' tbody').html('<tr><td class="text-center" colspan="'+data[data_id].header.length+'"><br/>'+data[data_id].body+'</td></tr>');
}
else if (data[data_id].body.length) {
for (var body_content_id in data[data_id].body) {
tr = '<tr>';
for (var body_content in data[data_id].body[body_content_id]) {
var body = data[data_id].body[body_content_id][body_content];
var td = '<td '+ (body.class ? ' class="'+body.class+'" ' : '' )+ ' '+(body.id ? ' id="'+body.id+'" ' : '' )+'>';
td += (body.wrapper_start ? ' '+body.wrapper_start+' ' : '' );
td += body.value;
td += (body.wrapper_stop ? ' '+body.wrapper_stop+' ' : '' );
td += '</td>';
tr += td;
}
tr += '</tr>';
$('#'+data_id+' tbody').append(tr);
}
}
else {
$('#'+data_id+' tbody').html('<tr><td class="text-center" colspan="'+data[data_id].header.length+'">'+no_results_translation+'</td></tr>');
}
}
if (typeof data[data_id].body === 'string') {
$('#' + data_id + ' tbody').html('<tr><td class="text-center" colspan="' + data[data_id].header.length + '"><br/>' + data[data_id].body + '</td></tr>');
} else if (data[data_id].body.length) {
for (var body_content_id in data[data_id].body) {
tr = '<tr>';
for (var body_content in data[data_id].body[body_content_id]) {
var body = data[data_id].body[body_content_id][body_content];
var td = '<td ' + (body.class ? ' class="' + body.class + '" ' : '') + ' ' + (body.id ? ' id="' + body.id + '" ' : '') + '>';
td += (body.wrapper_start ? ' ' + body.wrapper_start + ' ' : '');
td += body.value;
td += (body.wrapper_stop ? ' ' + body.wrapper_stop + ' ' : '');
td += '</td>';
tr += td;
}
tr += '</tr>';
$('#' + data_id + ' tbody').append(tr);
}
} else {
$('#' + data_id + ' tbody').html('<tr><td class="text-center" colspan="' + data[data_id].header.length + '">' + no_results_translation + '</td></tr>');
}
}
}
function data_chart(widget_name, charts) {
for (var chart_id in charts) {
window[charts[chart_id].chart_type](widget_name, charts[chart_id]);
}
for (var chart_id in charts) {
window[charts[chart_id].chart_type](widget_name, charts[chart_id]);
}
}
function data_list_small(widget_name, data) {
for (var data_id in data)
{
$('#'+data_id).html('');
for (var item in data[data_id]) {
$('#'+data_id).append('<li><span class="data_label">'+item+'</span><span class="data_value size_s">'+data[data_id][item]+'</span></li>');
}
$('#'+data_id+', #'+widget_name).closest('section').removeClass('loading');
}
for (var data_id in data) {
$('#' + data_id).html('');
for (var item in data[data_id]) {
$('#' + data_id).append('<li><span class="data_label">' + item + '</span><span class="data_value size_s">' + data[data_id][item] + '</span></li>');
}
$('#' + data_id + ', #' + widget_name).closest('section').removeClass('loading');
}
}
function getBlogRss() {
$.ajax({
url : dashboard_ajax_url,
data : {
ajax:true,
action:'getBlogRss'
},
dataType: 'json',
success : function(jsonData) {
if (typeof jsonData !== 'undefined' && jsonData !== null && !jsonData.has_errors) {
for (var article in jsonData.rss) {
var article_html = '<article><h4><a href="'+jsonData.rss[article].link+'" class="_blank" onclick="return !window.open(this.href);">'+jsonData.rss[article].title+'</a></h4><span class="dash-news-date text-muted">'+jsonData.rss[article].date+'</span><p>'+jsonData.rss[article].short_desc+' <a href="'+jsonData.rss[article].link+'">'+read_more+'</a><p></article><hr/>';
$('.dash_news .dash_news_content').append(article_html);
}
}
else {
$('.dash_news').hide();
}
}
});
$.ajax({
url: dashboard_ajax_url,
data: {
ajax: true,
action: 'getBlogRss'
},
dataType: 'json',
success: function(jsonData) {
if (typeof jsonData !== 'undefined' && jsonData !== null && !jsonData.has_errors) {
for (var article in jsonData.rss) {
var article_html = '<article><h4><a href="' + jsonData.rss[article].link + '" class="_blank" onclick="return !window.open(this.href);">' + jsonData.rss[article].title + '</a></h4><span class="dash-news-date text-muted">' + jsonData.rss[article].date + '</span><p>' + jsonData.rss[article].short_desc + ' <a href="' + jsonData.rss[article].link + '">' + read_more + '</a><p></article><hr/>';
$('.dash_news .dash_news_content').append(article_html);
}
} else {
$('.dash_news').hide();
}
}
});
}
function toggleDashConfig(widget) {
var func_name = widget + '_toggleDashConfig';
if ($('#'+widget+' section.dash_config').hasClass('hide'))
{
$('#'+widget+' section').not('.dash_config').slideUp(500, function () {
$('#'+widget+' section.dash_config').fadeIn(500).removeClass('hide');
if (window[func_name] != undefined)
window[func_name]();
});
}
else
{
$('#'+widget+' section.dash_config').slideUp(500, function () {
$('#'+widget+' section').not('.dash_config').slideDown(500).removeClass('hide');
$('#'+widget+' section.dash_config').addClass('hide');
if (window[func_name] != undefined)
window[func_name]();
});
}
var func_name = widget + '_toggleDashConfig';
if ($('#' + widget + ' section.dash_config').hasClass('hide')) {
$('#' + widget + ' section').not('.dash_config').slideUp(500, function() {
$('#' + widget + ' section.dash_config').fadeIn(500).removeClass('hide');
if (window[func_name] != undefined)
window[func_name]();
});
} else {
$('#' + widget + ' section.dash_config').slideUp(500, function() {
$('#' + widget + ' section').not('.dash_config').slideDown(500).removeClass('hide');
$('#' + widget + ' section.dash_config').addClass('hide');
if (window[func_name] != undefined)
window[func_name]();
});
}
}
function bindSubmitDashConfig() {
$('.submit_dash_config').on('click', function () {
saveDashConfig($(this).closest('section.widget').attr('id'));
return false;
});
$('.submit_dash_config').on('click', function() {
saveDashConfig($(this).closest('section.widget').attr('id'));
return false;
});
}
function bindCancelDashConfig() {
$('.cancel_dash_config').on('click', function () {
toggleDashConfig($(this).closest('section.widget').attr('id'));
return false;
});
$('.cancel_dash_config').on('click', function() {
toggleDashConfig($(this).closest('section.widget').attr('id'));
return false;
});
}
function saveDashConfig(widget_name) {
$('section#'+widget_name+' .form-group').removeClass('has-error');
$('#'+widget_name+'_errors').remove();
configs = '';
$('section#' + widget_name + ' .form-group').removeClass('has-error');
$('#' + widget_name + '_errors').remove();
configs = '';
$('#'+widget_name+' form input, #'+widget_name+' form textarea , #'+widget_name+' form select').each( function () {
if ($(this).attr('type') === 'radio' && !$(this).attr('checked')) {
return;
}
configs += '&configs['+$(this).attr('name')+']='+$(this).val();
});
$('#' + widget_name + ' form input, #' + widget_name + ' form textarea , #' + widget_name + ' form select').each(function() {
if ($(this).attr('type') === 'radio' && !$(this).attr('checked')) {
return;
}
configs += '&configs[' + $(this).attr('name') + ']=' + $(this).val();
});
data = 'ajax=true&action=saveDashConfig&module='+widget_name+configs+'&hook='+$('#'+widget_name).closest('[id^=hook]').attr('id');
data = 'ajax=true&action=saveDashConfig&module=' + widget_name + configs + '&hook=' + $('#' + widget_name).closest('[id^=hook]').attr('id');
$.ajax({
url : dashboard_ajax_url,
data : data,
dataType: 'json',
error: function(XMLHttpRequest, textStatus, errorThrown) {
jAlert("TECHNICAL ERROR: \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
},
success : function(jsonData){
$.ajax({
url: dashboard_ajax_url,
data: data,
dataType: 'json',
error: function(XMLHttpRequest, textStatus, errorThrown) {
jAlert("TECHNICAL ERROR: \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
},
success: function(jsonData) {
if (!jsonData.has_errors)
{
$('#'+widget_name).find('section').not('.dash_config').remove();
$('#'+widget_name).append($(jsonData.widget_html).find('section').not('.dash_config'));
refreshDashboard(widget_name);
toggleDashConfig(widget_name);
}
else
{
errors_str = '<div class="alert alert-danger" id="'+widget_name+'_errors">';
for (error in jsonData.errors)
{
errors_str += jsonData.errors[error]+'<br/>';
$('#'+error).closest('.form-group').addClass('has-error');
}
errors_str += '</div>';
$('section#'+widget_name+'_config header').after(errors_str);
errors_str += '</div>';
}
}
});
if (!jsonData.has_errors) {
$('#' + widget_name).find('section').not('.dash_config').remove();
$('#' + widget_name).append($(jsonData.widget_html).find('section').not('.dash_config'));
refreshDashboard(widget_name);
toggleDashConfig(widget_name);
} else {
errors_str = '<div class="alert alert-danger" id="' + widget_name + '_errors">';
for (error in jsonData.errors) {
errors_str += jsonData.errors[error] + '<br/>';
$('#' + error).closest('.form-group').addClass('has-error');
}
errors_str += '</div>';
$('section#' + widget_name + '_config header').after(errors_str);
errors_str += '</div>';
}
}
});
}
$(document).ready( function () {
$('#calendar_form input[type="submit"]').on('click', function(elt) {
elt.preventDefault();
setDashboardDateRange(elt.currentTarget.name);
});
$(document).ready(function() {
$('#calendar_form input[type="submit"]').on('click', function(elt) {
elt.preventDefault();
setDashboardDateRange(elt.currentTarget.name);
});
refreshDashboard(false, false);
getBlogRss();
bindSubmitDashConfig();
bindCancelDashConfig();
refreshDashboard(false, false);
getBlogRss();
bindSubmitDashConfig();
bindCancelDashConfig();
$('#page-header-desc-configuration-switch_demo').tooltip().click(function(e) {
$.ajax({
url : dashboard_ajax_url,
data : {
ajax:true,
action:'setSimulationMode',
PS_DASHBOARD_SIMULATION: $(this).find('i').hasClass('process-icon-toggle-on') ? 0 : 1
},
success : function(result) {
if ($('#page-header-desc-configuration-switch_demo i').hasClass('process-icon-toggle-on')) {
$('#page-header-desc-configuration-switch_demo i').removeClass('process-icon-toggle-on').addClass('process-icon-toggle-off');
} else {
$('#page-header-desc-configuration-switch_demo i').removeClass('process-icon-toggle-off').addClass('process-icon-toggle-on');
}
refreshDashboard(false, false);
}
});
});
});
$('#page-header-desc-configuration-switch_demo').tooltip().click(function(e) {
$.ajax({
url: dashboard_ajax_url,
data: {
ajax: true,
action: 'setSimulationMode',
PS_DASHBOARD_SIMULATION: $(this).find('i').hasClass('process-icon-toggle-on') ? 0 : 1
},
success: function(result) {
if ($('#page-header-desc-configuration-switch_demo i').hasClass('process-icon-toggle-on')) {
$('#page-header-desc-configuration-switch_demo i').removeClass('process-icon-toggle-on').addClass('process-icon-toggle-off');
} else {
$('#page-header-desc-configuration-switch_demo i').removeClass('process-icon-toggle-off').addClass('process-icon-toggle-on');
}
refreshDashboard(false, false);
}
});
});
});

View File

@@ -389,8 +389,8 @@ function init()
$('#add_product_product_price_tax_excl').val(data.price_tax_excl);
//Added by webkul to set curent date in the date fields by default
var date_in = $.datepicker.formatDate('d M yy', new Date());
var date_out = $.datepicker.formatDate('d M yy', new Date(new Date().getTime()+24*60*60*1000));
var date_in = $.datepicker.formatDate('dd-mm-yy', new Date());
var date_out = $.datepicker.formatDate('dd-mm-yy', new Date(new Date().getTime()+24*60*60*1000));
var tr_product = $(this).closest('#new_product');
tr_product.find("input.add_product_date_from").val(date_in);
tr_product.find("input.add_product_date_to").val(date_out);
@@ -894,23 +894,23 @@ function init()
{
showOtherMonths: true,
dateFormat: 'dd-mm-yy',
onClose: function( selectedDate )
{
var selectedDate = new Date(selectedDate);
selectedDate.setDate(selectedDate.getDate()+1);
$( ".add_product_date_to" ).datepicker( "option", "minDate", selectedDate );
}
onSelect: function(selectedDate) {
var date_format = selectedDate.split("-");
var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(date_format[2], date_format[1] - 1, date_format[0])));
selectedDate.setDate(selectedDate.getDate() + 1);
$(".add_product_date_to").datepicker("option", "minDate", selectedDate);
},
});
$(".add_product_date_to").datepicker(
{
showOtherMonths: true,
dateFormat: 'dd-mm-yy',
onClose: function( selectedDate )
{
var selectedDate = new Date(selectedDate);
onSelect: function(selectedDate) {
var date_format = selectedDate.split("-");
var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(date_format[2], date_format[1] - 1, date_format[0])));
selectedDate.setDate(selectedDate.getDate() - 1);
$( ".add_product_date_from" ).datepicker( "option", "maxDate", selectedDate );
$(".add_product_date_from").datepicker("option", "maxDate", selectedDate);
}
});
/*End*/

View File

@@ -0,0 +1,59 @@
{if !empty($list)}
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Total Paid</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="4" face="Open-sans, sans-serif" color="#555454">
{$list['total_paid_amount']}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Total Due</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="4" face="Open-sans, sans-serif" color="#555454">
{$list['total_due_amount']}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
{/if}

View File

@@ -0,0 +1,11 @@
{if !empty($list)}
TOTAL PAID
{$list['total_paid_amount']}
TOTAL DUE
{$list['total_due_amount']}
{/if}

View File

@@ -0,0 +1,59 @@
{if !empty($list)}
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Total Paid</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="4" face="Open-sans, sans-serif" color="#555454">
{$list['total_paid_amount']}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Total Due</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="4" face="Open-sans, sans-serif" color="#555454">
{$list['total_due_amount']}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
{/if}

View File

@@ -0,0 +1,11 @@
{if !empty($list)}
TOTAL PAID
{$list['total_paid_amount']}
TOTAL DUE
{$list['total_due_amount']}
{/if}

View File

@@ -24,258 +24,273 @@
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_'))
exit;
class BankWire extends PaymentModule
{
protected $_html = '';
protected $_postErrors = array();
public $details;
public $owner;
public $address;
public $extra_mail_vars;
public function __construct()
{
$this->name = 'bankwire';
$this->tab = 'payments_gateways';
$this->version = '1.1.0';
$this->author = 'PrestaShop';
$this->controllers = array('payment', 'validation');
$this->is_eu_compatible = 1;
$this->currencies = true;
$this->currencies_mode = 'checkbox';
$config = Configuration::getMultiple(array('BANK_WIRE_DETAILS', 'BANK_WIRE_OWNER', 'BANK_WIRE_ADDRESS'));
if (!empty($config['BANK_WIRE_OWNER']))
$this->owner = $config['BANK_WIRE_OWNER'];
if (!empty($config['BANK_WIRE_DETAILS']))
$this->details = $config['BANK_WIRE_DETAILS'];
if (!empty($config['BANK_WIRE_ADDRESS']))
$this->address = $config['BANK_WIRE_ADDRESS'];
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l('Bank wire');
$this->description = $this->l('Accept payments for your products via bank wire transfer.');
$this->confirmUninstall = $this->l('Are you sure about removing these details?');
if (!isset($this->owner) || !isset($this->details) || !isset($this->address))
$this->warning = $this->l('Account owner and account details must be configured before using this module.');
if (!count(Currency::checkPaymentCurrencies($this->id)))
$this->warning = $this->l('No currency has been set for this module.');
$this->extra_mail_vars = array(
'{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'),
'{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')),
'{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS'))
);
}
public function install()
{
if (!parent::install() || !$this->registerHook('payment') || ! $this->registerHook('displayPaymentEU') || !$this->registerHook('paymentReturn'))
return false;
return true;
}
public function uninstall()
{
if (!Configuration::deleteByName('BANK_WIRE_DETAILS')
|| !Configuration::deleteByName('BANK_WIRE_OWNER')
|| !Configuration::deleteByName('BANK_WIRE_ADDRESS')
|| !parent::uninstall())
return false;
return true;
}
protected function _postValidation()
{
if (Tools::isSubmit('btnSubmit'))
{
if (!Tools::getValue('BANK_WIRE_DETAILS'))
$this->_postErrors[] = $this->l('Account details are required.');
elseif (!Tools::getValue('BANK_WIRE_OWNER'))
$this->_postErrors[] = $this->l('Account owner is required.');
}
}
protected function _postProcess()
{
if (Tools::isSubmit('btnSubmit'))
{
Configuration::updateValue('BANK_WIRE_DETAILS', Tools::getValue('BANK_WIRE_DETAILS'));
Configuration::updateValue('BANK_WIRE_OWNER', Tools::getValue('BANK_WIRE_OWNER'));
Configuration::updateValue('BANK_WIRE_ADDRESS', Tools::getValue('BANK_WIRE_ADDRESS'));
}
$this->_html .= $this->displayConfirmation($this->l('Settings updated'));
}
protected function _displayBankWire()
{
return $this->display(__FILE__, 'infos.tpl');
}
public function getContent()
{
if (Tools::isSubmit('btnSubmit'))
{
$this->_postValidation();
if (!count($this->_postErrors))
$this->_postProcess();
else
foreach ($this->_postErrors as $err)
$this->_html .= $this->displayError($err);
}
else
$this->_html .= '<br />';
$this->_html .= $this->_displayBankWire();
$this->_html .= $this->renderForm();
return $this->_html;
}
public function hookPayment($params)
{
if (!$this->active)
return;
if (!$this->checkCurrency($params['cart']))
return;
$this->smarty->assign(array(
'this_path' => $this->_path,
'this_path_bw' => $this->_path,
'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/'
));
return $this->display(__FILE__, 'payment.tpl');
}
public function hookDisplayPaymentEU($params)
{
if (!$this->active)
return;
if (!$this->checkCurrency($params['cart']))
return;
$payment_options = array(
'cta_text' => $this->l('Pay by Bank Wire'),
'logo' => Media::getMediaPath(dirname(__FILE__).'/bankwire.jpg'),
'action' => $this->context->link->getModuleLink($this->name, 'validation', array(), true)
);
return $payment_options;
}
public function hookPaymentReturn($params)
{
if (!$this->active)
return;
$state = $params['objOrder']->getCurrentState();
if (in_array($state, array(Configuration::get('PS_OS_BANKWIRE'), Configuration::get('PS_OS_OUTOFSTOCK'), Configuration::get('PS_OS_OUTOFSTOCK_UNPAID'))))
{
if (Configuration::get('WK_ALLOW_ADVANCED_PAYMENT'))
{
$obj_customer_adv = new HotelCustomerAdvancedPayment();
$order_total = $obj_customer_adv->getOrdertTotal(0, 0, $params['objOrder']->id);
}
else
$order_total = $params['total_to_pay'];
$this->smarty->assign(array(
'total_to_pay' => Tools::displayPrice($order_total, $params['currencyObj'], false),
'bankwireDetails' => Tools::nl2br($this->details),
'bankwireAddress' => Tools::nl2br($this->address),
'bankwireOwner' => $this->owner,
'status' => 'ok',
'id_order' => $params['objOrder']->id
));
if (isset($params['objOrder']->reference) && !empty($params['objOrder']->reference))
$this->smarty->assign('reference', $params['objOrder']->reference);
}
else
$this->smarty->assign('status', 'failed');
return $this->display(__FILE__, 'payment_return.tpl');
}
public function checkCurrency($cart)
{
$currency_order = new Currency($cart->id_currency);
$currencies_module = $this->getCurrency($cart->id_currency);
if (is_array($currencies_module))
foreach ($currencies_module as $currency_module)
if ($currency_order->id == $currency_module['id_currency'])
return true;
return false;
}
public function renderForm()
{
$fields_form = array(
'form' => array(
'legend' => array(
'title' => $this->l('Contact details'),
'icon' => 'icon-envelope'
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Account owner'),
'name' => 'BANK_WIRE_OWNER',
'required' => true
),
array(
'type' => 'textarea',
'label' => $this->l('Details'),
'name' => 'BANK_WIRE_DETAILS',
'desc' => $this->l('Such as bank branch, IBAN number, BIC, etc.'),
'required' => true
),
array(
'type' => 'textarea',
'label' => $this->l('Bank address'),
'name' => 'BANK_WIRE_ADDRESS',
'required' => true
),
),
'submit' => array(
'title' => $this->l('Save'),
)
),
);
$helper = new HelperForm();
$helper->show_toolbar = false;
$helper->table = $this->table;
$lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
$helper->default_form_language = $lang->id;
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
$this->fields_form = array();
$helper->id = (int)Tools::getValue('id_carrier');
$helper->identifier = $this->identifier;
$helper->submit_action = 'btnSubmit';
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->tpl_vars = array(
'fields_value' => $this->getConfigFieldsValues(),
'languages' => $this->context->controller->getLanguages(),
'id_language' => $this->context->language->id
);
return $helper->generateForm(array($fields_form));
}
public function getConfigFieldsValues()
{
return array(
'BANK_WIRE_DETAILS' => Tools::getValue('BANK_WIRE_DETAILS', Configuration::get('BANK_WIRE_DETAILS')),
'BANK_WIRE_OWNER' => Tools::getValue('BANK_WIRE_OWNER', Configuration::get('BANK_WIRE_OWNER')),
'BANK_WIRE_ADDRESS' => Tools::getValue('BANK_WIRE_ADDRESS', Configuration::get('BANK_WIRE_ADDRESS')),
);
}
if (!defined('_PS_VERSION_')) {
exit;
}
class bankwire extends PaymentModule
{
protected $_html = '';
protected $_postErrors = array();
public $details;
public $owner;
public $address;
public $extra_mail_vars;
public function __construct()
{
$this->name = 'bankwire';
$this->tab = 'payments_gateways';
$this->version = '1.1.0';
$this->author = 'PrestaShop';
$this->controllers = array('payment', 'validation');
$this->is_eu_compatible = 1;
$this->currencies = true;
$this->currencies_mode = 'checkbox';
$config = Configuration::getMultiple(array('BANK_WIRE_DETAILS', 'BANK_WIRE_OWNER', 'BANK_WIRE_ADDRESS'));
if (!empty($config['BANK_WIRE_OWNER'])) {
$this->owner = $config['BANK_WIRE_OWNER'];
}
if (!empty($config['BANK_WIRE_DETAILS'])) {
$this->details = $config['BANK_WIRE_DETAILS'];
}
if (!empty($config['BANK_WIRE_ADDRESS'])) {
$this->address = $config['BANK_WIRE_ADDRESS'];
}
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l('Bank wire');
$this->description = $this->l('Accept payments for your products via bank wire transfer.');
$this->confirmUninstall = $this->l('Are you sure about removing these details?');
if (!isset($this->owner) || !isset($this->details) || !isset($this->address)) {
$this->warning = $this->l('Account owner and account details must be configured before using this module.');
}
if (!count(Currency::checkPaymentCurrencies($this->id))) {
$this->warning = $this->l('No currency has been set for this module.');
}
$this->extra_mail_vars = array(
'{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'),
'{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')),
'{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS'))
);
}
public function install()
{
if (!parent::install() || !$this->registerHook('payment') || ! $this->registerHook('displayPaymentEU') || !$this->registerHook('paymentReturn')) {
return false;
}
return true;
}
public function uninstall()
{
if (!Configuration::deleteByName('BANK_WIRE_DETAILS')
|| !Configuration::deleteByName('BANK_WIRE_OWNER')
|| !Configuration::deleteByName('BANK_WIRE_ADDRESS')
|| !parent::uninstall()) {
return false;
}
return true;
}
protected function _postValidation()
{
if (Tools::isSubmit('btnSubmit')) {
if (!Tools::getValue('BANK_WIRE_DETAILS')) {
$this->_postErrors[] = $this->l('Account details are required.');
} elseif (!Tools::getValue('BANK_WIRE_OWNER')) {
$this->_postErrors[] = $this->l('Account owner is required.');
}
}
}
protected function _postProcess()
{
if (Tools::isSubmit('btnSubmit')) {
Configuration::updateValue('BANK_WIRE_DETAILS', Tools::getValue('BANK_WIRE_DETAILS'));
Configuration::updateValue('BANK_WIRE_OWNER', Tools::getValue('BANK_WIRE_OWNER'));
Configuration::updateValue('BANK_WIRE_ADDRESS', Tools::getValue('BANK_WIRE_ADDRESS'));
}
$this->_html .= $this->displayConfirmation($this->l('Settings updated'));
}
protected function _displayBankWire()
{
return $this->display(__FILE__, 'infos.tpl');
}
public function getContent()
{
if (Tools::isSubmit('btnSubmit')) {
$this->_postValidation();
if (!count($this->_postErrors)) {
$this->_postProcess();
} else {
foreach ($this->_postErrors as $err) {
$this->_html .= $this->displayError($err);
}
}
} else {
$this->_html .= '<br />';
}
$this->_html .= $this->_displayBankWire();
$this->_html .= $this->renderForm();
return $this->_html;
}
public function hookPayment($params)
{
if (!$this->active) {
return;
}
if (!$this->checkCurrency($params['cart'])) {
return;
}
$this->smarty->assign(array(
'this_path' => $this->_path,
'this_path_bw' => $this->_path,
'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/'
));
return $this->display(__FILE__, 'payment.tpl');
}
public function hookDisplayPaymentEU($params)
{
if (!$this->active) {
return;
}
if (!$this->checkCurrency($params['cart'])) {
return;
}
$payment_options = array(
'cta_text' => $this->l('Pay by Bank Wire'),
'logo' => Media::getMediaPath(dirname(__FILE__).'/bankwire.jpg'),
'action' => $this->context->link->getModuleLink($this->name, 'validation', array(), true)
);
return $payment_options;
}
public function hookPaymentReturn($params)
{
if (!$this->active) {
return;
}
$state = $params['objOrder']->getCurrentState();
if (in_array($state, array(Configuration::get('PS_OS_BANKWIRE'), Configuration::get('PS_OS_OUTOFSTOCK'), Configuration::get('PS_OS_OUTOFSTOCK_UNPAID')))) {
if (Configuration::get('WK_ALLOW_ADVANCED_PAYMENT')) {
$obj_customer_adv = new HotelCustomerAdvancedPayment();
$order_total = $obj_customer_adv->getOrdertTotal(0, 0, $params['objOrder']->id);
} else {
$order_total = $params['total_to_pay'];
}
$this->smarty->assign(array(
'total_to_pay' => Tools::displayPrice($order_total, $params['currencyObj'], false),
'bankwireDetails' => Tools::nl2br($this->details),
'bankwireAddress' => Tools::nl2br($this->address),
'bankwireOwner' => $this->owner,
'status' => 'ok',
'id_order' => $params['objOrder']->id
));
if (isset($params['objOrder']->reference) && !empty($params['objOrder']->reference)) {
$this->smarty->assign('reference', $params['objOrder']->reference);
}
} else {
$this->smarty->assign('status', 'failed');
}
return $this->display(__FILE__, 'payment_return.tpl');
}
public function checkCurrency($cart)
{
$currency_order = new Currency($cart->id_currency);
$currencies_module = $this->getCurrency($cart->id_currency);
if (is_array($currencies_module)) {
foreach ($currencies_module as $currency_module) {
if ($currency_order->id == $currency_module['id_currency']) {
return true;
}
}
}
return false;
}
public function renderForm()
{
$fields_form = array(
'form' => array(
'legend' => array(
'title' => $this->l('Contact details'),
'icon' => 'icon-envelope'
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Account owner'),
'name' => 'BANK_WIRE_OWNER',
'required' => true
),
array(
'type' => 'textarea',
'label' => $this->l('Details'),
'name' => 'BANK_WIRE_DETAILS',
'desc' => $this->l('Such as bank branch, IBAN number, BIC, etc.'),
'required' => true
),
array(
'type' => 'textarea',
'label' => $this->l('Bank address'),
'name' => 'BANK_WIRE_ADDRESS',
'required' => true
),
),
'submit' => array(
'title' => $this->l('Save'),
)
),
);
$helper = new HelperForm();
$helper->show_toolbar = false;
$helper->table = $this->table;
$lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
$helper->default_form_language = $lang->id;
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
$this->fields_form = array();
$helper->id = (int)Tools::getValue('id_carrier');
$helper->identifier = $this->identifier;
$helper->submit_action = 'btnSubmit';
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->tpl_vars = array(
'fields_value' => $this->getConfigFieldsValues(),
'languages' => $this->context->controller->getLanguages(),
'id_language' => $this->context->language->id
);
return $helper->generateForm(array($fields_form));
}
public function getConfigFieldsValues()
{
return array(
'BANK_WIRE_DETAILS' => Tools::getValue('BANK_WIRE_DETAILS', Configuration::get('BANK_WIRE_DETAILS')),
'BANK_WIRE_OWNER' => Tools::getValue('BANK_WIRE_OWNER', Configuration::get('BANK_WIRE_OWNER')),
'BANK_WIRE_ADDRESS' => Tools::getValue('BANK_WIRE_ADDRESS', Configuration::get('BANK_WIRE_ADDRESS')),
);
}
}

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>bankwire</name>
<displayName><![CDATA[Bank wire]]></displayName>
<version><![CDATA[1.1.0]]></version>
<description><![CDATA[Accept payments for your products via bank wire transfer.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[payments_gateways]]></tab>
<confirmUninstall><![CDATA[Are you sure about removing these details?]]></confirmUninstall>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockadvertising</name>
<displayName><![CDATA[Advertising block]]></displayName>
<version><![CDATA[0.10.0]]></version>
<description><![CDATA[Adds an advertisement block to selected sections of your e-commerce website.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[advertising_marketing]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockbanner</name>
<displayName><![CDATA[Banner block]]></displayName>
<version><![CDATA[1.4.0]]></version>
<description><![CDATA[Displays a banner at the top of the shop.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockbestsellers</name>
<displayName><![CDATA[Top-sellers block]]></displayName>
<version><![CDATA[1.7.0]]></version>
<description><![CDATA[Adds a block displaying your store&#039;s top-selling products.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -100,20 +100,16 @@ class blockcart extends Module
foreach ($products as $key => &$product) {
if ($product['id_product'] == $cart_rule['gift_product']
&& $product['id_product_attribute'] == $cart_rule['gift_product_attribute']) {
$product['total_wt'] = Tools::ps_round($product['total_wt'] - $product['price_wt'],
(int) $currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
$product['total'] = Tools::ps_round($product['total'] - $product['price'],
(int) $currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
$product['total_wt'] = Tools::ps_round($product['total_wt'] - $product['price_wt'], (int) $currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
$product['total'] = Tools::ps_round($product['total'] - $product['price'], (int) $currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
if ($product['cart_quantity'] > 1) {
array_splice($products, $key, 0, array($product));
$products[$key]['cart_quantity'] = $product['cart_quantity'] - 1;
$product['cart_quantity'] = 1;
}
$product['is_gift'] = 1;
$cart_rule['value_real'] = Tools::ps_round($cart_rule['value_real'] - $product['price_wt'],
(int) $currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
$cart_rule['value_tax_exc'] = Tools::ps_round($cart_rule['value_tax_exc'] - $product['price'],
(int) $currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
$cart_rule['value_real'] = Tools::ps_round($cart_rule['value_real'] - $product['price_wt'], (int) $currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
$cart_rule['value_tax_exc'] = Tools::ps_round($cart_rule['value_tax_exc'] - $product['price'],(int) $currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
}
}
}
@@ -185,8 +181,7 @@ class blockcart extends Module
public function install()
{
if (
parent::install() == false
if (parent::install() == false
|| $this->registerHook('top') == false
|| $this->registerHook('header') == false
|| $this->registerHook('actionCartListOverride') == false
@@ -210,9 +205,10 @@ class blockcart extends Module
$cart_htl_data = $result['cart_htl_data'];
$total_rooms = $result['total_rooms_in_cart'];
$this->smarty->assign(array(
'cart_htl_data' => $cart_htl_data,
'total_rooms_in_cart' => $total_rooms,
));
'cart_htl_data' => $cart_htl_data,
'total_rooms_in_cart' => $total_rooms,
)
);
}
$warning_num = Configuration::get('WK_ROOM_LEFT_WARNING_NUMBER');
@@ -274,8 +270,7 @@ class blockcart extends Module
$res['cart_booking_data'] = $result['cart_htl_data'];
$res['total_rooms_in_cart'] = $result['total_rooms_in_cart'];
if (is_array($res) && ($id_product = Tools::getValue('id_product')) && Configuration::get('PS_BLOCK_CART_SHOW_CROSSSELLING')) {
$this->smarty->assign('orderProducts', OrderDetail::getCrossSells($id_product, $this->context->language->id,
Configuration::get('PS_BLOCK_CART_XSELL_LIMIT')));
$this->smarty->assign('orderProducts', OrderDetail::getCrossSells($id_product, $this->context->language->id, Configuration::get('PS_BLOCK_CART_XSELL_LIMIT')));
$res['crossSelling'] = $this->display(__FILE__, 'crossselling.tpl');
}
@@ -473,12 +468,18 @@ class blockcart extends Module
$cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'] += 1;
$total_rooms += 1;
$num_days = $cart_htl_data[$type_key]['date_diff'][$date_join]['num_days'];
$vart_quant = (int) $cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'] * $num_days;
$vart_quant = (int) $cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'];
$amount = Product::getPriceStatic($type_value['id_product'], $price_tax, null, 6, null, false, true, 1);
$amount *= $vart_quant;
//// By webkul New way to calculate product prices with feature Prices
$roomTypeDateRangePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($type_value['id_product'], $data_v['date_from'], $data_v['date_to']);
if (!$price_tax) {
$amount = $roomTypeDateRangePrice['total_price_tax_excl'];
} else {
$amount = $roomTypeDateRangePrice['total_price_tax_incl'];
}
//END
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount'] = $amount;
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount'] = $amount * $vart_quant;
} else {
$num_days = $obj_htl_bk_dtl->getNumberOfDays($data_v['date_from'], $data_v['date_to']);
$total_rooms += 1;
@@ -486,8 +487,16 @@ class blockcart extends Module
$cart_htl_data[$type_key]['date_diff'][$date_join]['data_form'] = date('Y-m-d', strtotime($data_v['date_from']));
$cart_htl_data[$type_key]['date_diff'][$date_join]['data_to'] = date('Y-m-d', strtotime($data_v['date_to']));
$cart_htl_data[$type_key]['date_diff'][$date_join]['num_days'] = $num_days;
$amount = Product::getPriceStatic($type_value['id_product'], $price_tax, null, 6, null, false, true, 1);
$amount *= $num_days;
// By webkul New way to calculate product prices with feature Prices
$roomTypeDateRangePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($type_value['id_product'], $data_v['date_from'], $data_v['date_to']);
if (!$price_tax) {
$amount = $roomTypeDateRangePrice['total_price_tax_excl'];
} else {
$amount = $roomTypeDateRangePrice['total_price_tax_incl'];
}
// END
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount'] = $amount;
}
}
@@ -498,7 +507,6 @@ class blockcart extends Module
}
}
}
return array('cart_htl_data' => $cart_htl_data, 'total_rooms_in_cart' => $total_rooms);
}
}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcart</name>
<displayName><![CDATA[Cart block]]></displayName>
<version><![CDATA[1.6.0]]></version>
<description><![CDATA[Adds a block containing the customer&#039;s shopping cart.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -1,284 +0,0 @@
[08-Oct-2015 19:25:47 Asia/Kolkata] PHP Notice: Trying to get property of non-object in /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 31
[08-Oct-2015 19:25:47 Asia/Kolkata] PHP Fatal error: Uncaught You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND `id_product` = 8 AND `date_from` = '2015-10-08' AND `date_to` = '2015-10-09'' at line 1<br /><br /><pre>SELECT Count(`id`) FROM `ps_htl_cart_booking_data` WHERE `id_cart` = AND `id_product` = 8 AND `date_from` = '2015-10-08' AND `date_to` = '2015-10-09' LIMIT 1</pre>
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/db/Db.php on line 765
[08-Oct-2015 19:25:49 Asia/Kolkata] PHP Notice: Trying to get property of non-object in /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 31
[08-Oct-2015 19:25:49 Asia/Kolkata] PHP Fatal error: Uncaught You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND `id_product` = 8 AND `date_from` = '2015-10-08' AND `date_to` = '2015-10-09'' at line 1<br /><br /><pre>SELECT Count(`id`) FROM `ps_htl_cart_booking_data` WHERE `id_cart` = AND `id_product` = 8 AND `date_from` = '2015-10-08' AND `date_to` = '2015-10-09' LIMIT 1</pre>
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/db/Db.php on line 765
[08-Oct-2015 19:25:51 Asia/Kolkata] PHP Notice: Trying to get property of non-object in /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 31
[08-Oct-2015 19:25:51 Asia/Kolkata] PHP Fatal error: Uncaught You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND `id_product` = 8 AND `date_from` = '2015-10-08' AND `date_to` = '2015-10-09'' at line 1<br /><br /><pre>SELECT Count(`id`) FROM `ps_htl_cart_booking_data` WHERE `id_cart` = AND `id_product` = 8 AND `date_from` = '2015-10-08' AND `date_to` = '2015-10-09' LIMIT 1</pre>
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/db/Db.php on line 765
[09-Oct-2015 12:29:00 Asia/Kolkata] PHP Notice: Trying to get property of non-object in /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 31
[09-Oct-2015 12:29:00 Asia/Kolkata] PHP Fatal error: Uncaught You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND `id_product` = 8 AND `date_from` = '2015-10-09' AND `date_to` = '2015-10-10'' at line 1<br /><br /><pre>SELECT Count(`id`) FROM `ps_htl_cart_booking_data` WHERE `id_cart` = AND `id_product` = 8 AND `date_from` = '2015-10-09' AND `date_to` = '2015-10-10' LIMIT 1</pre>
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/db/Db.php on line 765
[09-Oct-2015 12:29:11 Asia/Kolkata] PHP Notice: Trying to get property of non-object in /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 31
[09-Oct-2015 12:29:11 Asia/Kolkata] PHP Fatal error: Uncaught You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND `id_product` = 10 AND `date_from` = '2015-10-09' AND `date_to` = '2015-10-10' at line 1<br /><br /><pre>SELECT Count(`id`) FROM `ps_htl_cart_booking_data` WHERE `id_cart` = AND `id_product` = 10 AND `date_from` = '2015-10-09' AND `date_to` = '2015-10-10' LIMIT 1</pre>
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/db/Db.php on line 765
[09-Oct-2015 12:29:42 Asia/Kolkata] PHP Notice: Trying to get property of non-object in /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 31
[09-Oct-2015 12:29:42 Asia/Kolkata] PHP Fatal error: Uncaught You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND `id_product` = 10 AND `date_from` = '2016-05-13' AND `date_to` = '2016-05-14' at line 1<br /><br /><pre>SELECT Count(`id`) FROM `ps_htl_cart_booking_data` WHERE `id_cart` = AND `id_product` = 10 AND `date_from` = '2016-05-13' AND `date_to` = '2016-05-14' LIMIT 1</pre>
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/db/Db.php on line 765
[09-Oct-2015 15:45:59 Asia/Kolkata] PHP Fatal error: Uncaught Unknown column 'undefined' in 'where clause'<br /><br /><pre>SELECT Count(`id`) FROM `ps_htl_cart_booking_data` WHERE `id_cart` = undefined AND `id_product` = 10 AND `date_from` = '2015-10-09' AND `date_to` = '2015-10-10' LIMIT 1</pre>
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/db/Db.php on line 765
[09-Oct-2015 15:56:46 Asia/Kolkata] PHP Fatal error: Uncaught Unknown column 'undefined' in 'where clause'<br /><br /><pre>SELECT Count(`id`) FROM `ps_htl_cart_booking_data` WHERE `id_cart` = undefined AND `id_product` = 9 AND `date_from` = '2015-10-10' AND `date_to` = '2015-10-15' LIMIT 1</pre>
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/db/Db.php on line 765
[15-Oct-2015 19:38:15 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[15-Oct-2015 19:39:58 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[15-Oct-2015 19:40:02 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[15-Oct-2015 19:40:06 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[15-Oct-2015 19:57:50 Asia/Kolkata] PHP Fatal error: Uncaught You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'd code</b> on line <b>143</b><br />
<br />
<b>Notice</b>: Trying to get propert' at line 1<br /><br /><pre>SELECT Count(`id`) FROM `ps_htl_cart_booking_data` WHERE `id_cart` = 11 AND `id_product` = 8 AND `date_from` = '2015-10-15' AND `date_to` = '<br />
<b>Notice</b>: Undefined index: booking_to_from in <b>/home/rjain/public_html/ps-hotel-reservation-system/tools/smarty/sysplugins/smarty_internal_templatebase.php(171) : eval()'d code</b> on line <b>143</b><br />
<br />
<b>Notice</b>: Trying to get property of non-object in <b>/home/rjain/public_html/ps-hotel-reservation-system/tools/smarty/sysplugins/smarty_internal_templatebase.php(171) : eval()'d code</b> on line <b>143</b><br />
' LIMIT 1</pre>
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/db/Db.php on line 791
[15-Oct-2015 19:58:13 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_to is not valid' in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[15-Oct-2015 19:58:18 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_to is not valid' in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[15-Oct-2015 19:59:08 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[15-Oct-2015 19:59:09 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[15-Oct-2015 19:59:20 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[15-Oct-2015 19:59:48 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[17-Nov-2015 03:19:30 US/Eastern] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->id_currency is empty' in /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/sumit/public_html/html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[17-Nov-2015 03:19:46 US/Eastern] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->id_currency is empty' in /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/sumit/public_html/html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[17-Nov-2015 03:21:15 US/Eastern] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->id_currency is empty' in /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/sumit/public_html/html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[17-Nov-2015 03:21:54 US/Eastern] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->id_currency is empty' in /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/sumit/public_html/html/ps-hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(61): ObjectModelCore->save()
#4 {main}
thrown in /home/sumit/public_html/html/ps-hotel-reservation-system/classes/ObjectModel.php on line 909
[17-Nov-2015 16:28:29 Asia/Calcutta] PHP Parse error: syntax error, unexpected ';' in /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 62
[17-Nov-2015 16:28:51 Asia/Calcutta] PHP Parse error: syntax error, unexpected ';' in /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 62
[03-Dec-2015 16:41:09 Asia/Calcutta] PHP Parse error: syntax error, unexpected end of file in /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 152
[03-Dec-2015 23:27:36 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[03-Dec-2015 23:35:21 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[03-Dec-2015 23:37:04 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[03-Dec-2015 23:37:35 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[03-Dec-2015 23:37:58 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[03-Dec-2015 23:38:56 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[03-Dec-2015 23:40:25 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[03-Dec-2015 23:45:07 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[03-Dec-2015 23:47:47 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[03-Dec-2015 23:48:21 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[04-Dec-2015 11:43:49 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[04-Dec-2015 11:46:49 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[04-Dec-2015 11:53:57 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[07-Dec-2015 19:21:14 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[07-Dec-2015 19:24:11 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->date_from is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[14-Dec-2015 11:36:37 Asia/Kolkata] PHP Notice: Undefined variable: total_available_rooms in /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 111
[30-Dec-2015 17:23:43 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->id_cart is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[30-Dec-2015 17:23:58 Asia/Kolkata] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property HotelCartBookingData->id_cart is not valid' in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php:909
Stack trace:
#0 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(246): ObjectModelCore->validateFields()
#1 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(487): ObjectModelCore->getFields()
#2 /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php(445): ObjectModelCore->add(true, false)
#3 /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php(65): ObjectModelCore->save()
#4 {main}
thrown in /home/rjain/public_html/hotel-reservation-system/classes/ObjectModel.php on line 909
[31-Dec-2015 16:45:22 Asia/Calcutta] PHP Fatal error: Class 'FrontController' not found in /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 3
[31-Dec-2015 16:46:41 Asia/Calcutta] PHP Fatal error: Class 'FrontController' not found in /home/rjain/public_html/hotel-reservation-system/modules/blockcart/checkroomavailabilityajaxprocess.php on line 3

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcategories</name>
<displayName><![CDATA[Categories block]]></displayName>
<version><![CDATA[2.9.0]]></version>
<description><![CDATA[Adds a block featuring product categories.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcms</name>
<displayName><![CDATA[CMS block]]></displayName>
<version><![CDATA[2.1.1]]></version>
<description><![CDATA[Adds a block with several CMS links.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcmsinfo</name>
<displayName><![CDATA[Custom CMS information block]]></displayName>
<version><![CDATA[1.6.0]]></version>
<description><![CDATA[Adds custom information blocks in your store.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcontact</name>
<displayName><![CDATA[Contact block]]></displayName>
<version><![CDATA[1.4.0]]></version>
<description><![CDATA[Allows you to add additional information about your store&#039;s customer service.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcontactinfos</name>
<displayName><![CDATA[Contact information block]]></displayName>
<version><![CDATA[1.2.0]]></version>
<description><![CDATA[This module will allow you to display your e-store&#039;s contact information in a customizable block.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcurrencies</name>
<displayName><![CDATA[Currency block]]></displayName>
<version><![CDATA[0.4.0]]></version>
<description><![CDATA[Adds a block allowing customers to choose their preferred shopping currency.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcustomerprivacy</name>
<displayName><![CDATA[Customer data privacy block]]></displayName>
<version><![CDATA[1.1.2]]></version>
<description><![CDATA[Adds a block displaying a message about a customer&#039;s privacy data.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockfacebook</name>
<displayName><![CDATA[Facebook Like Box block]]></displayName>
<version><![CDATA[1.4.0]]></version>
<description><![CDATA[Displays a block for subscribing to your Facebook Page.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocklanguages</name>
<displayName><![CDATA[Language selector block]]></displayName>
<version><![CDATA[1.5.0]]></version>
<description><![CDATA[Adds a block allowing customers to select a language for your store&#039;s content.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocklayered</name>
<displayName><![CDATA[Layered navigation block]]></displayName>
<version><![CDATA[2.1.2]]></version>
<description><![CDATA[Displays a block with layered navigation filters.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocklink</name>
<displayName><![CDATA[Link block]]></displayName>
<version><![CDATA[1.6.0]]></version>
<description><![CDATA[Adds a block with additional links.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<confirmUninstall><![CDATA[Are you sure you want to delete all your links?]]></confirmUninstall>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockmanufacturer</name>
<displayName><![CDATA[Manufacturers block]]></displayName>
<version><![CDATA[1.4.0]]></version>
<description><![CDATA[Displays a block listing product manufacturers and/or brands.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockmyaccount</name>
<displayName><![CDATA[My Account block]]></displayName>
<version><![CDATA[1.4.0]]></version>
<description><![CDATA[Displays a block with links relative to a user&#039;s account.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockmyaccountfooter</name>
<displayName><![CDATA[My account block for your website&#039;s footer]]></displayName>
<version><![CDATA[1.6.0]]></version>
<description><![CDATA[Displays a block with links relative to user accounts.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocknavigationmenu</name>
<displayName><![CDATA[Navigatoion block]]></displayName>
<version><![CDATA[1.0.0]]></version>
<description><![CDATA[Adds a Navigation block.]]></description>
<author><![CDATA[webkul]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocknewproducts</name>
<displayName><![CDATA[New products block]]></displayName>
<version><![CDATA[1.10.0]]></version>
<description><![CDATA[Displays a block featuring your store&#039;s newest products.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocknewsletter</name>
<displayName><![CDATA[Newsletter block]]></displayName>
<version><![CDATA[2.2.0]]></version>
<description><![CDATA[Adds a block for newsletter subscription.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<confirmUninstall><![CDATA[Are you sure that you want to delete all of your contacts?]]></confirmUninstall>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockpaymentlogo</name>
<displayName><![CDATA[Payment logos block]]></displayName>
<version><![CDATA[0.4.0]]></version>
<description><![CDATA[Adds a block which displays all of your payment logos.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockpermanentlinks</name>
<displayName><![CDATA[Permanent links block]]></displayName>
<version><![CDATA[0.3.0]]></version>
<description><![CDATA[Adds a block which displays permanent links such as sitemap, contact, etc.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockreinsurance</name>
<displayName><![CDATA[Customer reassurance block]]></displayName>
<version><![CDATA[2.2.0]]></version>
<description><![CDATA[Adds an information block aimed at offering helpful information to reassure customers that your store is trustworthy.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockrss</name>
<displayName><![CDATA[RSS feed block]]></displayName>
<version><![CDATA[1.3.0]]></version>
<description><![CDATA[Adds a block displaying a RSS feed.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocksearch</name>
<displayName><![CDATA[Quick search block]]></displayName>
<version><![CDATA[1.6.0]]></version>
<description><![CDATA[Adds a quick search field to your website.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[search_filter]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocksharefb</name>
<displayName><![CDATA[Facebook Share Button]]></displayName>
<version><![CDATA[1.3.0]]></version>
<description><![CDATA[Allows customers to share products or content on Facebook.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

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