抱歉如果我的问题重复或天真...
我是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>
答案 0 :(得分:2)
您好请使用以下代码 -
<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-module或How to add an item to magento breadcrumbs