Magento Themes and Magento Extensions

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”}}

Add Static Block to Magento cms Page by updating the Design Layout XML

Share
Posted on December 19th, 2012 | Posted by admin

This is a very simple task.
Once you created the Static Block, simply go to CMS -> Manage Pages. Select your Page or create a new one.
Click on the Design tab on the left and paste the following code to the “Layout Update XML” textarea.
(Also, don’t forget to select the Layout, eg.: 2 columns with left (or right) bar)

<reference name="left">
    <block before="-" name="block-name" type="cms/block">
        <action method="setBlockId"><block_id>block-id</block_id></action>
    </block>
</reference>

How to Show Static Block in theme Magento

Share
Posted on July 13th, 2012 | Posted by admin

Create an Static Block from your CMS admin tab and show it in your theme magento.

In my case I wanted to call a Static Block from my theme to show up in the sidebar.

I edited my theme file called 2columns-left.phtml and then added the following code.

Please notice you need to replace the YourBlockId with your own Static Block Id.

<?php echo $this->getLayout()->createBlock(‘cms/block’)
->setBlockId(‘YourBlockId’)->toHtml() ?>

How to Show Static Block in theme Magento

Share
Posted on April 14th, 2012 | Posted by admin

How to Show Static Block in theme Magento

Create an Static Block from your CMS admin tab and show it in your theme.

In my case I wanted to call a Static Block from my theme to show up in the sidebar.

I edited my theme file called 2columns-left.phtml and then added the following code.

Please notice you need to replace the YourBlockId with your own Static Block Id.

<?php echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘YourBlockId’)->toHtml() ?>

Magento block caching

Share
Posted on May 23rd, 2011 | Posted by admin

Recently we were working on speeding up parts of client site which had usual problem of slow page loading caused by complicated configurable products. To solve the problem we were experimenting with extending core Magento caching capabilities.

Magento has built in predifined system of block output caching. Its block abstract has Zend_Cache caching capabilities that can be modified for your own needs. I’m showing here an example of caching whole product view block, however this is just a specific example of how things works, problems are different and requires different approach and solution.

I will start with some external reading and example itself. There is great article on Magento Wiki about this topic, along with category cache exampleon Magento forums.

With my Inchoo_BlockCaching.rar example module things should be little easier to understand.

Page 1 of 3123»