Inchoo的FB Connect Magento模块不适用于自定义主题

时间:2012-05-24 05:06:12

标签: magento

Inchoo的FB Connect模块不适用于自定义主题,但适用于默认主题。显然,自定义主题缺少某些内容或与之发生冲突,我需要弄清楚。

我需要寻找一般性的东西吗?

我发现它将其输出附加到after_body_start块,但在自定义主题上,它不会在那里输出与FB相关的标记和脚本。 Mage的Google分析代码在同一个区块的html中输出,并且工作正常,所以我在这里有点迷失。

Inchoo的fb连接模块xml - https://github.com/ivanweiler/Inchoo_Facebook/blob/master/app/design/frontend/default/default/layout/inchoo/facebook.xml

自定义主题的page.xml也有此引用:

<block type="core/text_list" name="after_body_start" as="after_body_start" />

完成page.xml自定义主题:

<default translate="label" module="page">
    <label>All Pages</label>
    <block type="page/html" name="root" output="toHtml" template="page/2columns-left.phtml">

        <block type="page/html_head" name="head" as="head">

            <action method="addItem"><type>skin_js</type><name>js/jquery-1.4.2.min.js</name></action>       
            <action method="addItem"><type>skin_js</type><name>slides-carousel/slides.min.jquery.js</name></action>         
            <action method="addItem"><type>skin_js</type><name>slides-carousel/slides-init.js</name></action>

            <action method="addJs"><script>prototype/prototype.js</script></action>
            <action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</script></action>
            <action method="addJs"><script>lib/ccard.js</script></action>
            <action method="addJs"><script>prototype/validation.js</script></action>
            <action method="addJs"><script>scriptaculous/builder.js</script></action>
            <action method="addJs"><script>scriptaculous/effects.js</script></action>
            <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
            <action method="addJs"><script>scriptaculous/controls.js</script></action>
            <action method="addJs"><script>scriptaculous/slider.js</script></action>
            <action method="addJs"><script>varien/js.js</script></action>
            <action method="addJs"><script>varien/form.js</script></action>
            <action method="addJs"><script>varien/menu.js</script></action>
            <action method="addJs"><script>mage/translate.js</script></action>
            <action method="addJs"><script>mage/cookies.js</script></action>            

            <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
            <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
            <action method="addCss"><stylesheet>css/niceforms-default.css</stylesheet></action> 
            <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
            <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
            <action method="addCss"><stylesheet>slides-carousel/slides.css</stylesheet></action>
            <action method="addCss"><stylesheet>css/niceforms-default.css</stylesheet></action>             

            <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
            <action method="addItem"><type>skin_js</type><name>js/niceforms.js</name></action>                  
            <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>

        </block>

        <block type="core/text_list" name="after_body_start" as="after_body_start"/>

        <block type="page/html_notices" name="global_notices" as="global_notices" template="page/html/notices.phtml" />

        <block type="page/html_header" name="header" as="header">
            <block type="page/template_links" name="top.links" as="topLinks"/>
            <block type="page/switch" name="store_language" as="store_language" template="page/switch/flags.phtml"/>
            <block type="core/text_list" name="top.menu" as="topMenu"/>
            <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
                <label>Page Header</label>
                <action method="setElementClass"><value>top-container</value></action>
            </block>
            <block type="directory/currency" name="currency" template="directory/currency_small.phtml"/>
            <block type="page/switch" name="ie" as="ie" template="page/ie/ie6.phtml"/>
        </block>

        <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>

        <block type="core/text_list" name="left" as="left" translate="label">
            <label>Left Column</label>
        </block>

        <block type="core/messages" name="global_messages" as="global_messages"/>
        <block type="core/messages" name="messages" as="messages"/>

        <block type="core/text_list" name="content" as="content" translate="label">
            <label>Main Content Area</label>
        </block>

        <block type="core/text_list" name="right" as="right" translate="label">
            <label>Right Column</label>
        </block>

        <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
            <block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
                <label>Page Footer</label>
                <action method="setElementClass"><value>bottom-container</value></action>
            </block>
            <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
            <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
        </block>

        <block type="core/text_list" name="before_body_end" as="before_body_end"/>
    </block>

    <block type="core/profiler" output="toHtml" name="core_profiler"/>
</default>

<print translate="label" module="page">
    <label>All Pages (Print Version)</label>
    <!-- Mage_Page -->
    <block type="page/html" name="root" output="toHtml" template="page/print.phtml">

        <block type="page/html_head" name="head" as="head">
            <action method="addJs"><script>prototype/prototype.js</script></action>
            <action method="addJs"><script>mage/translate.js</script></action>
            <action method="addJs"><script>lib/ccard.js</script></action>
            <action method="addJs"><script>prototype/validation.js</script></action>
            <action method="addJs"><script>varien/js.js</script></action>

            <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
            <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
            <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
            <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>

            <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
            <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>

        </block>

        <block type="core/text_list" name="content" as="content" translate="label">
            <label>Main Content Area</label>
        </block>

    </block>
</print>

 <!-- Custom page layout handles -->
<page_empty translate="label">
    <label>All Empty Layout Pages</label>
    <reference name="root">
        <action method="setTemplate"><template>page/empty.phtml</template></action>
        <!-- Mark root page block that template is applied -->
        <action method="setIsHandle"><applied>1</applied></action>
    </reference>
</page_empty>

<page_one_column translate="label">
    <label>All One-Column Layout Pages</label>
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
        <!-- Mark root page block that template is applied -->
        <action method="setIsHandle"><applied>1</applied></action>
    </reference>
</page_one_column>

<page_two_columns_left translate="label">
    <label>All Two-Column Layout Pages (Left Column)</label>
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
        <!-- Mark root page block that template is applied -->
        <action method="setIsHandle"><applied>1</applied></action>
    </reference>
</page_two_columns_left>

<page_two_columns_right translate="label">
    <label>All Two-Column Layout Pages (Right Column)</label>
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        <!-- Mark root page block that template is applied -->
        <action method="setIsHandle"><applied>1</applied></action>
    </reference>
</page_two_columns_right>

<page_three_columns translate="label">
    <label>All Three-Column Layout Pages</label>
    <reference name="root">
        <action method="setTemplate"><template>page/3columns.phtml</template></action>
        <!-- Mark root page block that template is applied -->
        <action method="setIsHandle"><applied>1</applied></action>
    </reference>
</page_three_columns>

我还应该在哪里寻找?

1 个答案:

答案 0 :(得分:0)

根据我的理解,您希望在自定义主题中使用use inchoo's facebook-connect-magento-extension
但我设法在自定义主题中使用fb connect。
我做了以下更改。
第1步:下载了inchoo的facebook-connect-magento-extension后,在打开app文件夹时,从Inchoo复制了/app/code/community/文件夹并粘贴到/app/code/local/以下你安装的magento_folder。
第2步:/app/design/frontend/default/default复制'layout'和'template'并将其粘贴到主题文件夹theme_folder/下。
第3步:将“{1}}中的'Inchoo_Facebook.xml'复制到app/etc/modules编辑 app/etc/modules更改为Inchoo_Facebook.xml <codePool>community</codePool>喜欢这个

<codePool>local</codePool>

第4步:<config> <modules> <Inchoo_Facebook> <active>true</active> <codePool>local</codePool> </Inchoo_Facebook> </modules> </config> 复制到您的magento文件夹中的/app/locale

PS :申请权限。<希望这有帮助。