Fixed: add search option on category page

This commit is contained in:
amit sharma
2026-10-15 11:58:47 +05:30
parent 365e22702e
commit 33a6caba2f
6 changed files with 96 additions and 1 deletions

View File

@@ -60,4 +60,60 @@
.header-rmsearch-wrapper {
padding: 10px 5px;}
}
}
/* searched details and the close icon are for mobile and tablet only */
.header-rmsearch-details-wrapper,
.header-rmsearch-wrapper .close_room_serach_wrapper {
display: none;}
/* mobile and tablet: show the searched details, the search form opens with the edit button */
@media (max-width: 991px) {
.header-rmsearch-wrapper {
display: none;
position: relative;}
.header-rmsearch-details-wrapper {
display: block;}
.header-rmsearch-wrapper .close_room_serach_wrapper {
display: block;
position: absolute;
top: 8px;
right: 15px;
z-index: 1;}
.close_room_serach_wrapper img {
width: 18px;}
.header-rmsearch-details-wrapper {
padding: 0 0 15px;}
.header-rmsearch-details-wrapper .filter_header {
font-size: 12px;
color: #333;
line-height: 25px;}
.header-rmsearch-details-wrapper .filter_header p {
margin: 0;}
.header-rmsearch-details-wrapper .search_result_info {
font-size: 15px;
font-weight: bold;
line-height: 30px;
color: #333333;}
.header-rmsearch-details-wrapper .modify_roomtype_search_btn {
border: 1px solid #777777;
font-weight: bold;
border-radius: 4px;
font-size: 13px;
padding: 6px 12px;
color: #333333;
text-align: center;
text-transform: uppercase;}
.header-rmsearch-details-wrapper .faded-txt {
color: #777777;}
}
/* desktop always shows the search form, even if it was closed on a smaller screen */
@media (min-width: 992px) {
.header-rmsearch-wrapper {
display: block !important;}
}
/* the sidebar is narrow on tablets, so keep the searched details compact */
@media (min-width: 768px) and (max-width: 991px) {
.header-rmsearch-details-wrapper .search_result_info {
font-size: 13px;
line-height: 20px;}
}

View File

@@ -22,7 +22,23 @@
{block name='category_page_search_panel'}
{if isset($hotels_info) && count($hotels_info)}
{* searched information, shown on mobile and tablet only *}
{block name='category_page_search_info'}
{if isset($search_data) && $search_data}
<div class="header-rmsearch-details-wrapper">
<div class="filter_header">
<p>{l s='Searched results for' mod='wkroomsearchblock'}:
<button class="btn btn-default modify_roomtype_search_btn pull-right"><i class="icon-pencil"></i></button>
</p>
</div>
<div class="search_result_info">
{$search_data['htl_dtl']['hotel_name']|escape:'htmlall':'UTF-8'}, {$search_data['htl_dtl']['city']|escape:'htmlall':'UTF-8'} {if !$search_data['order_date_restrict']}<img src="{$module_dir}views/img/icon-arrow-left.svg"> {if (isset($search_data['date_from']))}{$search_data['date_from']|escape:'htmlall':'UTF-8'|date_format:"%d %b %Y"}{/if} - {if isset($search_data['date_to'])}{$search_data['date_to']|escape:'htmlall':'UTF-8'|date_format:"%d %b %Y"}{/if}<span class="faded-txt"> ({1+$search_data['num_days']|escape:'htmlall':'UTF-8'} {l s='Days' mod='wkroomsearchblock'} {$search_data['num_days']|escape:'htmlall':'UTF-8'} {if $search_data['num_days'] > 1}{l s='Nights' mod='wkroomsearchblock'}{else}{l s='Night' mod='wkroomsearchblock'}{/if})</span> {/if}
</div>
</div>
{/if}
{/block}
<div class="header-rmsearch-wrapper">
<a href="#" class="close_room_serach_wrapper"><img src="{$module_dir}views/img/icon-close.svg"></a>
<div class="filter_header clearfix">
<p>{l s='Search Rooms' mod='wkroomsearchblock'}</p>
<hr class="header-bottom-hr">

View File

@@ -102,6 +102,7 @@ class WkRoomSearchBlock extends Module
// apply assets as per pages
if ('category' == $controller) {
$this->context->controller->addCSS($this->_path.'views/css/wk-category-search.css');
$this->context->controller->addJS($this->_path.'views/js/wk-roomtype-search.js');
}
if ('index' == $controller) {
$this->context->controller->addCSS($this->_path.'views/css/wk-landing-page-search.css');

View File

@@ -403,4 +403,19 @@ p.capa_txt {
.layered_filter_cont:has(#filter_price_silder) {
padding-bottom: 15px;
margin-bottom: 20px;
}
@media (min-width: 768px) and (max-width: 991px) {
.catSortBlock .col-sm-3 {
width: auto;
}
.catSortBlock .filter_dw_cont .btn {
white-space: nowrap;
}
.catSortBlock .filter_dw_cont .sort_btn_span {
margin-right: 8px;
}
}

View File

@@ -260,6 +260,12 @@
margin: 0;
}
@media (max-width: 768px) {
.table.table-summary {
margin-bottom: 0;
border: none;
}
}
.table.table-summary.table-sm td {
padding: 8px 0;
}

View File

@@ -1603,6 +1603,7 @@ ul.service-product-nav > li:hover {
.service-product-element .service-product-actions {
display: flex;
margin-left: auto;
}
@media (max-width: 575px) {
.service-product-element .service-product-actions {