Update Magento Indexes from the Command Line (Shell)

Sometimes, the only way to update Magento's Indexes is by running the indexer from the command line. Here is how you go about doing it. 

Go to the /public_html/shell folder.

cd /public_html/shell

And run the following commands:
php indexer.php --reindex catalog_category_product
php indexer.php --reindex catalog_category_flat
php indexer.php --reindex catalog_product_flat
php indexer.php --reindex catalog_url
php indexer.php --reindex catalog_product_price
php indexer.php --reindex catalog_product_attribute 
php indexer.php --reindex catalogsearch_fulltext 
php indexer.php --reindex tag_summary


You can Re-indexes all the indexes by running this code:
php indexer.php reindexall


Some Common Uses:

php indexer.php                           - Displays help information on how to use the script
php indexer.php --status                - Shows the status of all the indexes
php indexer.php info                     - Shows the "codes" for the individual indexes
php indexer.php --reindex <code>  - Re-indexes the <code> index
php indexer.php reindexall             - Re-indexes all the indexes

Magento - display SKU on product page


In this tutorial I'm going to show you how to display the SKU# anywhere on the product page. Its actually very simple the only thing that you have to do is to copy a peace of code in the appropriate file and clear the cache.

First, download the view.phtml file from your theme's template/catalog/product folder.
/public_html/app/design/frontend/default/YourTheme/template/catalog/product

Then open it with Notepad++ or Textmate.

Add the following code wherever you like to SKU# to appear.
SKU# <?php echo nl2br($_product->getSku()) ?>

Magento Big Orders Not Processed During Checkout

Large orders not processed during checkout, stock is deducted but order is never  processed.

  1. Clients are unable to checkout with large number of items(30+). 
  2. The order is not saved in magento but stock is deducted for some products.
  3. They are redirected back to the shopping cart.