![]() |
Product Search
I think this should be a pretty straight forward modification...
I would like to know if there is a way to change the default product search from "any words" to "all words" I'm using X-Cart Business 5.2.13 |
Re: Product Search
cloud search will be the best solution for you: http://www.x-cart.com/extensions/addons/cloudsearch.html
it uses intelligent search |
Re: Product Search
Quote:
Thank you but we had Cloud Search enabled until we hit the "free" limit. And even then the results weren't all that great. I would much rather not pay an exorbitant monthly fee for something that should be easily tweaked out of the box. Can you tell me how to change the default search from "any words" to "all words" ? |
Re: Product Search
Hi there.
Open /classes/XLite/View/Form/Product/Search/Customer/SimpleForm.php, find this code Code:
protected function getDefaultParams() Code:
protected function getDefaultParams() Of course, any code changes should be implemented as a module in order to keep them intact during upgrades |
Re: Product Search
Quote:
That actually reminds me; I have a question about creating modules. I have seen the instructions for creating empty modules. Can one empty module contain any and all specific mods I make to our xcart? Like, in one module - I have some CSS changes as well as this particular search customization? Or do I have to create new modules for everything? Also, how does this ensure they will be maintained during upgrades? |
Re: Product Search
You may put as many features into a single module as you want.
However, the more complex your module is, the harder it will be for you to keep it compatible with newer X-Cart versions. When adapting a module having a lot of features mixed in to a new X-Cart version, fixing one thing may break another one. If you think the change that you are working on can be useful for other users/stores, it makes sense to wrap it up into its own module. You can even submit the module to our marketplace later. |
Re: Product Search
So how would I create a module for this specific search change function?
|
Re: Product Search
Please refer to the documentation for developers - it explains how you can create your custom modules:
http://kb.x-cart.com/ What you are to do is create a custom module that decorates the \XLite\View\Form\Product\Search\Customer\SimpleFor m class and tweaks the getDefaultParams() method as Igor advised: https://forum.x-cart.com/showpost.php?p=395690&postcount=4 |
Re: Product Search
Quote:
I saw his post above, but thank you for linking it here. So, I just "decorate" it? Awesome. Whatever that means. Thanks for your help Alex |
Re: Product Search
Did you check the http://kb.x-cart.com/ link that I posted too?
This documentation for developers explains a lot of things including what "decorate" means. For instance, check this article: http://kb.x-cart.com/display/XDD/Adding+CSS+and+JS+files+for+Mobile+Skin |
All times are GMT -8. The time now is 09:34 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.