Magento Themes and Magento Extensions

Get all attributes from an attribute set in magento.

Share
Posted on March 31st, 2013 | Posted by admin

Get all attributes from an attribute set in magento.

$entityTypeId = Mage::getModel(‘eav/entity’)
->setType(‘catalog_product’)
->getTypeId();
$attributeSetName = ‘Default’; //Edit with your required Attribute Set Name
$attributeSetId = Mage::getModel(‘eav/entity_attribute_set’)
->getCollection()
->setEntityTypeFilter($entityTypeId)

Magento : cache_dir must be a directory

Share
Posted on March 29th, 2013 | Posted by admin

cache_dir must be a directory : This problem came generally when you move your magento store to another host or server . There are mainly two solution for this problem

1 -  Make sure your cache directory is writable or you can make writable to var folder of magento

but sometimes this situation does not work so here is the alternate solution. Go to this location lib/Zend/Cache/Backend/

and open file.php file you’ll see the code something like this

Show category block on a magento page via cms

Share
Posted on March 28th, 2013 | Posted by admin

Show category block on a magento page via cms

Add this snipp to any page’s body in the cms to show a category’s items on that page. “category_id” being the id of the category, duyee.

{{block type=”catalog/product_list” category_id=”4″template=”catalog/product/list.phtml”}}

How to Display New Products in Magento with Pagination?

Share
Posted on March 27th, 2013 | Posted by admin

Displaying new products to a specific category in any Magento site , with pagination and a CMS page is really very complicated. The default functionality that Magento offers for latest products doesn’t just work. However, below is documented the method that will let you add new products to a Magento CMS page along with pulling up new products for any category you select, or for the entire site. Whether you are looking to include new products to your CMS page by category or for the whole site, it all depends upon you.

How to add new products with built-in Magento Tools?

Displaying or adding a list of new products in Magento through a default block is made possible without any coding issues or changes to Magento itself. This code allows you to roll out a roster of new products on the CMS page of your liking.

How to display new products in Magento with Pagination?

Magento Check if Home page is Current Page

Share
Posted on March 26th, 2013 | Posted by admin

There is no built-in default function to check if the current page is the home page in Magento. But it doesn’t stop you from writing your own.

One way to do so is:

1
if ( $_SERVER['REQUEST_URI'] == "/" || $_SERVER['REQUEST_URI'] == "/index.php" )
Page 1 of 612345»...Last »