I want to remove the 'Proceed to Checkout' button when the qty reaches a specified limit. For that I add a condition check in this page
module-checkout\view\frontend\templates\onepage\link.phtml
On qty update I have added an ajax call to the controller and passing the layouts as the ajax response and load the section. I am following the below link
How to Render an HTML Using an Ajax Call in Magento 2 Module
In my controller I have added the below code
$block = $resultPage->getLayout()
->createBlock('Magento\Checkout\Block\Cart')
->setTemplate('Magento_Checkout::cart/methods.phtml')
->toHtml();
The issue is that, the checkout button is not loading since it is a child of this block.
<block class="Magento\Checkout\Block\Cart" name="checkout.cart.methods.bottom" template="Magento_Checkout::cart/methods.phtml">
<container name="checkout.cart.methods" as="methods" label="Payment Methods After Checkout Button">
<block class="Magento\Checkout\Block\Onepage\Link" name="checkout.cart.methods.onepage.bottom" template="Magento_Checkout::onepage/link.phtml" />
<block class="Magento\Checkout\Block\QuoteShortcutButtons" name="checkout.cart.shortcut.buttons" />
</container>
</block>
Now, I need to render the child blocks along with this.
How can I do this?