我正在尝试从单页结帐中删除页脚链接,但将其保留为单页成功页面。
这是我的checkout.xml
<!-- Mage_Checkout -->
<reference name="top.links">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCartLink"></action>
<action method="addCheckoutLink"></action>
</block>
</reference>
<reference name="right">
<block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="catalog.product.related" after="-">
<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
<block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
<label>Shopping Cart Sidebar Extra Actions</label>
</block>
</block>
</reference>
</default>
<checkout_cart_index translate="label">
<label>Shopping Cart</label>
<remove name="right"/>
<remove name="left"/>
<!-- Mage_Checkout -->
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="checkout/cart" name="checkout.cart">
<block type="page/html_header" name="header" as="header" template="page/html/mini-header.phtml"/>
<!--<block type="page/html_footer" name="footer" as="footer" template="page/html/mini-footer.phtml"/>-->
<action method="setCartTemplate"><value>checkout/cart.phtml</value></action>
<action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
<action method="chooseTemplate"/>
<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action>
<block type="core/text_list" name="checkout.cart.top_methods" as="top_methods" translate="label">
<label>Payment Methods Before Checkout Button</label>
<block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
</block>
<block type="page/html_wrapper" name="checkout.cart.form.before" as="form_before" translate="label">
<label>Shopping Cart Form Before</label>
</block>
<block type="core/text_list" name="checkout.cart.methods" as="methods" translate="label">
<label>Payment Methods After Checkout Button</label>
<block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
<block type="checkout/multishipping_link" name="checkout.cart.methods.multishipping" template="checkout/multishipping/link.phtml"/>
</block>
<block type="checkout/cart_coupon" name="checkout.cart.coupons" as="coupon" template="checkout/cart/coupon.phtml"/>
<!--<block type="checkout/cart_coupon" name="checkout.cart.coupons" as="coupondummy" template="checkout/cart/coupon1.phtml"/>-->
<block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>
<block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>
<block type="checkout/cart_totals" name="checkout.cart.totals" as="totals" template="checkout/cart/totals.phtml"/>
</block>
</reference>
<block type="core/text_list" name="additional.product.info" translate="label">
<label>Additional Product Info</label>
</block>
</checkout_cart_index>
<checkout_cart_configure translate="label">
<label>Configure Cart Item</label>
<update handle="catalog_product_view"/>
<reference name="product.info">
<block type="checkout/cart_item_configure" name="checkout.cart.item.configure.block"></block>
</reference>
</checkout_cart_configure>
<checkout_multishipping translate="label">
<label>Multishipping Checkout</label>
<!-- Mage_Checkout -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="checkout/multishipping_state" name="checkout_state" template="checkout/multishipping/state.phtml"/>
</reference>
</checkout_multishipping>
<checkout_multishipping_login>
<update handle="customer_account_login"/>
</checkout_multishipping_login>
<checkout_multishipping_register>
<update handle="customer_account_create"/>
</checkout_multishipping_register>
<checkout_multishipping_address_select translate="label">
<label>Multishipping Checkout Shipping Address Selection</label>
<update handle="checkout_multishipping"/>
<!-- Mage_Checkout -->
<reference name="content">
<block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
</reference>
</checkout_multishipping_address_select>
<checkout_multishipping_address_selectbilling translate="label">
<label>Multishipping Checkout Billing Address Selection</label>
<update handle="checkout_multishipping"/>
<!-- Mage_Checkout -->
<reference name="content">
<block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
</reference>
</checkout_multishipping_address_selectbilling>
<checkout_multishipping_address_newshipping translate="label">
<label>Multishipping Checkout Shipping Address Creation</label>
<update handle="checkout_multishipping"/>
<update handle="checkout_multishipping_customer_address"/>
</checkout_multishipping_address_newshipping>
<checkout_multishipping_address_newbilling translate="label">
<label>Multishipping Checkout Billing Address Creation</label>
<update handle="checkout_multishipping"/>
<update handle="checkout_multishipping_customer_address"/>
</checkout_multishipping_address_newbilling>
<checkout_multishipping_address_editshipping translate="label">
<label>Multishipping Checkout Shipping Address Edit Form</label>
<update handle="checkout_multishipping"/>
<update handle="checkout_multishipping_customer_address"/>
</checkout_multishipping_address_editshipping>
<checkout_multishipping_address_editaddress>
<update handle="checkout_multishipping"/>
<update handle="checkout_multishipping_customer_address"/>
</checkout_multishipping_address_editaddress>
<checkout_multishipping_address_editbilling translate="label">
<label>Multishipping Checkout Billing Address Edit Form</label>
<update handle="checkout_multishipping"/>
<update handle="checkout_multishipping_customer_address"/>
</checkout_multishipping_address_editbilling>
<checkout_multishipping_customer_address translate="label">
<label>Multishipping Checkout Customer Address Edit Form</label>
<reference name="content">
<block type="customer/address_edit" name="customer_address_edit" template="customer/address/edit.phtml"/>
</reference>
</checkout_multishipping_customer_address>
<checkout_multishipping_addresses translate="label">
<label>Multishipping Checkout Address (Any) Form</label>
<update handle="checkout_multishipping"/>
<!-- Mage_Checkout -->
<reference name="content">
<block type="checkout/multishipping_addresses" name="checkout_addresses" template="checkout/multishipping/addresses.phtml">
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
</block>
</reference>
</checkout_multishipping_addresses>
<checkout_multishipping_shipping translate="label">
<label>Multishipping Checkout Shipping Information Step</label>
<update handle="checkout_multishipping"/>
<!-- Mage_Checkout -->
<reference name="content">
<block type="checkout/multishipping_shipping" name="checkout_shipping" template="checkout/multishipping/shipping.phtml">
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
<block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
</block>
</block>
</reference>
</checkout_multishipping_shipping>
<checkout_multishipping_billing translate="label">
<label>Multishipping Checkout Billing Information Step</label>
<update handle="checkout_multishipping"/>
<!-- Mage_Checkout -->
<reference name="content">
<block type="checkout/multishipping_billing" name="checkout_billing" template="checkout/multishipping/billing.phtml">
<action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
<!--<block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
</block>-->
</block>
</reference>
</checkout_multishipping_billing>
<checkout_multishipping_overview translate="label">
<label>Multishipping Checkout Overview</label>
<update handle="checkout_multishipping"/>
<!-- Mage_Checkout -->
<reference name="content">
<block type="checkout/multishipping_overview" name="checkout_overview" template="checkout/multishipping/overview.phtml">
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
<action method="addRowItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/overview/item.phtml</template></action>
<action method="addRowItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/overview/item.phtml</template></action>
<block type="checkout/multishipping_payment_info" name="payment_info">
<action method="setInfoTemplate"><method></method><template></template></action>
</block>
<block type="checkout/agreements" name="checkout.multishipping.agreements" as="agreements" template="checkout/multishipping/agreements.phtml"/>
<block type="checkout/cart_totals" name="totals" />
<block type="core/text_list" name="checkout.multishipping.overview.items.after" as="items_after" translate="label">
<label>Overview Items After</label>
</block>
</block>
</reference>
</checkout_multishipping_overview>
<checkout_multishipping_success translate="label">
<label>Multishipping Checkout Success</label>
<update handle="checkout_multishipping"/>
<!-- Mage_Checkout -->
<reference name="content">
<block type="checkout/multishipping_success" name="checkout_success" template="checkout/multishipping/success.phtml"/>
</reference>
</checkout_multishipping_success>
<checkout_onepage_index translate="label">
<label>One Page Checkout</label>
<!-- Mage_Checkout -->
<remove name="right"/>
<remove name="nosto.page.top"/>
<remove name="nosto.page.footer"/>
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
<block type="page/html_header" name="header" as="header" template="page/html/mini-header.phtml"/>
<block type="page/html_footer" name="footer" as="footer" template="page/html/mini-footer.phtml"/>
</reference>
<reference name="footer">
<remove name="footer_sitemap" />
</reference>
<reference name="left">
<action method="unsetChildren"></action>
<block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label">
<label>Checkout Progress Wrapper</label>
<action method="setElementId"><value>checkout-progress-wrapper</value></action>
<block type="checkout/onepage_progress" name="checkout.progress" before="-" template="checkout/onepage/progress.phtml"/>
</block>
</reference>
<reference name="content">
<block type="checkout/onepage" name="checkout.onepage" template="checkout/onepage.phtml">
<block type="checkout/onepage_login" name="checkout.onepage.login" as="login" template="checkout/onepage/login.phtml">
<block type="page/html_wrapper" name="checkout.onepage.login.before" as="login_before" translate="label">
<label>Login/Registration Before</label>
<action method="setMayBeInvisible"><value>1</value></action>
</block>
</block>
<!--<block type="raptor/checkout_onepage_org" name="checkout.onepage.org" as="org" template="raptor/checkout/onepage/organisation.phtml" after="login" />-->
<block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"/>
<block type="checkout/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="checkout/onepage/shipping.phtml"/>
<block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="checkout/onepage/shipping_method.phtml">
<block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="checkout/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" template="checkout/onepage/payment.phtml">
<block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/methods.phtml">
<action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
</block>
</block>
<block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml"/>
<!--block type="checkout/onepage_orderreview" name="checkout.order.review" as="orderreview" template="checkout/onepage/orderreview.phtml"/-->
</block>
</reference>
</checkout_onepage_index>
<checkout_onepage_progress>
<!-- Mage_Checkout -->
<remove name="right"/>
<remove name="left"/>
<block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress.phtml">
<block type="checkout/onepage_payment_info" name="payment_info">
<action method="setInfoTemplate"><method></method><template></template></action>
</block>
</block>
</checkout_onepage_progress>
<block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="checkout/onepage/payment/methods.phtml">
<action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
</block>
</checkout_onepage_paymentmethod>
<checkout_onepage_shippingmethod>
<!-- Mage_Checkout -->
<remove name="right"/>
<remove name="left"/>
<block type="checkout/onepage_shipping_method_available" name="root" output="toHtml" template="checkout/onepage/shipping_method/available.phtml"/>
</checkout_onepage_shippingmethod>
<checkout_onepage_additional>
<!-- Mage_Checkout -->
<remove name="right"/>
<remove name="left"/>
<block type="checkout/onepage_shipping_method_additional" name="root" output="toHtml" template="checkout/onepage/shipping_method/additional.phtml">
<action method="setDontDisplayContainer"><param>1</param></action>
</block>
</checkout_onepage_additional>
<checkout_onepage_review translate="label">
<label>One Page Checkout Overview</label>
<!-- Mage_Checkout -->
<remove name="right"/>
<remove name="left"/>
<block type="checkout/onepage_review_info" name="root" output="toHtml" template="checkout/onepage/review/info.phtml">
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/onepage/review/item.phtml</template></action>
<block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals.phtml"/>
<block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before" translate="label">
<label>Items Before</label>
<block type="core/template" name="checkout.onepage.review.terms" template="checkout/onepage/review/terms.phtml"/>
</block>
<block type="core/text_list" name="checkout.onepage.review.info.items.after" as="items_after" translate="label">
<label>Items After</label>
</block>
<block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
<block type="core/template" name="checkout.onepage.review.button" as="button" template="checkout/onepage/review/button.phtml"/>
</block>
</checkout_onepage_review>
<checkout_onepage_success translate="label">
<label>One Page Checkout Success</label>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml">
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml"/>
</block>
</reference>
</checkout_onepage_success>
<checkout_onepage_failure translate="label">
<label>One Page Checkout Failure</label>
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
<reference name="content">
<block type="checkout/onepage_failure" name="checkout.failure" template="checkout/onepage/failure.phtml"/>
</reference>
</checkout_onepage_failure>
<block type="core/list" name="additional.product.info"/>
如何修改checkout.xml以执行此操作,因此它使用相同的footer.phtml文件,因此会发生以下情况..
if user on onepage checkout
remove footer links
else
show footer links
// footer.phtml
<div class="footer-container">
<div class="inner footer">
<div>
<div class="address_block">
<?php echo $this->getChildHtml() ?>
<p class="copyright"><?php echo $this->getCopyright() ?></p>
</div>
</div>
答案 0 :(得分:0)
将此代码添加到checkout_onepage_index
文件
checkout.xml
标记内
<reference name="footer">
<action method="unsetChild"><name>footer_links</name></action>
</reference>
或使用此代码
<reference name="footer">
<remove name="footer_links"></remove>
</reference>