J-BusinessDirectory - Search Filter questions/suggestions

Support Forum

 
 

 

I have a few questions related to the filter on the search page.


1) How can I remove Countries. We only have business in the US so the countries option isn't necessary.


2) Suggestion: Make filters collapsible like on some of the online stores (Walmart.com as an example). When a lot of busniesses are shown the lists of Categories, Types, Regions and Cities make the filter sidebar VERY long. This is an issue when viewing on mobile devices as you have to scroll a looong way to get to the search results.


3) Would it be possible to only populate the Cities when a state is selected. With our site the list of cities is getting too long.

Thanks!

3 replies

Hi,

 

1. We will add the possibility to configure the search filter options starting with version 4.7.0.
For now you can edit {joomla}/components/com_jbusinessdirectory/views/search/tmpl/default.php and remove the follwonig code

<h4><?php echo JText::_("LNG_COUNTRIES") ?></h4>
        <ul>
            <?php
            if(isset($this->searchFilter["countries"])) {
                foreach($this->searchFilter["countries"] as $filterCriteria) { ?>
                <?php if(empty($filterCriteria->countryName)) continue; ?>
                    <?php $selected = isset($this->selectedParams["country"]) && in_array($filterCriteria->countryId, $this->selectedParams["country"]); ?>
                    <li <?php if($searchType == 1 && $selected) echo 'class="selectedlink"'; ?>>
                        <div <?php if($selected) echo 'class="selected"'; ?>>
                            <a href="javascript:void(0)" onclick="<?php echo $selected?"removeFilterRule('country', ".$filterCriteria->countryId.")":"addFilterRule('country', ".$filterCriteria->countryId.")";?>"><?php echo $filterCriteria->countryName; ?><?php echo ($selected)?'<span class="cross">(remove)</span>':"";  ?></a>
                        </div>
                    </li>
                <?php } ?>
            <?php } ?>
        </ul>

 

2. This is already under development and it will be availabe in version 4.7.0

3. If you are referring to search module you can activate link location setting on module settings. This will link the contries -> regions ->cities.

What is the correct path to do this as an override? I also need to remove countries but want to make sure I set this up in a way where every time I update this remain untouched. Thanks!

Hi,

The path is {joomla}/components/com_jbusinessdirectory/views/search/tmpl/default.php

 
 
 

4 Item(s)

Show per page