【问题标题】:set breadcrumb for Magento One Step Checkout page为 Magento One Step Checkout 页面设置面包屑
【发布时间】:2014-01-14 09:19:34
【问题描述】:

对不起,如果我的问题是重复的或幼稚的......

我是 magento 的新手,而我的开发人员介于两者之间......

我需要在这个 onestepcheckout 页面上设置面包屑链接

http://epbitservices.com/demo/globalcart/demo/globalcart/us/index.php/checkout/onepage/

现在,我尝试的是编辑 /app/design/frontend/base/default/layout/onepagecheckout.xml 和 page.xml

但没有成功..请帮助

这是我的 onepagecheckout.xml

<?xml version="1.0" encoding="UTF-8"?>
<layout version="2.2.4">

    <onepagecheckout_index_index translate="label">
        <label>One Page Checkout</label>
        <remove name="left"/>
        <remove name="right"/>
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="head">
            <action method="addItem" ifconfig="onepagecheckout/general/enabled"><type>skin_css</type><name>css/onepagecheckout.css</name></action>
        </reference>
<reference name="breadcrumbs"> 
            <action method="addCrumb"> 
            <name>home</name> 
                                        <params> 
                                            <label>Home</label> 
                                             <title>Home</title> 
                                            <link></link> 
                                        </params> 
                 </action>

                 <action method="addCrumb"> 
            <name>Onepage checkout</name> 
                                        <params> 
                                            <label>OnePage Checkout</label> 
                                             <title>OnePage Checkout</title> 
                                            <link>onepagecheckout</link> 
                                        </params> 
                 </action>
          </reference>
        <reference name="content">
            <block type="checkout/onepage" name="onepagecheckout" template="onepagecheckout/onepagecheckout.phtml">
                <block type="customer/form_login" name="customer.login" template="onepagecheckout/login.phtml"/>
                <block type="customer/account_forgotpassword" name="customer.forgot" template="onepagecheckout/forgotpassword.phtml"/>

                <block type="onepagecheckout/onepage_billship" name="checkout.onepage.billing" as="billing.address" template="onepagecheckout/onepage/billing.phtml"/>
                <block type="onepagecheckout/onepage_billship" name="checkout.onepage.shipping" as="shipping.address" template="onepagecheckout/onepage/shipping.phtml"/>

                <block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping.method" template="onepagecheckout/onepage/shipping_method.phtml">
                    <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="onepagecheckout/onepage/shipping_method/available.phtml"/>
                    <block type="checkout/onepage_shipping_method_additional" name="checkout.onepage.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/>
                </block>

                <block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment.method" template="onepagecheckout/onepage/payment.phtml">
                    <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="onepagecheckout/onepage/payment/methods.phtml">
                        <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
                    </block>
                </block>

                <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="onepagecheckout/onepage/coupon.phtml"/>

                <block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="onepagecheckout/onepage/review.phtml">
                    <block type="onepagecheckout/agreements" name="checkout.onepage.agreements" as="agreements" template="onepagecheckout/onepage/agreements.phtml"/>
                    <block type="checkout/onepage_review_info" name="info" template="onepagecheckout/onepage/review/info.phtml">
                        <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>onepagecheckout/onepage/review/item.phtml</template></action>
                        <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>onepagecheckout/onepage/review/item.phtml</template></action>
                        <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>onepagecheckout/onepage/review/item.phtml</template></action>
                        <block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="onepagecheckout/onepage/review/totals.phtml"/>
                        <block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before"/>
                    </block>
                </block>
                <block type="onepagecheckout/addresscandidates" name="checkout.addresscandidates" as="addresscandidates" template="onepagecheckout/onepage/address_candidates.phtml"/>
            </block>
        </reference>
    </onepagecheckout_index_index>

    <checkout_cart_index>    

        <reference name="checkout.cart.top_methods">
            <action method="unsetChild" ifconfig="onepagecheckout/general/enabled"><name>checkout.cart.methods.onepage.top</name></action>
            <action method="unsetChild" ifconfig="onepagecheckout/general/enabled"><name>checkout.cart.methods.onepage</name></action>
        </reference>

        <reference name="checkout.cart.methods">
            <action method="unsetChild" ifconfig="onepagecheckout/general/enabled"><name>checkout.cart.methods.onepage.bottom</name></action>
            <action method="unsetChild" ifconfig="onepagecheckout/general/enabled"><name>checkout.cart.methods.onepage</name></action>
        </reference>

        <reference name="checkout.cart.top_methods">            
            <block ifconfig="onepagecheckout/general/enabled" type="onepagecheckout/onepage_link" name="checkout.cart.methods.fire" template="onepagecheckout/onepage/link.phtml"/>
        </reference>

        <reference name="checkout.cart.methods">
            <block ifconfig="onepagecheckout/general/enabled" type="onepagecheckout/onepage_link" name="checkout.cart.methods.fire" template="onepagecheckout/onepage/link.phtml"/>
        </reference>
    </checkout_cart_index>

    <onepagecheckout_index_updatecheckout>
        <remove name="right"/>
        <remove name="left"/>
        <block type="checkout/onepage_payment_methods" name="checkout.payment.method" template="onepagecheckout/onepage/payment/methods.phtml">
            <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
        </block>
        <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="onepagecheckout/onepage/coupon.phtml"/>
         <block type="checkout/onepage_shipping_method_available" name="checkout.shipping.method" template="onepagecheckout/onepage/shipping_method/available.phtml"/>
        <block type="checkout/onepage_review_info" name="checkout.review" template="onepagecheckout/onepage/review/info.phtml">
            <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>onepagecheckout/onepage/review/item.phtml</template></action>
            <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>onepagecheckout/onepage/review/item.phtml</template></action>
            <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>onepagecheckout/onepage/review/item.phtml</template></action>
            <block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="onepagecheckout/onepage/review/totals.phtml"/>
            <block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before"/>
        </block>
        <block type="onepagecheckout/addresscandidates" name="checkout.addresscandidates" as="addresscandidates" template="onepagecheckout/onepage/address_candidates.phtml"/>
    </onepagecheckout_index_updatecheckout>

    <onepagecheckout_index_success translate="label">
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml"/>
        </reference>
    </onepagecheckout_index_success>

    <onepagecheckout_index_failure translate="label">
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="checkout/onepage_failure" name="checkout.failure" template="checkout/onepage/failure.phtml"/>
        </reference>
    </onepagecheckout_index_failure>
</layout>

【问题讨论】:

    标签: magento


    【解决方案1】:

    您好,请使用以下代码-

      <onepagecheckout_index_index translate="label"> 
    <label>One Page Checkout</label>
            <remove name="left"/>
            <remove name="right"/>
            <reference name="root">
                <action method="setTemplate"><template>page/1column.phtml</template></action>
            </reference>
            <reference name="head">
                <action method="addItem" ifconfig="onepagecheckout/general/enabled"><type>skin_css</type><name>css/onepagecheckout.css</name></action>
            </reference>
    
         <reference name="breadcrumbs"> 
                    <action method="addCrumb"> 
                    <name>home</name> 
                                                <params> 
                                                    <label>Home</label> 
                                                     <title>Home</title> 
                                                    <link></link> 
                                                </params> 
                         </action>
    
                         <action method="addCrumb"> 
                    <name>Onepage checkout</name> 
                                                <params> 
                                                    <label>OnePage Checkout</label> 
                                                     <title>OnePage Checkout</title> 
                                                    <link>{{baseSecureUrl}}onepagecheckout</link> 
                                                </params> 
                         </action>
                  </reference>
        .......
    

    参考链接-'http://web.gillady.com/magento/magento-add-breadcrumb-for-custom-module'

    1:http://web.gillady.com/magento/magento-add-breadcrumb-for-custom-moduleHow to add an item to magento breadcrumbs

    【讨论】:

    • 我在 /app/design/frontend/base/default/layout/onepagecheckout.xml 中添加了它,但它并没有解决问题......
    • 请提供有关 onepage.xml 的更多详细信息
    • 我编辑了我的问题并添加了 onepagecheckout.xml 的代码
    • 可以请再查一下
    • 这是我的页面链接 [link]epbitservices.com/demo/globalcart/demo/globalcart/us/index.php/checkout/onepage/
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多