Search problem
« on: March 05, 2021, 08:37:46 AM »
Please admin. Am facing 4 issues but I will tell you 3 issues now.

1.  I try to remove. Transaction and condition from the Search bar @ inc_search. But it's still showing..


2. If user search by city, nothing will display. Except when user search without selecting city.

3. Location drop-down

Site name 9jame.com

*

MB Themes

Re: Search problem
« Reply #1 on: March 05, 2021, 10:08:45 AM »
@Usiesili Bright
1. check footer.php of theme
2. I've tried to search on demo city Knox and it worked properly, listings found
3. ?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: Search problem
« Reply #2 on: March 05, 2021, 12:03:38 PM »
I have fix it..

I remove
      <input type="hidden" name="sCountry" id="sCountry" class="sCountry" value="<?php echo Params::getParam('sCountry'); ?>"/>
      <input type="hidden" name="sRegion" id="sRegion" class="sRegion" value="<?php echo Params::getParam('sRegion'); ?>"/>

And it working perfectly..







And one more thing..
When i use

<h6><?php _e('Region', 'veronika'); ?></h6>
                                <?php ItemForm::region_select(osc_get_regions(osc_user_country()), osc_user()); ?>
                                <h6><?php _e('City', 'veronika'); ?></h6>
                                <select id="sCity" name="sCity">
                                    <option value="">Any City</option>
                                </select>
                                <input type="hidden" id="sRegion" name="sRegion" value="" />


And javascript

    $('#regionId').change(function updateCityList() {
                        var actualRegionId   = $(this).val();

                        if ( Math.floor(actualRegionId) == actualRegionId && $.isNumeric(actualRegionId)) {
                            /*Get cities per region*/
                            $.ajax({
                                url: "<?php echo osc_base_url(true); ?>?page=ajax&action=cities",
                                data: { regionId: actualRegionId },
                                success: function( cities, err){
                                    var $el = $("#sCity"),
                                        citiesOptions = {};
                                   
                                    $('#sCity option:gt(0)').remove();
                                    $el.val("");
                                    $el.prev("span").text("Any City");
                                    $.each(cities, function(key, value) {
                                      $el.append($("<option></option>")
                                         .attr("value", value.s_name).text(value.s_name));
                                    });
                                    $("#sRegion").attr("value", $("#regionId option[value='"+actualRegionId+"']").text());
                                },
                                dataType: "json"
                            });
                        }
                    });


If user select Region it won't load any city..

Is anything wrong with the code
« Last Edit: March 05, 2021, 12:06:44 PM by Usiesili Bright »

*

MB Themes

Re: Search problem
« Reply #3 on: March 05, 2021, 01:42:14 PM »
In that case your users are filling just city without region/country that is not optimial solution.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: Search problem
« Reply #4 on: March 05, 2021, 02:17:16 PM »
I don't have a choice  :'(

What about the city drop down menu @ search

Re: Search problem
« Reply #5 on: March 06, 2021, 09:04:40 AM »
Sorry.. I only delete the country code and it work.. I think is because I only have one country in my site

*

MB Themes

Re: Search problem
« Reply #6 on: March 06, 2021, 02:09:01 PM »
Well it is common that if you have 1 country only, you do not care if it is saved or not, but then it may cause troubles.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots