Magento change the currency selector dropdown to a flag list

To change the currency selector dropdown to a flag list, you can take following these steps:
1. Open file app/design/frontend/default/your_theme/template/directory/currency.phtml (or app/design/frontend/base/default/template/directory/currency.phtml)and change code from:

 <select name="currency" title="<?php echo $this->__('Select Your Currency') ?>" onchange="setLocation(this.value)">
        <?php foreach ($this->getCurrencies() as $_code => $_name): ?>
            <option value="<?php echo $this->getSwitchCurrencyUrl($_code) ?>"<?php if($_code==$this->getCurrentCurrencyCode()): ?> selected="selected"<?php endif; ?>>
                <?php echo $_name ?> - <?php echo $_code ?>
        <?php endforeach; ?>


        <?php foreach ($this->getCurrencies() as $_code => $_name): ?>
            <a href="<?php echo $this->getSwitchCurrencyUrl($_code) ?>" onclick="setLocation(this.value);">
                    <img src="your_flag" title="<?php echo $_name ?> - <?php echo $_code ?>"/>
        <?php endforeach; ?>

1. You need to prepare a flag list (images).
2. Upload flag list to root/media/flag directory
3. Rename flags to currency’s code (EX: US Dollar -> usd.jpg, Euro -> eur.jpg, Hong Kong Dollar -> hkd.jpg…)
4. In the template file: app/design/frontend/default/your_theme/template/directory/currency.phtml (or app/design/frontend/base/default/template/directory/currency.phtml), change code to:

        <?php foreach ($this->getCurrencies() as $_code => $_name): ?>
            <a href="<?php echo $this->getSwitchCurrencyUrl($_code) ?>" onclick="setLocation(this.value);">
                    <img src="<?php echo Mage::getBaseUrl('media').'flag/'.$_code.'.jpg'; ?>" title="<?php echo $_name ?> - <?php echo $_code ?>" alt="<?php echo $_name ?> - <?php echo $_code ?>" width="20" height="20" />
        <?php endforeach; ?>

Magento – Move Currency Switcher to the Header

If you would like to move the currency switcher from the left column to the header, you can use the following instructions to do so!
Open /app/design/frontend/default/default/layout/page.xml

<block type="page/html_header" name="header" as="header">

Change to:

<block type="page/html_header" name="header" as="header">
<block type="directory/currency" name="currency" template="directory/currency.phtml"/>

Open /app/design/frontend/default/default/template/page/html/header.phtml

<?php echo $this->getChildHtml('store_language') ?>


<?php echo $this->getChildHtml('currency') ?>

Save, Upload + Clear Cache
Make sure you have imported or manually entered your Currency Rates otherwise the switcher will not appear!
Its as simple as that!!


WordPress : Displaying categories and subcategories “tree like”

Suppose you want to show a category / subcategory “tree like” list on a WordPress page that gets the posts from a certain “main” category.
The following code, probably will be useful.

//# first of all, you need to get the category array,
// and I did it, putting the line bellow inside the loop
$category = get_the_category(get_the_ID());

// once you have the category array, the rest of the code will work wherever you want on the page

//# getting the main category of the page

//# now letz get the children categories of the main category
$categories = get_categories('child_of='.intval($catid));

foreach ($categories as $category) {
//# check if it is a real parent category with subcategories
if ($category-&gt;parent ==$catid):
echo '&lt;span&gt;&lt;a href=""&gt;'.$category-&gt;cat_name.'&lt;/a&gt;&lt;/span&gt;';
//# here we go, getting the subcategories
$subcategories= get_categories('child_of='.intval($category-&gt;cat_ID));
foreach ($subcategories as $subcategory) {
echo '&lt;span style="padding-left:12px"&gt;';
echo '&lt;a href=""&gt;'.$subcategory-&gt;cat_name.'&lt;/a&gt;&lt;/span&gt;';


Displaying categories and subcategories “tree like” list on WordPress


Send newsletter queue in Admin Magento

If newsletter queue is not going to sent by default magento, try to send newsletter manually as following way. Then we can send it by different ways. Here i am going to discuss about 2 methods. Navigate to Configuration>Admin>Security, select “No” in “Add Secret Key to URLs”, save configuration. type (you will be sent to a blank page.) The news letter will send. (check in the control panel it will be showing sent) After that, you can restore the secret key to url. above is the only work around that worked for me….

Locate file ‘app\code\core\Mage\Adminhtml\Block\Newsletter\Queue\Grid\Renderer\Action.php’
add following code in that page but don’t make any change in core file, override that file
in your local directory as
‘app\code\local\Mage\Adminhtml\Block\Newsletter\Queue\Grid\Renderer \Action.php’
just copy and paste that file in this directory.
Now add the following code in line number 77 before this code $this->getColumn()->setActions($actions);
$actions[] = array(
‘url’=> $this->getUrl(‘*/newsletter_queue/sending’),
‘popup’ =>true

By default magento send only 20 recipients at time. if you want to change this number and want to send more recipients at a time change in following file.

app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php in this file change following line

$countOfSubscritions = 20;
$countOfSubscritions = 100; //change 100 with what ever number you want to change.

Both solution worked for me.

Sources: (for first solution) (for second solution)