added room price info on checkout page
This commit is contained in:
@@ -3785,7 +3785,20 @@ class CartCore extends ObjectModel
|
||||
}
|
||||
}
|
||||
|
||||
$discountedProducts = array();
|
||||
foreach ($cart_rules as $key => &$cart_rule) {
|
||||
$product_rule_groups = $cart_rule['obj']->getProductRuleGroups();
|
||||
foreach ($product_rule_groups as $id_product_rule_group => $product_rule_group) {
|
||||
if (isset($product_rule_group['product_rules']) && $product_rule_group['product_rules']) {
|
||||
foreach($product_rule_group['product_rules'] as $rule_products) {
|
||||
if ($rule_products['type'] == 'products') {
|
||||
$discountedProducts = array_merge($discountedProducts, $rule_products['values']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (((float)$cart_rule['value_real'] == 0 && (int)$cart_rule['free_shipping'] == 0)) {
|
||||
unset($cart_rules[$key]);
|
||||
}
|
||||
@@ -3825,6 +3838,7 @@ class CartCore extends ObjectModel
|
||||
'total_price' => $base_total_tax_inc,
|
||||
'total_tax' => $total_tax,
|
||||
'total_price_without_tax' => $base_total_tax_exc,
|
||||
'discounted_products' => $discountedProducts,
|
||||
'is_multi_address_delivery' => $this->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1),
|
||||
'free_ship' =>!$total_shipping && !count($this->getDeliveryAddressesWithoutCarriers(true, $errors)),
|
||||
'carrier' => new Carrier($this->id_carrier, $id_lang),
|
||||
|
||||
@@ -1083,6 +1083,7 @@ class FrontControllerCore extends Controller
|
||||
$this->addjqueryPlugin('fancybox');
|
||||
$this->addJS(_PS_JS_DIR_.'hookLiveEdit.js');
|
||||
}
|
||||
$this->addJqueryUI('ui.tooltip', 'base', true);
|
||||
|
||||
if (Configuration::get('PS_QUICK_VIEW')) {
|
||||
$this->addjqueryPlugin('fancybox');
|
||||
|
||||
@@ -557,6 +557,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
if (!empty($cartProducts)) {
|
||||
|
||||
if ($cartBookingInfo = HotelCartBookingData::getHotelCartBookingData()) {
|
||||
// ddd($cartBookingInfo);
|
||||
$this->context->smarty->assign('cart_htl_data', $cartBookingInfo);
|
||||
}
|
||||
$objHotelServiceProductCartDetail = new HotelServiceProductCartDetail();
|
||||
|
||||
@@ -62,8 +62,6 @@ class ProductControllerCore extends FrontController
|
||||
$this->addCSS(_THEME_CSS_DIR_.'occupancy.css');
|
||||
$this->addJS(_THEME_JS_DIR_.'occupancy.js');
|
||||
|
||||
$this->addJqueryUI('ui.tooltip', 'base', true);
|
||||
|
||||
if (Configuration::get('PS_DISPLAY_JQZOOM') == 1) {
|
||||
$this->addJqueryPlugin('jqzoom');
|
||||
}
|
||||
|
||||
@@ -8505,6 +8505,14 @@ div.star.star_hover:after {
|
||||
content: "\f057";
|
||||
font-family: "FontAwesome"; }
|
||||
|
||||
body .ui-tooltip {
|
||||
box-shadow: 0 2px 6px 0 rgb(0 0 0 / 20%);
|
||||
background: #FFFFFF;
|
||||
border: unset;
|
||||
color: #333;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
#facebook_block,
|
||||
#cmsinfo_block {
|
||||
overflow: hidden;
|
||||
|
||||
@@ -33,6 +33,43 @@ $(document).ready(function()
|
||||
$(this).closest('.card').find('.step-edit').addClass('hidden');
|
||||
});
|
||||
|
||||
// room price details tooltip
|
||||
if ($('.room_price_detail_block .room-price-detail').length) {
|
||||
$('.room_price_detail_block .room-price-detail img').tooltip({
|
||||
content: $('.room_price_detail_block .room-price-detail-container').html(),
|
||||
items: "span",
|
||||
trigger : 'hover',
|
||||
tooltipClass: "room-price-detail-tooltip",
|
||||
open: function(event, ui)
|
||||
{
|
||||
if (typeof(event.originalEvent) === 'undefined')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var $id = $(ui.tooltip).attr('id');
|
||||
|
||||
if ($('div.ui-tooltip').not('#' + $id).length) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
close: function(event, ui)
|
||||
{
|
||||
ui.tooltip.hover(function()
|
||||
{
|
||||
$(this).stop(true).fadeTo(400, 1);
|
||||
},
|
||||
function()
|
||||
{
|
||||
$(this).fadeOut('400', function()
|
||||
{
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// BY WEBKUL
|
||||
// FOR ADVANCED PAYMENT
|
||||
var payment_type = $(".payment_type:checked").val();
|
||||
|
||||
@@ -148,13 +148,18 @@
|
||||
<div class="price_block">
|
||||
<p class="total_price">
|
||||
<span>
|
||||
{displayPrice price=($rm_v['amount_without_auto_add'])}
|
||||
{displayPrice price=($rm_v['amount'])}
|
||||
</span>
|
||||
<br>
|
||||
{if ($rm_v['amount'] - $rm_v['amount_without_auto_add']) > 0}
|
||||
<span class="total_price_detial">
|
||||
+ {displayPrice price=($rm_v['amount'] - $rm_v['amount_without_auto_add'])}
|
||||
{if (($rm_v['amount'] - $rm_v['amount_without_auto_add']) > 0) && in_array($data_v['id_product'], $discounted_products)}
|
||||
<span class="room-price-detail">
|
||||
<img src="{$img_dir}icon/icon-info.svg" />
|
||||
</span>
|
||||
<div class="room-price-detail-container" style="display: none;">
|
||||
<div class="room-price-detail-tooltip-cont">
|
||||
<div><label>{l s='Room price'}</label> : {displayPrice price=($rm_v['amount_without_auto_add'])}</div>
|
||||
<div><label>{l s='Additional charges'}</label> : {displayPrice price=($rm_v['amount'] - $rm_v['amount_without_auto_add'])}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if (isset($data_v['extra_demands']) && $data_v['extra_demands']) || (isset($data_v['service_products']) && $data_v['service_products'])}
|
||||
<span class="plus-sign pull-right">
|
||||
|
||||
Reference in New Issue
Block a user