Search by product name and sku [duplicate] - magento

I am working on a Magento site, and i would like to edit the default search result.
Editing search result is not editing the appearance of search result but the actual search results generated.
The idea is, if the Magento search does not return any value then i need to do a search in my custom table to fetch some relative products.
Could anyone help me to edit the default Magento search??
Thanks a lot in advance.

You will need to modify some of the models in catalogsearch module, this link has a good explanation of how to override Core classes. In your case you will need to add your logic somewhere in the Query model or its resource or collection models.

This CMS Search extension will provide an excellent example of how to extend the default search. It adds extra content into the search index and allows you to control how those results are presented to the searcher.

Related

How to add another table column in searchable array in nova?

i am getting data from different different tables and i displayed all those in one section that section contains search button also, i want to add another resource field as a searchable item in nova ,i am trying to add based on the relation of the particular table but it's throwing an error undefined column, How to add please help..
public static $searchable=['id','name','account.type'];
Basically, the search by relationship is not possible through Nova.
A package well made for your needs is this one: LaravelNovaSearch
This package includes both relationship search but also has other useful features making the search much more comprehensive.
Another package, which I have not personally tested, but which seems to be useful for your needs: NovaSearchRelations
My advice is to use LaravelNovaSearch, more maintained and more complete.

Load laravel data table when submitting search field

I'm new to laravel. I have UI design of search box. When I search search-term it will show data under the search box as a table. Initially it's only shows search box. How can I handle that kind of situation with laravel? Example Image
As #xNoJustice already said you can include a search package.
If you want to do it by yourself you are able to query each field of your Model for the search word.
For example you can search the Models like:
Model::where('xxx','LIKE','%'.$search_word.'%')
->orWhere('yyy','LIKE','%'.$search_word.'%')->get();
You will need to do this for each Model you want to be searched tḧrough and then pass all the results to your view.

Display the list of products in a tab

In my magento application i want to create a module which is for adding FAQ for a individual product. So while adding the FAQ, in the new tab i want to show the list of all products(like product listing) for which product we want to add FAQ.
So please help me how to customize for getting list of products and display in the new tab?
The question is too broad friend. So don't hope any full solution here. That is because, this question is related to an external extension. But you will get guidance here. Here you may need to do following things.
I think in admin, the extension provides provision to manage each individual faque. What you need to do is, you need to create an extra field that will relate that faq with a product or multiple products.
If you set up this, you need to store this information in database. So for each faq, there may be a product id or multiple product ids related to it
Now you need to create a new block for your extension. This block will filter faqs that related to a particular product.
Next step is add above block in layout. Layout handle you need to use here is catalog_product_view.
Create a new template for your custom block and in that template file, you need to put design codes. You can create this template with the help of current template that this extension uses. That way, you can reduce a lot of time for creating the design.
Hope that helps !

Magento search engine

My website is http://www.godaam.com. I want to improve my search functionality. I did some changes in magento app code, but I am not able to improve it a lot. Is there any free search engine for my product I can incorporate in Magento, please help me out here?
The magento built-in search is pretty good and you just need to tweak the settings. Do this:
Make sure only the attributes such as SKU, Title, Description and Quick Description are enabled for searching (unless you need others like color etc needed)
Tweak search settings in System > Configuration > Catalog > Catalog Search.
Rebuild the indexes and test it out.
In my experience FULLTEXT search returns more relevant results in comparison to "LIKE" or the "COMBINED" option.
One of the features lacking most from Magento's search is refinement. If you search for multiple terms, it will return a bigger set of products rather than smaller. Our free extension fixes that, just a note: in order for it to work you must set the search config settings to LIKE and not FULLTEXT:
Catalog Search Refinement FREE

Retrieving articles based on custom URL parameters

I'm a beginner using Joomla 1.5. I have a page which shows articles in a blog format. My objective is to show/filter the articles per year (which isn't that many) based on user input. I'm planning to create a module on the right side, showing a dropdown box of the years, and retrieve the results by passing the year parameter as part of the URL
Ex.
http://sample.com/index.php?option=com_content&view=category&layout=blog&id=39&Itemid=24&year=2011
What is the best, simplest way of passing and processing additional parameters to com_content via URL? Can I do so using extensions such as K2 and flexicontent? If not, can someone advise me what code to add and where, in com_content? If I have to extend com_content itself, can someone guide me how to or point some useful articles?
Appreciate the help. Thanks
I don't know if K2 or flexicontent offer this option, but com_content appears NOT to have this feature.
I would just build a module, create a query and use the table jos_content, select only the fields that you need (like title) and check the field created to be in the year you need.

Resources