Thursday, November 1, 2012

Remove Category option from Layered Navigation options list in magnto

Remove Category option

Removing dropdowns from Product List Pager in magnto

List Pager in magnto

Magento: Get store information

Get store data
Mage::app()->getStore();

Store Id
Mage::app()->getStore()->getStoreId();

Store code
Mage::app()->getStore()->getCode();

Website Id
Mage::app()->getStore()->getWebsiteId();

Store Name
Mage::app()->getStore()->getName();

Is Active
Mage::app()->getStore()->getIsActive();

Store Home Url
Mage::app()->getStore()->getHomeUrl();

Delete all Products and ResetProduct id’s in Magento

ResetProduct id’s in Magento

Truncate all categories and and Reset Categoryt id’s in Magento

Reset Categoryt id’s in Magento

Magento: How to solve indexing problem?

solve indexing problem

Magento Database Connection

$sql = Mage::getSingleton('core/resource')->getConnection('core_write');
$result = $sql->query("SELECT class_name from tax_class");

while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
echo $row['class_name']."<br />";
}

Tuesday, October 23, 2012

Redirect site from non-www to www

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

Tuesday, October 16, 2012