Hi all,
For people looking to have a price without vat (tax) the my cart here is the correction I finally did. It was quite easy, but there are so many ways to do thing !:
look for this line (line 88 in default.php) :
- Code: Select all
<div class="gkPrice num<?php echo $iteration%3; ?>"><?php echo str_replace(' ', '', $product['prices']); ?></div>
replace by :
- Code: Select all
<div class="gkPrice num<?php echo $iteration%3; ?>"><?php echo number_format (round (str_replace(' ', '', $product['subtotal']),2),2); ?><?php echo $price; ?>€</div>
The problem with subtotal is that it is a brute price without tax like this : 128,0243246 for example.
I wanted to have a price like this one : 128,02 €
Here I have added the solution to have a rounded price with 2 digits with
round(price,number of digits) and if you have a product with a price like 56,00, it would display only 56. As I wanted to have the price like this 56,00 I added the
number_format (price,number of digits to appear afer comma). Just look through google to find information about
round and
number_format php command.
I also added
<?php echo $price; ?>€ in order to get the € sign visible after the price without tax.
I hope that this can help anybody who was looking for that hack.