title: Simple PHP - Doing Maths and Displaying an answer in PHP?
body: <p>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.</p>
  
  <p>In the php file I have:</p>
  
  <pre><code>                if($special&gt;0){
                      $lease_price = (($special/1000)*38);
                      } else {
                      $lease_price = (($price/1000)*38);
                      }
                      $lease_price = $this-&gt;currency-&gt;format($lease_price);
  </code></pre>
  
  <p>and in the tpl file I have:</p>
  
  <pre><code>                    &lt;p&gt;
                          &lt;i class="fa fa-chevron-down"&gt;&lt;/i&gt;
                          &lt;b&gt;Lease To Buy Price:&lt;/b&gt;
                          &lt;span&gt;&lt;?php if($price&gt;500){ ?&gt;
            &lt;?php echo $lease_price; ?&gt;
            &lt;?php } else { echo 'NA'; } ?&gt;&lt;/span&gt;                     
                      &lt;/p&gt;    
  </code></pre>
  
  <p>The $special tag is the price of the product when on offer and the $price tag is the normal price.</p>
  
  <p>Here's the page I'm trying to implement this on: <a href="http://www.framec.co.uk/index.php?route=product/product&amp;product_id=50" rel="nofollow">http://www.framec.co.uk/index.php?route=product/product&amp;product_id=50</a></p>
  
  <p>This doesn't seem to work; it only shows NA. Does anyone know what could be the issue here?
  Thanks :)</p>