magento - How do I add the proceed to checkout button outside of the cart page using layout.xml? -


i believe code within phtml file creates "proceed checkout" button:

<?php if(!$this->haserror()): ?>     <ul class="checkout-types">         <?php foreach ($this->getmethods('top_methods') $method): ?>             <?php if ($methodhtml = $this->getmethodhtml($method)): ?>                 <li><?php echo $methodhtml; ?></li>             <?php endif; ?>         <?php endforeach; ?>     </ul> <?php endif; ?> 

however when add phtml file sibling cart.phtml error saying invalid argument being supplied foreach.

i tried adding block:

<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> 

taken checkout.xml layout file, own block, adfter tht totals block:

<block type="page/html" name="checkout_process" as="checkout_process" template="page/html/checkout_process.phtml">                       <block type="checkout/cart_totals" name="checkout.cart.totals" as="totals" template="checkout/cart/totals.phtml"/> </block> 

however did nothing, missing something, thought allow me include button?

where did place code? not blocks printed automaticly need printed $this->getchildhtml('your_block') (see magento-layouts-blocks-and-templates). here minimal example adding button right column, placed in local.xml layout file:

<layout version="0.1.0"> <default>     <reference name="right">         <block type="checkout/onepage_link" name="my.cart.button" template="checkout/onepage/link.phtml"/>     </reference> </default> 


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -