Below code use for get search result programetically
$searchText = 'mobile';
$query = Mage::getModel('catalogsearch/query')->loadByQueryText($searchText);
$query->setStoreId(1);
$query = Mage::getModel('catalogsearch/query')->setQueryText($searchText)->prepare();
$fulltextResource = Mage::getResourceModel('catalogsearch/fulltext')->prepareResult(
Mage::getModel('catalogsearch/fulltext'),
$searchText,
$query
);
$collection = Mage::getResourceModel('catalog/product_collection');
$collection->getSelect()->joinInner(
array('search_result' => $collection->getTable('catalogsearch/result')),
$collection->getConnection()->quoteInto(
'search_result.product_id=e.entity_id AND search_result.query_id=?',
$query->getId()
),
array('relevance' => 'relevance')
);
using above code you will get your search result programetically in magento where $searchText is your search value.
Hope this code help you,
Thank you.
$searchText = 'mobile';
$query = Mage::getModel('catalogsearch/query')->loadByQueryText($searchText);
$query->setStoreId(1);
$query = Mage::getModel('catalogsearch/query')->setQueryText($searchText)->prepare();
$fulltextResource = Mage::getResourceModel('catalogsearch/fulltext')->prepareResult(
Mage::getModel('catalogsearch/fulltext'),
$searchText,
$query
);
$collection = Mage::getResourceModel('catalog/product_collection');
$collection->getSelect()->joinInner(
array('search_result' => $collection->getTable('catalogsearch/result')),
$collection->getConnection()->quoteInto(
'search_result.product_id=e.entity_id AND search_result.query_id=?',
$query->getId()
),
array('relevance' => 'relevance')
);
using above code you will get your search result programetically in magento where $searchText is your search value.
Hope this code help you,
Thank you.
Hi,
ReplyDeleteJust wanna know how pagination will be applied to it?
Jabong is one of the top online fashion related website you can getjabong axis cashback
ReplyDeleteThanks for sharing such informative post
ReplyDeleteWeb Design Company in Mysore | web development in Mysore | web designers in Mysore | IT companies in Mysore | Web Design Companies in Mysore | Software Companies in Mysore
I want to know, how exactly does it work?
ReplyDeletewebsite security certificate | ssl certificate price | Dedicated Servers in India | cheap dedicated hosting india
awsome blog.
ReplyDeleterunning shoes 2018
After I read and try to understand this article in conclusion amazingwe are all around thankful for the closeness of this article can merge stunningly all the all the all the more learning for every last one of us. grateful to you.
ReplyDeleteAccountants Brighton
Amazing and extremely cool thought and the subject at the highest point of brilliance and I am cheerful to this post..Interesting post! Much obliged for composing it. What's the issue with this sort of post precisely? It takes after your past rule for post length and in addition clearness
ReplyDeleteTax Advisors
A commitment of gratefulness is all together to show this rich stuff to us! Oversee sharing! I am new inside the weblog binding. Each altruistic web journals and posts are not basic for the perusers. Here the essayist is giving sensible character and proposition to each and every peruser through this introduction.
ReplyDeleteSelf Employed Tax Return Accountants East Grinstead
I love examining your articles, your articles gives a learning see with respect to the issue at any rate revealed to me why you all around frame on flawed centers, notwithstanding a superior than normal article to investigate and share
ReplyDeleteSelf Employed Tax Return Accountants Brighton
Really great post. I just unearthed your blog and needed to state that I have truly appreciated perusing your blog entries. Any way I'll be buying in to your feed and I trust you post again soon. Enormous a debt of gratitude is in order for the valuable information.
ReplyDeleteSelf Assessment Return for Self Employed
I just thought it may be an idea to post incase anyone else was having problems researching but I am a little unsure if I am allowed to put names and addresses on here
ReplyDeleteTax Accountants for Self Employed Tax Return
it's incredibly decent and meanful. it's enormously cool blog. Partner is incredibly noteworthy thing.you have truly helped heaps of individuals who visit blog and give them usefull data.
ReplyDeleteSelf Assessment Return for Self Employed
The examples below is definetly for instance glimmer brilliant. Each one of these insignificant issues are built utilizing wide variety of cornerstone knowledge
ReplyDeleteSelf Employed Tax Return Accountants Brighton
This article is a join with bounty of illuminating information that is boggling and deliberately formed. I compliment your driving forward work on this and thank you for this data. You have the stuff to get thought.
ReplyDeleteGlazen schuifdeur
This is my first time visit here. From the enormous measures of comments on your articles,I infer I am not only one having all the pleasure ideal here!
ReplyDeleteZonwering