#StackBounty: #magento2 #checkout #giftmessage Moving Gift message form block from Cart to Checkout step 1

Bounty: 100

I’m trying to move the Gift Options block(gift message form) from the current Shopping cart page to the first step of the Checkout (Shipping). I need to place it right under Shipping Methods. I tried adding a GiftMessage module to my theme and within this modified the layout file checkout_index_index.xml to reference the checkout root block for Gift Message insertion, but it was of no use. Any help would be greatly appreciated. Thanks!

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="checkout.root">
        <block class="MagentoGiftMessageBlockCartGiftOptions" name="checkout.cart.order.actions.gift_options" template="cart/gift_options.phtml" cacheable="false">
                <argument name="jsLayout" xsi:type="array">
                    <item name="types" xsi:type="array"/>
                    <item name="components" xsi:type="array">
                        <item name="giftOptionsCart" xsi:type="array">
                            <item name="component" xsi:type="string">Magento_GiftMessage/js/view/gift-message</item>
                            <item name="config" xsi:type="array">
                                <item name="template" xsi:type="string">Magento_GiftMessage/gift-message</item>
                                <item name="formTemplate" xsi:type="string">Magento_GiftMessage/gift-message-form</item>

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.