*

crymatisticos

  • ***
  • 57 posts
Search result problem
« on: June 05, 2017, 11:52:31 AM »
Hi frosticek,

I've update my osclass version to 3.7.3 and now I'm facing a problem with search queries don't give back results in zara theme

but after trial and error found that when location is passed in the search query with codes it doesn't return result but when the location is passed as strings the search return results

this are the same search queries which doesn't return the same result

the one generated by zara theme

https://rawajnet.com/index.php?page=search&cookie-action-side=done&sOrder=dt_pub_date&iOrderType=desc&sCountry=DZ&sRegion=782629

but when I replace
sCountry=DZ   by sCountry=Algeria
and
sRegion=782629 by sRegion=Alger

where DZ is code country for algeria
and 782629  is the coordinate for the city alger

this request return results
https://rawajnet.com/index.php?page=search&cookie-action-side=done&sOrder=dt_pub_date&iOrderType=desc&sCountry=Algeria&sRegion=Alger

so I'm asking How should I modify the search parameters in the theme so it passes the strings of the location rather then the codes


*

MB Themes

Re: Search result problem
« Reply #1 on: June 05, 2017, 12:19:31 PM »
@crymatisticos
Problem is that osclass changed something in core and in text parameters cannot be used code anymore (strange).

Try this.
Go to search.php

Find:
Code: [Select]
name="sRegion"
Replace with:
Code: [Select]
name="region"
Find:
Code: [Select]
name="sCountry"
Replace with:
Code: [Select]
name="country"
Find:
Code: [Select]
name="sCity"
Replace with:
Code: [Select]
name="city"
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

crymatisticos

  • ***
  • 57 posts
Re: Search result problem
« Reply #2 on: June 05, 2017, 02:26:27 PM »
Thanks for your answer

I've made the changes that you've mentioned but raised another issue which is that the search result come from all region and not only from the selected region

https://rawajnet.com/index.php?page=search&sOrder=dt_pub_date&iOrderType=desc&country=DZ&region=782629

and the metadata doesn't change accordingly and the information in search box which must be Algeria for country and Alger for region

so my suggestion is we should pass the strings of names of region rather than the codes

and I'm counting on you to help me to do so because when you pass strings everything work correctly

https://rawajnet.com/index.php?page=search&sOrder=dt_pub_date&iOrderType=desc&sCountry=Algeria&sRegion=Alger

and if you want integrate this fix in an update of zara theme

*

MB Themes

Re: Search result problem
« Reply #3 on: June 05, 2017, 02:29:56 PM »
@crymatisticos
I have checked regions and they change based on country selected.
Regarding meta tags, those depends on osclass core or plugin for meta tags.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

crymatisticos

  • ***
  • 57 posts
Re: Search result problem
« Reply #4 on: June 05, 2017, 02:51:19 PM »
nope

results come from multiple region you can try your self
1-clear your cache
2-go to search page and select country algeria and region alger

it will shows this result


http://imgur.com/a/3pM2m
change region and click search
 it will show the same results

so why not take my suggestion in consideration it is working

*

MB Themes

Re: Search result problem
« Reply #5 on: June 06, 2017, 09:08:38 AM »
@crymatisticos
Because osclass works with names and IDs as well and we will not avoid using IDs that are even more accurate.

There are some strange issues on 3.7.3

This link does not work:
https://rawajnet.com/search/country,DZ

On my demo site it works correctly.
I recommend to downgrade, I will investigate what cause this.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

crymatisticos

  • ***
  • 57 posts
Re: Search result problem
« Reply #6 on: June 06, 2017, 10:48:50 AM »
hi @frosticek

you didn't answer me
if you don't to help me at least show me how the search query is made so I can the modification myself

*

MB Themes

Re: Search result problem
« Reply #7 on: June 06, 2017, 09:12:07 PM »
@crymatisticos
Not sure what I did not answered. Search is in core, you should not modify that.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots