I am in Opencart and trying to display a price that has been divided by 1000 then times by 38. I have two files, product.php and product.tpl The tpl file is the front end and php file is the back end.
In the php file I have:
if($special>0){
$lease_price = (($special/1000)*38);
} else {
$lease_price = (($price/1000)*38);
}
$lease_price = $this->currency->format($lease_price);
and in the tpl file I have:
<p>
<i class="fa fa-chevron-down"></i>
<b>Lease To Buy Price:</b>
<span><?php if($price>500){ ?>
<?php echo $lease_price; ?>
<?php } else { echo 'NA'; } ?></span>
</p>
The $special tag is the price of the product when on offer and the $price tag is the normal price.
Here's the page I'm trying to implement this on: http://www.framec.co.uk/index.php?route=product/product&product_id=50
This doesn't seem to work; it only shows NA. Does anyone know what could be the issue here? Thanks :)