I see below configuration in Magento 2 layout at vendor\magento\module-checkout\view\frontend\layout\checkout_cart_index.xml
. I created custom module and copied existing Link Block and link.phtml to the custom module folders.
<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>
I tried to override by adding one of the entry in app/code/Vendor/Checkout/view/frontend/layout/checkout_cart_index.xml
but getting error 500 with first approach.
<referenceContainer name="checkout.cart.methods">
<block class="Vendor\Checkout\Block\Onepage\CustomLink" name="custom.checkout.cart.methods.onepage.bottom" template="Vendor_Checkout::onepage/customlink.phtml">
</block>
</referenceContainer>
I do see custom Block and phtml files in Commerce Bug tool but not seeing any code getting displayed from these files. Please shed some light since none of the approaches listed at also didn't help.
<referenceContainer name="checkout.cart.methods.onepage.bottom">
<block class="Vendor\Checkout\Block\Onepage\CustomLink" name="custom.checkout.cart.methods.onepage.bottom" template="Vendor_Checkout::onepage/customlink.phtml">
</block>
</referenceContainer>