Post by madfish » Thu Nov 24, 2011 6:31 pm

Hello,

after updating to 1.5.1.3 from 1.5.1.1 there is a search problem.
When I search for example : word1 word2
it returns all searches for word1 and word2, not word1+word2 like it used to be in 1.5.1.1.

So for another example: some tries to search for:
Calvin Klein euphoria, and it won't return this product, but all products containing each word.

How do we fix this?

My fragrance parfum site profumi


New member

Posts

Joined
Thu Dec 03, 2009 8:49 pm


Post by wigatno » Thu Nov 24, 2011 10:21 pm

Please Help me, why my category not appear after I add product, for detail this
http://musliminia.com/pandora%20jewelry ... y%20stores
after I click the silver > ring product......my product not appear....

for other info...look this
http://musliminia.com/index.php?route=p ... path=72_75
in this case, working !!!!

Best Regards
Hamdani Wigatno

Thanks Before...see you

Newbie

Posts

Joined
Wed Oct 12, 2011 1:41 pm

Post by smbweb » Thu Dec 08, 2011 4:25 pm

Hi,

in /catelog/model/catalog/product.php function "getProducts" replace code

Code: Select all

$words = explode(' ', $data['filter_name']);
					
					foreach ($words as $word) {
						if (!empty($data['filter_description'])) {
							$implode[] = "LCASE(pd.name) LIKE '%" . $this->db->escape(utf8_strtolower($word)) . "%' OR LCASE(pd.description) LIKE '%" . $this->db->escape(utf8_strtolower($word)) . "%'";
						} else {
							$implode[] = "LCASE(pd.name) LIKE '%" . $this->db->escape(utf8_strtolower($word)) . "%'";
						}				
					}
					
					if ($implode) {
						$sql .= " " . implode(" OR ", $implode) . "";
					}
with

Code: Select all

if (!empty($data['filter_description'])) {
						$sql .= "(LCASE(pd.name) LIKE '%" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "%' OR LCASE(pd.description) LIKE '%" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "%')";
					} else {
						$sql .= "LCASE(pd.name) LIKE '%" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "%'";
					}
also replace

Code: Select all

$words = explode(' ', $data['filter_tag']);
					
					foreach ($words as $word) {
						$implode[] = "LCASE(pt.tag) LIKE '%" . $this->db->escape(utf8_strtolower($data['filter_tag'])) . "%' AND pt.language_id = '" . (int)$this->config->get('config_language_id') . "'";
					}
					
					if ($implode) {
						$sql .= " " . implode(" OR ", $implode) . "";
					}
with

Code: Select all

$sql .= "(LCASE(pt.tag) LIKE '%" . $this->db->escape(utf8_strtolower($data['filter_tag'])) . "%' AND pt.language_id = '" . (int)$this->config->get('config_language_id') . "')";
					

sql query is invalid in 1.5.1.3 release.

Newbie

Posts

Joined
Sat Feb 19, 2011 6:32 pm

Post by joash » Fri Feb 03, 2012 11:39 am

hi,
i want to also ask for product search in 1.5.1.3.
how to modify the code when i want to search include the text in product description?
the existing system is only search text in product title.
thank you

Newbie

Posts

Joined
Mon Oct 18, 2010 11:42 am

Post by funnyfish » Thu Mar 08, 2012 1:06 pm

@madgish and joash

I am not sure but this extension may solve your problem if you haven't yet

http://www.opencart.com/index.php?route ... =21&page=5

Newbie

Posts

Joined
Thu Mar 08, 2012 1:04 pm
Who is online

Users browsing this forum: No registered users and 3 guests