Magento – Disable “Proceed to Checkout” button on cart page magento 2

cartcheckoutmagento-2.2.5shopping-cart

In my custom module I have to check some conditions and have to disable "Proceed to Checkout" button from the Cart page.

I know it's coming from

magento\vendor\magento\module-checkout\view\frontend\templates\onepage\link.phtml

I can override this but I have to also override block for this. Is there any other way to achieve this?

Best Answer

In your custom module or if you have a design template create view -> frontend -> templates -> onepage -> link.phtml and inside just put:

<?php

?>
<?php if ($block->isPossibleOnepageCheckout()):?>

<?php endif?>

This should just not create the button.

Related Topic