0

I want to move the Ebizmarts_MageMonkey_Block_Checkout_Subscribe block to be under Mage_Checkout_Block_Agreements. What would be the best way to approach it?

Here is a screen shot of current layout:

enter image description here

Please let me know if you need anymore information!

  • When you say "under" you mean "inside"? Or literally "under"? – Raul Sanchez May 22 '18 at 16:27
  • To be fair, any would do me good. I just need to move this block to be below the other one... – Greg May 23 '18 at 7:28
1

As this is a customization over MageMonkey module, I'd make the change in his layout (not tested, just an idea)

app/design/frontend/XXX/XXX/layout/magemonkey.xml

And then, change

<!-- Checkout -->
<checkout_onepage_review>
    <reference name="checkout.onepage.review.info.items.after">
        <block type="monkey/checkout_subscribe" name="magemonkey.subscribe"
               template="magemonkey/checkout/subscribe.phtml">
            <block type="monkey/signup" name="left.monkeysignup" template="magemonkey/lists.phtml"/>
        </block>
    </reference>
</checkout_onepage_review>

For this

<!-- Checkout -->
<checkout_onepage_review>
    <reference name="checkout.onepage.agreements">
        <block type="monkey/checkout_subscribe" name="magemonkey.subscribe"
               template="magemonkey/checkout/subscribe.phtml" output="toHtml">
            <block type="monkey/signup" name="left.monkeysignup" template="magemonkey/lists.phtml"/>
        </block>
    </reference>
</checkout_onepage_review>

Basically, there are 2 changes:

  1. Change reference block to inject content from checkout.onepage.review.info.items.after to your desired one: checkout.onepage.agreements
  2. We need to add output="toHtml" code to print the block's output, as new parent block won't do that by default (previous one did it, as it has type = core/text_list)
  • Hi @RaulSanchez! Thank you for your interest. The above completely removed the block from "Review" section. – Greg May 23 '18 at 7:25
  • Thank for directing me anyway. I feel like I'm a step closer. Changing the reference to checkout.onepage.review.info.items.before worked and the block moved so I'm guessing it's something wrong with the output="toHtml" but not quiet sure what. – Greg May 23 '18 at 7:52
  • output="toHtml" didn't work, however, adding this: <?php echo $this->getChildHtml('magemonkey.subscribe') ?> to agreements.phtml file worked for me :) – Greg May 23 '18 at 12:30
  • Nice... output parameter was a try to avoid editing the agreements template – Raul Sanchez May 23 '18 at 14:15
  • 1
    No need to update, I am glad if it helped ;) Feel free to give some upvote or write your own answer & accept that as the valid one – Raul Sanchez May 23 '18 at 15:01

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.