I am trying to implement below code from here in catalogue/view/theme/default/template/checkout/confirm.tpl
<?php if ($this->cart->getSubtotal() >= 1000) { ?>
<div id="payment"><?php echo $payment; ?></div>
<?php } else { ?>
<div class="warning">Minimum 10 Euro to checkout</div>
<?php } ?>
but i am getting an error
Notice: Undefined property: Loader::$cart in C:\xampp\htdocs\optest\catalog\view\theme\default\template\checkout\confirm.tpl on line 51
Fatal error: Call to a member function getSubtotal() on null in C:\xampp\htdocs\optest\catalog\view\theme\default\template\checkout\confirm.tpl on line 51
reference taken:
The code below is working for me:
Not the same way but you can do it like this:
Add this line in your checkout.php controller file.
After
Thats it.