I'm trying to add some some code on the checkout success page in the footer. Is there a conditional to check if its the checkout success page?

1 Answer 1


There's a layout called checkout_onepage_success. So basically you could do whatever you want there, such as:

        <reference name="footer">
            <block type="cms/block" name="static-block">
                <action method="setBlockId"><block_id>static-block</block_id></action>

Put something like that:

<?php echo $this->getChildHtml('static-block'); ?>

... to your footer and whenever you're on successful checkout page you'll see your static block.

  • For sure this is the way to go, but there is a problem when the cache is turned on. The footer is cached independent of the page. You will need to modify the footer block cache key so it will cache a different version for the success page. If the info shown on the success page is customer dependent, the customer id must be in the key. If it's order dependent, the order id must be in the cache key
    – Marius
    Jun 3, 2014 at 7:12

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.