Magento Themes and Magento Extensions

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() ?>

How to get Dropdown Attributes Magento

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

How to get Dropdown Attributes Magento
Get the Dropdown Attribute value in catalog list.

We saw How to get Attributes wich worked fine for text attributes.

Now if you want to get the dropdown attribute value:

<?php echo $_product->getAttributeText(‘attribute_name’) ?>

How to delete Magento Cache by FTP

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

Sometimes Magento can return unexpected errors after installing extensions or some code changes.

If you can no longer access to your site delete everything inside:

/var/cache

Configuring APC Cache For Faster Magento

Share
Posted on April 3rd, 2012 | Posted by admin

Just to give you brief introduction of APC Cache; Alternative PHP Cache (APC) is a free and open opcode cache which provides free, open, and robust framework for caching and optimizing PHP intermediate code. If you tweak APC well you can even cache application data (user cache).

Now, let me ask you this. Does your store despite all hard work still under performing? If the answer is yes then it’s a right time to induce Alternative PHP Cache (APC) to speed up your Magento store. Although, there are lots of opcode cache available like eaccelerator, Xcache etc.) still we are using APC just because of greater support and stability. APC cache is taken as default in PHP 6 so using APC makes more sense.

How To Stop Bad Bots (SpamBots) From Stealing Your Magento Store’s Bandwidth

Share
Posted on April 3rd, 2012 | Posted by admin

If you are amongst those Magento store owners who never look into access_log still notice that your Magento store is slow then there is serious rethinking to do. Internet is flooded with variety of bad bots who typically steal your bandwidth and make huge number of requests to your server. Your server starts serving the requests from bad bot and in return becomes very slow to genuine visitors/customers. You might say that i have perfect robots.txt file in place which is allowing only legitimate Magento directories to be crawled. You might have setup Crawl-delay properly so you are safe. Well, like is said you have some rethinking to do.