NWDthemes magento extensions FAQ

How To Make Wunderadmin Magento Admin Theme Work With Localized Module

Wunderadmin Magento Admin Theme overrides two page templates: header.phtml and footer.phtml. If some other extension, like Localized one overrides them too it will cause issues with admin theme.

To solve this problem need to override them again. To do it copy header.phtml and footer.phtml templates from /app/design/adminhtml/default/default/template/magento_localized/ to /app/design/adminhtml/default/wunderadmin/template/magento_localized/ and do the following changes to them:

/app/design/adminhtml/default/wunderadmin/template/magento_localized/header.phtml

Replace logo image src on line 15.

<div class="header-top">
    <a href="<?php echo $this->getHomeLink() ?>"><img src="<?php echo $this->getSkinUrl('images/logo.gif') ?>" alt="<?php echo $this->__('Magento Logo') ?>" class="logo"/></a>
    <?php echo $this->getChildHtml('logo') ?>
<div class="header-top">
    <a href="<?php echo $this->getHomeLink() ?>"><img src="<?php echo Mage::helper('wunderadmin')->getWunderLogo() ?>" alt="<?php echo $this->__('Magento Logo') ?>" class="logo"/></a>
    <?php echo $this->getChildHtml('logo') ?>

/app/design/adminhtml/default/wunderadmin/template/magento_localized/footer.phtml

Copy javascript code with waButtons, waTheme and jscolor.dir definition from Wunderadmin Magento Admin Theme original footer.phtml template located at /app/design/adminhtml/default/wunderadmin/template/page/ to javascript part of new footer.phtml template.

<script type="text/javascript">
    function setInterfaceLanguage(evt){
        var elem = Event.element(evt);
        if(elem){
            setLocation('<?php echo $this->getChangeLocaleUrl() ?>locale/'+elem.value+'/<?php echo $this->getRefererParamName() ?>/<?php echo $this->getUrlForReferer() ?>');
        }
    }
    Event.observe('interface_locale', 'change', setInterfaceLanguage)
</script>
<script type="text/javascript">

    var waButtons = [{class: 'reset', title: '<?php echo $this->__('Reset'); ?>'}
                    ,{class: 'reset', title: '<?php echo $this->__('Reset Filter'); ?>'}
                    ,{class: 'reset', title: '<?php echo $this->__('Refresh'); ?>'}
                    ,{class: 'reset', title: '<?php echo $this->__('Synchronize'); ?>'}
                    ,{class: 'save_continue', title: '<?php echo $this->__('Save and Continue Edit'); ?>'}
                    ,{class: 'save_apply', title: '<?php echo $this->__('Save and Apply'); ?>'}
                    ,{class: 'save_as', title: '<?php echo $this->__('Save As'); ?>'}
                    ,{class: 'save_as', title: '<?php echo $this->__('Save Data and Create Package'); ?>'}
                    ,{class: 'save_custom', title: '<?php echo $this->__('Save package with custom package file name'); ?>'}
                    ,{class: 'save', title: '<?php echo $this->__('Submit'); ?>'}
                    ,{class: 'save', title: '<?php echo $this->__('OK'); ?>'}
                    ,{class: 'save', title: '<?php echo $this->__('Apply'); ?>'}
                    ,{class: 'save', title: '<?php echo $this->__('Apply Rules'); ?>'}
                    ,{class: 'save', title: '<?php echo $this->__('Update Changes'); ?>'}
                    ,{class: 'save', title: '<?php echo $this->__('Continue'); ?>'}
                    ,{class: 'save', title: '<?php echo $this->__('Save package with custom package file name'); ?>'}
                    ,{class: 'save', title: '<?php echo $this->__('Save Data and Create Package'); ?>'}
                    ,{class: 'save', title: '<?php echo $this->__('Add Products'); ?>'}
                    ,{class: 'save', title: <?php echo json_encode( $this->__("Update Items and Qty's") ); ?>}
                    ,{class: 'save', title: <?php echo json_encode( $this->__("Update Qty's") ); ?>}
                    ,{class: 'export_button', title: '<?php echo $this->__('Export'); ?>'}
                    ,{class: 'export_button', title: '<?php echo $this->__('Export Tax Rates'); ?>'}
                    ,{class: 'import', title: '<?php echo $this->__('Import Tax Rates'); ?>'}
                    ,{class: 'email', title: '<?php echo $this->__('Send Email'); ?>'}
                    ,{class: 'email', title: '<?php echo $this->__('Send Tracking Information'); ?>'}
                    ,{class: 'flush', title: '<?php echo $this->__('Flush Magento Cache'); ?>'}
                    ,{class: 'flush_storage', title: '<?php echo $this->__('Flush Cache Storage'); ?>'}
                    ,{class: 'order_credit_memo', title: '<?php echo $this->__('Credit Memo'); ?>'}
                    ,{class: 'order_reorder', title: '<?php echo $this->__('Reorder'); ?>'}
                    ,{class: 'order_unhold', title: '<?php echo $this->__('Unhold'); ?>'}
                    ,{class: 'order_hold', title: '<?php echo $this->__('Hold'); ?>'}
                    ,{class: 'order_hold', title: '<?php echo $this->__('Suspend'); ?>'}
                    ,{class: 'order_invoice', title: '<?php echo $this->__('Invoice'); ?>'}
                    ,{class: 'order_ship', title: '<?php echo $this->__('Ship'); ?>'}
                    ,{class: 'backup_system', title: '<?php echo $this->__('System Backup'); ?>'}
                    ,{class: 'backup_media', title: '<?php echo $this->__('Database and Media Backup'); ?>'}
                    ,{class: 'backup_database', title: '<?php echo $this->__('Database Backup'); ?>'}
                    ,{class: 'button_preview', title: '<?php echo $this->__('Preview Template'); ?>'}
                    ,{class: 'button_plain_text', title: '<?php echo $this->__('Convert to Plain Text'); ?>'}
                    ,{class: 'button_html', title: '<?php echo $this->__('Return HTML Version'); ?>'}
                    ,{class: 'button_preview', title: '<?php echo $this->__('Show Report'); ?>'}
                    ,{class: 'button_edit', title: '<?php echo $this->__('Edit'); ?>'}
                    ,{class: 'cancel_button', title: '<?php echo $this->__('Cancel'); ?>'}
                    ,{class: 'button_select', title: '<?php echo $this->__('Select Block...'); ?>'}
                    ,{class: 'button_select', title: '<?php echo $this->__('Select Category...'); ?>'}
                    ,{class: 'button_select', title: '<?php echo $this->__('Select Page...'); ?>'}
                    ,{class: 'button_select', title: '<?php echo $this->__('Select Product...'); ?>'}
                    ,{class: 'delete', title: '<?php echo $this->__('Disable'); ?>'}
                    ,{class: 'delete', title: '<?php echo $this->__('Close Window'); ?>'}
                    ,{class: 'delete', title: '<?php echo $this->__('Clear Shopping Cart'); ?>'}
                    ,{class: 'delete', title: '<?php echo $this->__('Delete Package'); ?>'}
                    ,{class: 'button_config', title: '<?php echo $this->__('Configure'); ?>'}
                    ,{class: 'button_config', title: '<?php echo $this->__('This product does not have any configurable options'); ?>'}
                    ,{class: 'button_add_website', title: '<?php echo $this->__('Create Website'); ?>'}
                    ,{class: 'button_add_store', title: '<?php echo $this->__('Create Store'); ?>'}
                    ,{class: 'button_add_store_view', title: '<?php echo $this->__('Create Store View'); ?>'}
                    ,{class: 'button_assign', title: '<?php echo $this->__('Assign Status to State'); ?>'}
                    ,{class: 'add-variable', title: '<?php echo $this->__('Insert Variable...'); ?>'}
                    ,{class: 'button_label', title: '<?php echo $this->__('Create Shipping Label...'); ?>'}
                    ,{class: 'button_print', title: '<?php echo $this->__('Print'); ?>'}
                    ,{class: 'add', title: '<?php echo $this->__('Add Package'); ?>'}
                    ,{class: 'search', title: '<?php echo $this->__('Search'); ?>'}];

    var waTheme = '<?php echo Mage::helper('wunderadmin')->getWunderStyle('theme'); ?>';

    if (typeof jscolor != 'undefined')
    {
        jscolor.dir = '<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'jscolor/'; ?>';
    }

    function setInterfaceLanguage(evt){
        var elem = Event.element(evt);
        if(elem){
            setLocation('<?php echo $this->getChangeLocaleUrl() ?>locale/'+elem.value+'/<?php echo $this->getRefererParamName() ?>/<?php echo $this->getUrlForReferer() ?>');
        }
    }
    Event.observe('interface_locale', 'change', setInterfaceLanguage)
</script>

This will solve the issue. If you have problem with other extension overriding this admin theme templates you can solve it in similar way.

Leave a Reply

Your email address will not be published. Required fields are marked *