Menu Close
    Searching for an experienced Magento 2 Development Company ?

    Display custom block on the checkout cart page in Magento 2

    Hello Friends!

    In Magento 2, sometimes we need to save additional information in quotes or we want to display some information on the cart page on the frontend. So, we can achieve the same by following steps:

    1. Create checkout_cart_index.xml file inside the app/code/Vendor/CustomModule/view/frontend/layout/ directory.

    <?xml version="1.0"?>
    <!-- /**
     * Vendor Desc.
     * @category Vendor
     * @package Vendor_CustomModule
     * @author Vendor
     * @copyright Copyright (c) Vendor
     * @license
     */ -->
     <page xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <referenceContainer name="checkout.cart.order.actions">
                <block class="Magento\Framework\View\Element\Template" 

    2. Create the customblock.phtml file inside the app/code/Vendor/CustomModule/view/frontend/templates/ directory.

    <p style="color:green;">
        Custom Block<br/>
        Write your content Here...OR Create a Form

    3. Look at the result in the following image.

    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*

    Be the first to comment.

    Back to Top