so i have 2 languages on my opencart site, when in English i can search in English of course and see results in English....
when i search with other language, i can only search in that other language, i cannot search in English...
i would like to have that whatever language i have installed, to search with either language to return the same results in the current language - so for example, if i'm viewing the store in a foreign language, and i search in English, i would like the search to return the products in the current language instead of "0 products found" message.... i figured this should be a simple "fix" since the search controller parses the database - can anyone recommend a simple way to make this happen?
thanks
when i search with other language, i can only search in that other language, i cannot search in English...
i would like to have that whatever language i have installed, to search with either language to return the same results in the current language - so for example, if i'm viewing the store in a foreign language, and i search in English, i would like the search to return the products in the current language instead of "0 products found" message.... i figured this should be a simple "fix" since the search controller parses the database - can anyone recommend a simple way to make this happen?
thanks
on line 78 in model/catalog/product.php
i removed the language part of this:
to this:
now i can search whatever words in any language
i removed the language part of this:
Code: Select all
$sql .= " LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'";
Code: Select all
$sql .= " LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'";
It also works in later 1.5.6.x Versions, as it looks.
Just to have this mentioned too ...
Ernie
Just to have this mentioned too ...
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
No, you just did it wrong.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Then it works fine, if you did everything right! Right???!
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
No.
I did not say that I did everything right, I just said, that I change those code mentioned above.
I am just wondering if there is something else.
Who is online
Users browsing this forum: No registered users and 302 guests