Ernie
openshop.li
Attachments
screwed up subtotal amount - golden_oak.jpg (40.1 KiB) Viewed 2718 times
For Sale: Turnkey Top URLs with Opencart installed!
Latest Opencart LIGHT + V-Pro Test Site: http://www.hitline.info
For more Information, please contact me at: jti@jacob.ch
Free OC Extensions from the largest Github OC Archive on Earth,
635 + free Repositories - from OC v.1.5.x up
on my Github Opencart Site: https://github.com/IP-CAM
Ernie
For Sale: Turnkey Top URLs with Opencart installed!
Latest Opencart LIGHT + V-Pro Test Site: http://www.hitline.info
For more Information, please contact me at: jti@jacob.ch
Free OC Extensions from the largest Github OC Archive on Earth,
635 + free Repositories - from OC v.1.5.x up
on my Github Opencart Site: https://github.com/IP-CAM
<div class="cart-total">
<table id="total">
<?php
$productq=0;
$productprice=0;
foreach ($products as $product) {
$productq = $productq + $product['quantity'];
$proprice=$product['total'];
$propri=substr($proprice,2);
$productprice=$productprice+$propri;
}
$val=0;
?>
<?php foreach ($totals as $total) {
$title=$total['title'];
$vat= $productprice/5;
if($title=='Flat Shipping Rate')
{
$val=substr($total['text'],2);
}
if($title=='VAT (20%)')
{
$ttl=$productprice+$vat+$val;
}
?>
<tr>
<td class="right"><b><?php echo $title; ?>:</b></td>
<td class="right"><?php if($title=='Sub-Total'){ echo $this->currency->format($productprice); } else if($title=='VAT (20%)'){ echo $this->currency->format($vat); }else if($title=='Total'){ echo $this->currency->format($ttl);} else {echo $total['text']; }
?></td>
</tr>
<?php } ?>
</table>
</div>
I am really not a Coder, just an old Thief, with a fairly good sense of 'remembering' and 'combining' already existent 'Knowledge' into a working Whole !

Good Luck !

Ernie
For Sale: Turnkey Top URLs with Opencart installed!
Latest Opencart LIGHT + V-Pro Test Site: http://www.hitline.info
For more Information, please contact me at: jti@jacob.ch
Free OC Extensions from the largest Github OC Archive on Earth,
635 + free Repositories - from OC v.1.5.x up
on my Github Opencart Site: https://github.com/IP-CAM
Users browsing this forum: No registered users and 3 guests