Advertisement:

Author Topic: 3.7.3 Search parameters question  (Read 2439 times)

crymatisticos

  • Newbie
  • *
  • Posts: 25
Re: 3.7.3 Search parameters question
« Reply #15 on: June 06, 2017, 03:55:25 pm »
I'm trying this on my 28 counties site:


https://www.website.com/search/sOrder,dt_pub_date/iOrderType,desc/country,FR/region,781333/city,Aignoz

and works great. Shows everything available.

Following your example it shoudln't work ? Am i getting this right ?

the link that you've provided return 404 error

my links returns different results for same search go on and check by yourself

the first generated by search button in the website the second I've modified the first generated url

Of cource it returns 404, website.com is not a real url.....

 :o :o :o :o :o :o :o :o :o :o :o
so why you gave it as example

Aficionado

  • Guest
Re: 3.7.3 Search parameters question
« Reply #16 on: June 06, 2017, 03:58:03 pm »
:o :o :o :o :o :o :o :o :o :o :o
so why you gave it as example

Dude, that was a real search from MY SITE that i removed the domain name, because i don't like to post publicly an urls of mine.

Is that clear now ?


_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: 3.7.3 Search parameters question
« Reply #17 on: June 06, 2017, 03:59:56 pm »
forget about rewrite rules,


could you check your t_item_location table? is there anything on fk_c_country_code ? are you sure it was working before?

could you debug your SQL to see the real query of the search?

apparently all values are Null in fk_c_country_code

and this is a screenshot of the table


So that's your problem, you are looking by country code (DZ) doesn't work because the fk_c_country_code column is null ...

crymatisticos

  • Newbie
  • *
  • Posts: 25
Re: 3.7.3 Search parameters question
« Reply #18 on: June 06, 2017, 04:01:42 pm »
forget about rewrite rules,


could you check your t_item_location table? is there anything on fk_c_country_code ? are you sure it was working before?

could you debug your SQL to see the real query of the search?

apparently all values are Null in fk_c_country_code

and this is a screenshot of the table


So that's your problem, you are looking by country code (DZ) doesn't work because the fk_c_country_code column is null ...
How can I fix this

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: 3.7.3 Search parameters question
« Reply #19 on: June 06, 2017, 04:03:43 pm »
Maybe it's related to some zara code, wher eyou using POP theme before or after this issue?


To fix it, just run on your database:

Code: [Select]
UPDATE oc_t_item_location SET fk_c_country_code = "DZ" WHERE s_country = "Algeria";


But if there's a bug somewhere, in a plugin or the theme or in the core, this will happen again.

crymatisticos

  • Newbie
  • *
  • Posts: 25
Re: 3.7.3 Search parameters question
« Reply #20 on: June 06, 2017, 04:13:51 pm »
Maybe it's related to some zara code, wher eyou using POP theme before or after this issue?


To fix it, just run on your database:

Code: [Select]
UPDATE oc_t_item_location SET fk_c_country_code = "DZ" WHERE s_country = "Algeria";


But if there's a bug somewhere, in a plugin or the theme or in the core, this will happen again.

Thank you very much for your help

but it seems the problem is also with region and cities I'll try to find a way to do the same with them
an SQL query which seems to be complicated
« Last Edit: June 06, 2017, 04:38:18 pm by crymatisticos »

crymatisticos

  • Newbie
  • *
  • Posts: 25
Re: 3.7.3 Search parameters question
« Reply #21 on: June 06, 2017, 04:48:15 pm »
this is query for region
UPDATE oc_t_item_location, oc_t_region
SET    oc_t_item_location.fk_i_region_id = oc_t_region.pk_i_id
WHERE  oc_t_item_location.s_region = oc_t_region.s_name

this the query for city

UPDATE oc_t_item_location, oc_t_city
SET    oc_t_item_location.fk_i_city_id = oc_t_city.pk_i_id
WHERE  oc_t_item_location.s_city = oc_t_city.s_name

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: 3.7.3 Search parameters question
« Reply #22 on: June 06, 2017, 11:33:08 pm »
@crymatisticos
Can you check if this happen for new listings as well? Otherwise your code will fix just historical issues.

crymatisticos

  • Newbie
  • *
  • Posts: 25
Re: 3.7.3 Search parameters question
« Reply #23 on: June 16, 2017, 05:30:08 pm »
@crymatisticos
Can you check if this happen for new listings as well? Otherwise your code will fix just historical issues.

sorry for replying late
it's still happening and make the queries daily  to fix the issue

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: 3.7.3 Search parameters question
« Reply #24 on: June 20, 2017, 10:53:48 am »
@crymatisticos
Do we have this situation now?
- country in it's table has defined country code
- country code is not stored in item table (item_location) ?