2

Default Magento themes and pretty much every custom theme as the checkout button at the bottom after the totals of the cart etc. Looking to create the exact same button at the top of the shopping basket page too. I would imagine floating using css would be the best method? Had a quick play about with, but can't get anything happening at all. I've tried editing my theme's styles.css file. I wonder if any editing of the xml page for the basket is needed though? I thought it would be pretty straight forward, but seems to be more complex than I had hoped! Any help would be appreciated.

  • You better refer Magento default theme. It has this functionality. – Sukeshini Nov 14 '13 at 3:58
  • Your right it does!! I've not used the default theme in around 18 months, but found a copy locally that I still have live. I'll work it out from here I think. Cheers for shouting that out :) – MagentoMac Nov 14 '13 at 10:26
  • @Blair did you ever solve this? – David Manners Aug 18 '14 at 13:52
2

The "Proceed to Checkout" button is added at the top of the template /app/design/frontend/base/default/template/checkout/cart.phtml by looping through all the 'top_methods'.

<ul class="checkout-types">
    <?php foreach ($this->getMethods('top_methods') as $method): ?>
        <?php if ($methodHtml = $this->getMethodHtml($method)): ?>
        <li><?php echo $methodHtml; ?></li>
        <?php endif; ?>
    <?php endforeach; ?>
</ul>

This is different from the bottom of the template where it loops through the 'methods' I would suggest that either the 'top_methods' loop has been removed from your template or the methods are not being added.

The methods are added via layout.xml file, normally in /app/design/frontend/base/default/layout/checkout.xml with the following code:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.