Post by zdenek.hrib » Fri Aug 20, 2010 4:49 pm

Hi,

I have not found any more appropriate form to offer the result of my humble try to make the advanced search in 1.4.8b a bit more advanced so I will post it here. For my shop I needed to make it possible to fulltext search in the option names (when the apropriate checbox is checked) and also to allow to search for products by price interval. The aim was to enable to search for stuff with certain color up to the certain price (marketing agencies require this :-). The proposed solution works well also for the special product prices - I just hope mysql is doing some cacheing for selects nested in where condition (I had not done any load testing).

Besides this I had found there is a problem with fulltext seraching in case of languages with non-ASCII characters, eg.Czech. I would like to propose a solution that looks generally useable to me:

on the line 179 in /index.php in 1.4.8b add a new line:
setlocale(LC_ALL, substr($languages[$code]['locale'],0,strpos($languages[$code]['locale'], ",")));
of course there must be something like "cs_CZ.UTF-8" set up for the language locale in opencart admin to make this work

Is there any recommended way to offer the core contributions anyway?

Attachments

modified files for more advanced search


Newbie

Posts

Joined
Thu Aug 19, 2010 7:10 am

Post by i2Paq » Fri Aug 20, 2010 6:59 pm

Thank you for your hard work!

I will move this topic to the Free Contributions section as that is where this belongs.
Maybe you could PM Qphoria about this Advanced Search and he can then have a look if it can be fitted in the core.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by qahar » Fri Aug 20, 2010 9:34 pm

Interesting, can not wait to try soon

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by leimener » Thu Aug 26, 2010 2:42 pm

Hi zdenek.hrib! Thanks so much for the contribution! Actually this is exactly what I am looking for ever since I started to implement Opencart. In my shop (www.bonsai-suiseki.de), it is important to allow the clients search for product attributes directly, say length, width. People come with very concrete ideas about the bonsai pots which they want to best match their bonsai trees. Is it possible to implement some extra search fields, like "search product length", "search product width"? I think the attributes should be somewhere in the database, as for every product we do have the option to enter the product measures.

I will be very glad to see this excellent contributes added to core! ;D

Newbie

Posts

Joined
Tue Apr 13, 2010 2:43 am

Post by zdenek.hrib » Fri Aug 27, 2010 7:43 pm

I do not want to speak for the founders of OpenCart, but I believe this is not possible in a simple way right now. For this you would have to define the "special attributes" for the whole eshop, but right now you can only define options for specific product. Even my modification will not help you if you try to search for "red oak", because you have to find "oak" in product name/description and "red" in option name/description and that is just not the way it works right now.

But I have heard there should be some improvements of the advanced search regardles of this modification...

Newbie

Posts

Joined
Thu Aug 19, 2010 7:10 am
Who is online

Users browsing this forum: No registered users and 24 guests