VirtueMart Forum
VirtueMart 1.1.x [ Old version - no longer supported ] => Checkout / Order Management VM 1.1 => Topic started by: SnakeDragon on December 08, 2008, 02:50:39 am
-
Hello everyone!
I have a huge problem which I have much difficulties with solving. I have spent several hours on trying to solve this, and now need your help! I am very grateful if anyone can help me!
The problem in that the value of Subtotal in the e-mail confirmation is including VAT, when it should be excluding VAT!
Please see the following images.
This is how it looks in the cart on the website.
(http://img213.imageshack.us/img213/2193/web1rs3.png)
This is how it looks in the confirmation e-mail.
(http://img213.imageshack.us/img213/1981/mail1or3.png)
The problem is that $order_subtotal in components/com_virtuemart/themes/default/templates/order_emails/confirmation_email.tpl.php is including VAT! How do I remove VAT from $order_subtotal?
I am not the only one with this problem. People in these threads have the same problem:
http://forum.virtuemart.net/index.php?topic=42804.0
http://forum.virtuemart.net/index.php?topic=47037.0
I am very grateful for any answer!
SnakeDragon
-
Hi,
I have the very same problem. If anyone can help it would be much appreciated.
Our UK based online store is busy and our customers are getting emails with the subtotal including vat.
I need the subtotal without vat please.
regards,
Bub
-
Hi,
Could any please advise how I can remove the tax being applied to $order_subtotal in the html and text email confirmation please
Here is the coding for the email confirmation found at components/com_virtuemart/themes/default/templates/order_emails/confirmation_email.tpl.php
<tr class="Stil1">
<td colspan=4 align=right> </td>
<td> </td>
</tr>
<tr class="Stil1">
<td colspan=4 align=right><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_SUBTOTAL') ?> :</td>
<td><?php echo $order_subtotal ?></td>
</tr>
This shows the Subtoal inclusive of tax. I need this to be exclusive.
If anyone could just please point me to the file that provides the $order_subtotal I can try to remove the tax myself, just unsure where to edit and I've got our company accountant spitting fire!!!
Any help is much appreciated.
Regards,
Bub
-
The file that provides $order_subtotal is located in joomla_root/administrator/components/com_virtuemart/classes/ps_checkout.php.
I have tried to modify it myself but did not succeed. If you solve it, please let me/us know the solution!
-
Same problem here.
I'm in the UK and urgently require vat removing from the Sub Total in both HTML and Text emails. All is ok in Print View.
Not happy to set our site live before this is resolved.
I've come across several post requesting the same issue with no solution.
Can anyone help please.
-
Has anyone found a solution to this problem yet? If so, please share your information!
-
in administrator/components/com_virtuemart/classes/ps_checkout.php you'll find this following code around line 1941 (was in mine)
} else {
$sub_total += ($dboi->f("product_quantity") * $dboi->f("product_final_price"));
$shopper_message .= $CURRENCY_DISPLAY->getFullValue($dboi->f("product_item_price"), '', $db->f('order_currency'));
}
Change it to:
} else {
$sub_total += ($dboi->f("product_quantity") * $dboi->f("product_item_price"));
$shopper_message .= $CURRENCY_DISPLAY->getFullValue($dboi->f("product_item_price"), '', $db->f('order_currency'));
}
You might also like to see the following post about correcting the tax total to account for shipping fees.
http://forum.virtuemart.net/index.php?topic=46209.0 (http://forum.virtuemart.net/index.php?topic=46209.0)
hope that helps, it fixed my clients j1.5.7 vm1.1.2 site
-
Wow!! Thank you so much! You are a savior! :D
-
I tried the solution but now the subtotal is 0.00 Were is my bad?
-
I have this issue on confirmation text email: the subtotal is wrong rounded (with few cents addition).
Anyone pls confirm and maybe help fix?
Danny
-
Hi I am in UK too and I am having this problem..
My web was fine all this time for last few months. in UK for last year we had VAT 15% now change back to 17.5%. so I thought it would be so simple of going in admin panel, virtuemart and than change tax rate.I have manage to do so how ever after the change the cart behaving weird.
I have got 4 step simple cart. the 4th step (preview order page is absolutely fine) but on page (steps of checkout cart) page 1,2,3 the sub total is wrong.
unit prices is right which is £10.00 VAT (tax) is right which £1.75 BUT SUBTOTAL is wrong £10.22 and again Subtotal: is wrong £10.22
Total VAT: £1.75 OK
Total: £11.97 The Calculation is ok
this happens to checkout steps 1, 2, and 3 the 4th step is fine....
also after changing tax the checkout steps and last step the tax showing ok but when I get confirmation email, the tax on that is still showing old 15% and not 17.5%
Please help
Thanks in advance
Briggs
-
dwsmart, friend, I'll be eternally grateful for this salucion, had hours to be modifying the file that I could not figure it out, THANKS and thanks a million times, I tested and works perfectly, VirtueMart 1.1.4 stable version
in administrator/components/com_virtuemart/classes/ps_checkout.php you'll find this following code around line 1941 (was in mine)
} else {
$sub_total += ($dboi->f("product_quantity") * $dboi->f("product_final_price"));
$shopper_message .= $CURRENCY_DISPLAY->getFullValue($dboi->f("product_item_price"), '', $db->f('order_currency'));
}
Change it to:
} else {
$sub_total += ($dboi->f("product_quantity") * $dboi->f("product_item_price"));
$shopper_message .= $CURRENCY_DISPLAY->getFullValue($dboi->f("product_item_price"), '', $db->f('order_currency'));
}
You might also like to see the following post about correcting the tax total to account for shipping fees.
http://forum.virtuemart.net/index.php?topic=46209.0 (http://forum.virtuemart.net/index.php?topic=46209.0)
hope that helps, it fixed my clients j1.5.7 vm1.1.2 site
-
example of how it turned out my confirmation email
Artículos
Cantidad Nombre SKU Precio Subtotal
1 Panda Global Protection 2010 - Retail Box - 3L A12GP10 $44.98 $44.98
1 Panda Internet Security 2010 - Retail Box - 3L A12IS10 $39.98 $39.98
1 Panda Antivirus Pro 2010 - Retail Box - 3L A12AP10 $24.98 $24.98
1 Panda Antivirus for Ultra Portables - Retail Mini Box 1 L A12PNTMB1 $11.50 $11.50
1 NANO BLUETOOTH USB DONGLE NW200NXT03 $12.50 $12.50
1 ADAPTADOR USB LAN 54 MBPS INALÁMBRICO NW230NXT27 $17.60 $17.60
100 ROUTER INALAMBRICO SOLARIS 300 ARN02304U1 $60.77 $6,077.00
1 ROUTER INALAMBRICO STEALTH 300 ARN00304U1 $63.71 $63.71
Subtotal : $6,292.24
Envío : $0.00
Impuesto total : $817.99
Total: $7,110.23
-
Hi,
You can do some custom on the invoice files (/var/www/sitename/components/com_virtuemart/views/invoice/tmpl).
You can call Virtuemart Class and get the cart's subtotal amount.
Example :
$cart = VirtueMartCart::getCart();
$pricewithouttax = $cart->pricesUnformatted['priceWithoutTax'];
not sure about "pricesUnformatted['priceWithoutTax']" if it's correct. try print_r($cart) to view all the data to make sure.
Hope it helps.