I want to add some text and images below proceed to checkout button on cart page but I am not able to find the file so that I can add my classes and images as well as text.

Please suggest me in which file I will need to update.

Below is attached screenshot please check it:

enter image description here

2 Answers 2


enable frontend template hint from admin and you will find the file of your theme for checkout page.

  • Already enabled but not getting exactly.
    – akgola
    Oct 17, 2018 at 12:08
  • please choose store scope first then ENABLE template path hint for frontend Oct 17, 2018 at 12:12
  • vendor/magento/module-checkout/view/frontend/templates/onepage/link.phtml proceed to checkout button is coming from this template
    – Akash
    Oct 17, 2018 at 12:12
  • vendor/magento/module-checkout/view/frontend/templates/cart.phtml check if you have same file in your theme folder and edit it. Make sure you take backup before making any changes.
    – Akash
    Oct 17, 2018 at 12:15
  • @John vendor/magento/module-checkout/view/frontend/templates/cart.phtml //this will work for me.thanks
    – akgola
    Oct 17, 2018 at 12:20

You can use viewModel to add custom content. You can create custom module for this.


<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceContainer name="content">
            <block name="customcartblock" template="Anshu_Custom::customcartblock.phtml" after="-">
                    <argument name="viewModel" xsi:type="object">Anshu\Custom\ViewModel\Customcartblock</argument>



namespace Anshu\Custom\ViewModel;

use Magento\Framework\View\Element\Block\ArgumentInterface;
use Magento\Framework\DataObject;

class Customcartblock extends DataObject implements ArgumentInterface
    public function getSomeThing()
        return 'This is the custom text.';


$viewModel = $block->getData('viewModel');

This is the sample code. You can modify it according to your requirement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.