0

I am trying to add my static block into the Magento one page checkout. More specifically under the Progress section of the page (see attached image). Unfortunately I cannot find anything online nor does my code seem to work. Any ideas?

local.xml

    <!-- Checkout Page -->
    <checkout_onepage_progress>    
        <remove name="right"/>
        <remove name="left"/>
        <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress.phtml">
            <action method="setInfoTemplate"><method></method><template></template></action>
            <block type="cms/block" name="card_scheme_marks"></block>
        </block>
    </checkout_onepage_progress>

progress.phtml

    <div id="payment-card-scheme-marks">
        <?php echo $this->getChildHtml('card_scheme_marks') ;?>
    </div>

Static Block In Backend: static block in back end

Checkout page, the progress section is on the right: one page checkout

Daniel Vickers
  • 1,054
  • 1
  • 12
  • 32

1 Answers1

1

In your local.xml you need to reference the block you want to update instead of recreating it. Once that is done you can make your CMS block and assign the correct id to it. The block will be a child of the one you're referencing so you will still need your $this->getChildHtml();

<!-- Checkout Page -->
<checkout_onepage_index>
    <reference name="checkout.progress">
        <block type="cms/block" name="card_scheme_marks">
            <action method="setBlockId"><block_id>card_scheme_marks</block_id></action>
        </block>
    </reference>
</checkout_onepage_index>
Charles
  • 1,121
  • 19
  • 30
  • This does not put it into the section, it disappears completely when referencing the root. – Daniel Vickers Jul 28 '17 at 10:10
  • @DanielVickers I've updated my answer. Basically I changed the handle to "checkout_onepage_index" instead of progress (you may want to have one for progress as well that uses root, however it looks like that handle isn't used by what you want to update) and changed the reference to "checkout.progress". I tested it on 1.9.2.4 and it's working for me. – Charles Jul 28 '17 at 15:09
  • Thanks for the updated answer, it looks like there must be a further issue as it doesn't work for me. Thanks for your efforts! – Daniel Vickers Jul 31 '17 at 15:44