Read more about the article Magento – Get Current Store Details (ID, Code, Name and Status)
How to Upgrade Magento community to 1.8

Magento – Get Current Store Details (ID, Code, Name and Status)

// Gets the current store’s details $store = Mage::app()->getStore(); // Gets the current store’s id $storeId = Mage::app()->getStore()->getStoreId(); // Gets the current store’s code $storeCode = Mage::app()->getStore()->getCode(); // Gets the…

Continue ReadingMagento – Get Current Store Details (ID, Code, Name and Status)

Magento AddAttributeToFilter SQL Conditionals

Magento AddAttributeToFilter SQL Conditionals
Magento AddAttributeToFilter SQL Conditionals

If you want to customize query or product collection data you can easily to do that with addAttributeToFilter funcation in magento. In short you can easily customize product collection select query based on your requirement in magento development.

<?php $collection = Mage::getModel('catalog/product')->getCollection(); ?>

If you want get all fields then use below condition select (more…)

Continue ReadingMagento AddAttributeToFilter SQL Conditionals

Magento: ERROR: unable to unpack

Magento: ERROR: unable to unpack
Magento: ERROR: unable to unpack

Symptoms

The following error (or similar) is shown in Magento Connect Manager on installation/upgrade:

ERROR: unable to unpack downloader/pearlib/download/AW_Blog-1.0.21.tgz

Cause

There is a bug in current stable PEAR/Archive_Tar implementation resulting in impossibility to unpack archives made by certain software versions.

Solution

(more…)

Continue ReadingMagento: ERROR: unable to unpack

Magento: How do I disable Magento Compiler?

Magento Compiler feature should be disabled on any changes in loaded Magento classes, in other words, you need to disable Magento Compilation every time before installing new extension or initiating upgrade/downgrade/installation or removal of any Magento module.

To disable Magento Compiler you can use one of the following methods:

Admin Interface

  • navigate to System > Tools > Compilation page and click on Disable button:

How do I disable Magento Compiler?
How do I disable Magento Compiler?

(more…)

Continue ReadingMagento: How do I disable Magento Compiler?

Magento: Fixing Magento Category Order Problems

Fixing Magento Category Order Problems
Fixing Magento Category Order Problems

Recently, one of our clients could not get their product categories to appear in the order set in the Magento Catalog > Manage Categories screen. No matter how they dragged and dropped the categories, the ones near the top would not display as intended on the front end.

How Magento Orders Categories

Categories are displayed in navigation menus based on a field titled “position” in thecatalog_category_entity data table. By default, the order is displayed in ascending order. There are other ways of adding code to display categories alphabetically, but by default, the order shown is determined by the position value.

So, why would changing the order under Manage Categories not work?

What I Observed

When working in the Manage Categories menu, the client and I were focused on manipulating the top 2-3 categories, as those were the ones most important to him at the time. We could change their order, but even after re-indexing the Flat Catalog, the front end would still not display the correct order.
(more…)

Continue ReadingMagento: Fixing Magento Category Order Problems