Post by gsc1ugs » Mon Nov 20, 2017 10:51 pm

I want to improve the search on opencart 2.x its not very good, gives results relating to anything but the word searched
what files should i be looking at please?

Active Member

Posts

Joined
Mon Sep 09, 2013 3:32 pm

Post by straightlight » Mon Nov 20, 2017 11:01 pm

catalog/controller/product/search.php
catalog/model/catalog/product.php
catalog/language/<your_language_code>/product/search.php
catalog/view/theme/<your_theme>/template/product/search.tpl

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gsc1ugs » Tue Nov 21, 2017 5:41 pm

Thank you for the info, could you please tell me where the sql statement is built up?

Active Member

Posts

Joined
Mon Sep 09, 2013 3:32 pm

Post by straightlight » Tue Nov 21, 2017 10:26 pm

The getProducts($data = array()) method uses filters to obtain results that also originates from the search engine of Opencart.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gsc1ugs » Tue Nov 21, 2017 10:33 pm

Thxs, what would i be changing to make a simple sql using LIKE "%mysearchwoes%" on the title?

Active Member

Posts

Joined
Mon Sep 09, 2013 3:32 pm

Post by straightlight » Tue Nov 21, 2017 10:37 pm

You did not posted the exact version of Opencart in order to assist you with your request. v2.x does not exist in the downloads list of either opencart.com or github.com .

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gsc1ugs » Tue Nov 21, 2017 10:40 pm

Version 2.0.2.0

Active Member

Posts

Joined
Mon Sep 09, 2013 3:32 pm

Post by straightlight » Tue Nov 21, 2017 10:41 pm

In the getProducts method, just look for the LIKE statement.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gsc1ugs » Wed Nov 22, 2017 12:48 am

Thanks straightlight, if was actually to do with mpn ean and tags etc, ive got it on the title what I wanted

Active Member

Posts

Joined
Mon Sep 09, 2013 3:32 pm
Who is online

Users browsing this forum: ovi and 36 guests