Minimum amount text shows perfectly until it cross the amount of 75 after that its show undefined variable for an eg. I added a $20 product, 2 times so my cart is $40 so my conditions shows "Minimum Order Value $75 to proceed Check out" again now I have added another product of 10 dollars, now my cart is $50 so my conditions shows "Minimum Order Value $75 to proceed Check out" text but the same once my cart crosses $75 its shows the below error
error
Notice: Undefined variable: error_min_amount in C:\xampp\htdocs\optest\catalog\view\theme\default\template\product\product.tpl on line 176
product.tpl view code
<?php if ($error_min_amount) { ?>
<div class="alert alert-danger"> <?php echo $error_min_amount; ?></div>
<?php } ?>
product.php controller code
//msg minimum value
$subtotal = '75';
// echo $subtotal .'<br />';
$data['cyc'] = $this->currency->format($subtotal, $this->session->data['currency'], false, false);
//echo $data['cyc'] .'<br />';
if($this->session->data['currency'] == 'EUR') :
if($this->cart->getSubtotal() < $data['cyc']) :
$data['error_min_amount'] = 'Minimum Order Value €'.$data['cyc'].' to proceed Check out';
endif;
elseif($this->session->data['currency'] == 'USD') :
if($this->cart->getSubtotal() < $data['cyc']) :
$data['error_min_amount'] = 'Minimum Order Value $'.$data['cyc'].' to proceed Check out';
endif;
elseif($this->session->data['currency'] == 'GBP') :
if($this->cart->getSubtotal() < $data['cyc']) :
$data['error_min_amount'] = 'Minimum Order Value £'.$data['cyc'] .' to proceed Check out';
endif;
endif;