Magento标题中的自定义货币切换器消失了吗?

时间:2013-02-21 15:25:28

标签: magento block magento-1.7

我昨天为我的标题建立了一个自定义货币切换器,一切运作良好。今天我来设置目录页面,发现自己需要删除左栏中的标准货币切换器,我打开了local.xml并添加了一个删除货币。也许是愚蠢的选择,当我突然发现我在其中一个文件中完成的事情已经阻止了我的标题自定义货币切换器显示时,我在完成后设置了左边的货币以进行管理。

那个local.xml

<?xml version="1.0" encoding="UTF-8"?>
    <layout>
    <default>
    <!-- Remove callouts and rarely used stuff -->
    <remove name="right.poll"/>
    <remove name="right.permanent.callout"/>
    <remove name="left.permanent.callout"/>
    <remove name="paypal.partner.right.logo"/>
    <remove name="catalog.compare.list" />

    <!-- add the local stylesheet -->
    <reference name="head">
        <action method="addCss"><stylesheet>css/smoothness/jquery-ui-1.10.1.custom.css</stylesheet></action>
        <action method="addJs"><script>ahoy/jquery-1.9.1.js</script></action>
        <action method="addJs"><script>ahoy/jquery-ui-1.10.1.custom.js</script></action>
        <action method="addJs"><script>ahoy/script.js</script></action>

        <action method="addCss"><stylesheet>css/1140.css</stylesheet></action>
        <action method="addCss"><stylesheet>css/ahoy.css</stylesheet></action>          
    </reference>
    <reference name="header">
        <block type="template/currency" name="custom_currency_selector" template="currency/currency.phtml"/>
    </reference>

</default>

<catalog_category_view>
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>
</catalog_category_view>

header.phtml的第一部分

<div class="header">
<div class="row">
    <div class="row">   
        <div class="sixcol">
            <?php echo $this->getChildHtml('topLinks') ?>
            <?php echo $this->getChildHtml('custom_currency_selector') ?>
        </div>
        <div class="sixcol last">
            <div class="row">

测试/默认/模板/货币/ currency.phtml

<?php if($this->getCurrencyCount() > 1): ?>
<div class="currency-block">
<ul>
    <?php foreach ($this->getCurrencies() as $_code => $_name): ?>

    <?php $active = ($_code==$this->getCurrentCurrencyCode()) ? "active":""; ?>
    <li>
        <a class="<?php echo $active; ?>" href="<?php echo $this->getSwitchCurrencyUrl() . "currency/" . $_code; ?>" title="Set <?php echo $_code; ?> as your chosen currency">
            <?php echo Mage::app()->getLocale()->currency($_code)->getSymbol(); ?>
        </a>
    </li>
    <?php endforeach; ?>
</ul>

根据我的记忆,这就是我需要创建块,分配它的位置并将其调出。我在fiddeling时一直在清理缓存,我重新加载了货币转换数据,删除并重新测试了删除左栏货币的本地“删除”,现在我删除了left.currency后删除了但最重要的一个从未回来。

这些是我当前的文件,所以现在根本没有删除货币,我不确定这什么时候消失但我只是玩左侧边栏的东西,在css挣扎之后我试图删除货币而且我不知道如何引用它试图杀掉我能找到的所有货币,当我掏空时我不再确定何时我移除了顶级货币。

1 个答案:

答案 0 :(得分:2)

尝试将type="template/currency"更改为type="directory/currency"

相关问题