Page 1 of 1
Multi language search ?
Posted: Wed Jan 04, 2017 7:14 pm
by allgoo
Hello ,
I use 2 languages : Arabic and English in my site , when am using the site in arabic and i search for using english letters it doesn't work ( no search results ) , and vice-versa , is there a way around this ?
thanks
Re: Multi language search ?
Posted: Thu Jan 05, 2017 4:23 pm
by knowband.plugins
It can be done by modifying following two files.
/catalog/model/catalog/product.php
/catalog/model/catalog/category.php
Both of these files contain code to search for given string. Code search given string only in the customer language. If you want to allow customers to search in all languages, you need to remove language conditions from search queries in these 2 files.
If you need technical assistance for this change, you can contact us to get it done for a small fee.
Re: Multi language search ?
Posted: Fri Jan 06, 2017 1:02 am
by allgoo
knowband.plugins wrote:It can be done by modifying following two files.
/catalog/model/catalog/product.php
/catalog/model/catalog/category.php
Both of these files contain code to search for given string. Code search given string only in the customer language. If you want to allow customers to search in all languages, you need to remove language conditions from search queries in these 2 files.
If you need technical assistance for this change, you can contact us to get it done for a small fee.
thank you for your help , i would appreciate it if you just mention the code needed so me and anyone else can benefit this later ,, Sharing is Caring bro

Re: Multi language search ?
Posted: Fri Jan 06, 2017 1:58 am
by IP_CAM
sharing is Caring bro
correct, but what do you plan to share back ? After all, OC is not built to share things, but to create Money, for everyone involved.
Ernie
Re: Multi language search ?
Posted: Fri Jan 06, 2017 2:45 am
by allgoo
IP_CAM wrote:sharing is Caring bro
correct, but what so you plan to share back ?
Totally Agree with the money part

,
for me unfortunately am not programmer and i cant code , so at the moment i can't share much , maybe soon i will learn and start making a difference

Re: Multi language search ?
Posted: Fri Jan 06, 2017 11:49 am
by IP_CAM
One reason, I am here too, I guess, would I be a 'real' Coder, I would not need to waste
my time, downloading the entire OC-World, just to be able to have a matching code,
somewhere, in case I'm gonna need it some day

So, probably because of the bad
feeling, doing such weird hings, I try to give back a little, once in a while...
Good Luck!
Ernie
Re: Multi language search ?
Posted: Sat Jan 07, 2017 5:58 pm
by OSWorX
To keep it simple and short (have not the time like some others here ..).
What you have to do is to remove several instances of
Code: Select all
$this->config->get('config_language_id')
inside those 2 files knowband.plugins mentioned.
Simply open those files, and search for it.
In the model/catalog/product.php for example inside these functions:
and
For example inside the function getProducts it would be
Code: Select all
AND ps.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "'
If you need more help, you can contact me.
Re: Multi language search ?
Posted: Sun Jan 08, 2017 7:56 am
by IP_CAM
Just found one, possibly working:
[Free] Ajax live search free, OC v. 2.0 - 2.3.0.2:
Supports OpenCart Version 2.X
Support for OpenCart's native filter system
Multi language support.
https://www.opencart.com/index.php?rout ... n_id=26240
Ernie
Re: Multi language search ?
Posted: Mon Feb 04, 2019 12:24 pm
by gangerlino
This solution worked for me (opencart 2.3.0.2):
viewtopic.php?t=158260