Using Sphinx within Magento

The default Search function in Magento is not offering your customers much comfort, or you as Magento shop owner much sales…

This article describes how to use the open source Search Engine Sphinx within Magento. The added benefit is that it offloads the search work from your server processor to the Sphinx engine.

Method 1: manual labor:
If you feel comfortable doing the work yourself, here are two links that will teach you how. The first link is a more step by step approach, and seems more up to date. The second is for reference, and is more focussed on older Magento versions, which may come in handy for some.
Link 1: http://www.mediawiki.org/wiki/Extension:SphinxSearch
Link 2: http://tonyhb.co.uk/2012/05/using-sphinx-within-magento-plus-optimising-search-result-rankings-weights-and-relevancy

Method 2: Install an extension:
There are several extensions which do the hard work for you. I name a few, if you know more extensions that do the trick, let me know.

Extension 1: http://www.magentocommerce.com/magento-connect/search-sphinx-4674.html
Extension 2: http://ecommerce.aheadworks.com/magento-extensions/advanced-search.html

Method 3: Other search tools for Magento:
Obviously, Sphinx isn’t the only way to go. Here is an article on some alternative extensions that will improve Magento search:
http://www.insync.co.in/top-10-magento-search-extensions/

Magento – blank admin or frontend

Seeing a blank page in Magento admin or frontpage?

This usually happens when you have compilation mode on when you modify files, theme templates or modules / extensions, or install a theme or extension.

The Magento Compiler should be disabled every time before installing or removing a Magento extension or when upgrading Magento. Therefore it typically only gets enabled when development for your site is finished. And if you do the ‘famous last little tweak’ when compilation mode is on, sometimes disaster strikes. Happened to me more then once, the trouble being that it takes a whole to realize the cause of your blank screen.

Ok, on to the solution::

So, you left compilation mode on, but cannot reach the backend to switch it off. If you have SSH access, you are in luck.

Step 1: Check current compilation status

$ php -f shell/compiler.php -- state
Compiler Status:          Enabled
Compilation State:        Compiled
Collected Files Count:    6042
Compiled Scopes Count:    4
  • Disable Magento compilation:
    $ php -f shell/compiler.php -- disable
    Compiler include path disabled
  • Clear all compiled files
    $ php -f shell/compiler.php -- clear
    Compilation successfully cleared
  • Ensure that compiler is disabled now by checking its status:
    $ php -f shell/compiler.php -- state
    Compiler Status:          Disabled
    Compilation State:        Not Compiled
    Collected Files Count:    0
    Compiled Scopes Count:    0

Step 2: Clear all cache in Magento

What if you don’t have SSH access?
(For example in a shared hosting solution), I don’t have the solution I’m afraid. if you know the solution please feel free to post it in a reply to this thread, so I can update it.

Magento – Rewrite all to www.example.com/shop

Use case:

You want to redirect all calls to www.example.com to www.example.com/shop

Add this to the .htaccess file:

RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteRule ^$ shop [L]