Wrong Price shown in small cart

GK User
Wed Dec 14, 2016 7:01 pm
If I click on the small cart icon the included products are show. Here the prices without tax are shown next to the products (wrong) and at the end the final price including tax (correct).

How can I show the prices including tax everywhere?
User avatar
Senior Boarder

teitbite
Mon Dec 19, 2016 6:09 pm
Hi

It's showing prices directly from database, so You will need to add this tax manually in /html/mod_virtuemart_cart/default.php line:

Code: Select all
                            <span class="gkPrice num<?php echo $iteration%3; ?>"><?php echo str_replace(' ', '', $product['prices']); ?></span>



and change $product['prices'] into something like $product['prices']*0.23+$product['prices']*0.23 if tax is 23% as in Poland for example.
User avatar
Moderator

GK User
Wed Dec 28, 2016 3:13 pm
Thanks for your reply. The problem is that we have two different taxes on food and other stuff. So it's a bit more complicated. Is it possible to show the finalprice directly from the database? The sum shown is also calculated from final prices including tax...
User avatar
Senior Boarder

teitbite
Mon Jan 02, 2017 3:44 pm
Hi

Price is shown from database right now, but luckily the information about tax is being pick up as well, so please try use code like that:

Code: Select all
<span class="gkPrice num<?php echo $iteration%3; ?>"><?php echo str_replace(' ', '', $product['prices']+$product['subtotal_tax_amount']); ?></span>
User avatar
Moderator

GK User
Sat Apr 01, 2017 10:07 am
works fine. thx!
User avatar
Senior Boarder

teitbite
Thu Apr 06, 2017 1:34 pm
Hi
Glad I could help.
---
If You were satisfied with our support please let other users know on Twitter: http://twitter.com/gavickpro or Facebook: http://www.facebook.com/gavickpro
User avatar
Moderator


cron