Hello!
Thanks for an excellent add-on to VirtueMart!
I have noticed two problems, one is a major problem and one is a minor.
The first problem - the currency is not correct!
My web shop has SEK as standard currency, but allows customers to check out using DKK, EUR and NOK. If the customers check out with DKK, the currency in VirtueMart is in DKK, but when I create a PDF the currency is SEK!
To clarify further
Something cost 100 SEK, this is 67 DKK. The customers check out using DKK and pays with DKK. In VirtueMart it is registered that the customers paid 67 DKK. In the add-on, however, it is written 67 SEK, and not 67 DKK as it should have!
To get around this problem, I every time have to open the generated PDF file in Adobe Illustrator and manually change SEK to DKK.
This leads to the next problem… what kind of font is “FreeSans”?
Every time I modify the generated PDF, Illustrator complains that I am missing the “FreeSans” font. The FreeSans font and the Arial font looks exactly the same, is it possible to generate the PDF using the Arial font instead?
How can these two problems be solved?
Please help me! Changing SEK to DKK/EUR/NOK on every order is very, very annoying!
[SOLVED] Error: Currency is not correct!
-
- Phoca Newbie
- Posts: 4
- Joined: 15 Mar 2009, 23:06
[SOLVED] Error: Currency is not correct!
Last edited by snakedragon on 21 Jun 2009, 02:09, edited 2 times in total.
-
- Phoca Newbie
- Posts: 4
- Joined: 15 Mar 2009, 23:06
Re: Error: Currency is not correct!
I have had similar problems with different payment modules to VirtueMart, and in all cases, the problems with the currency could be solved by changing “vendor_currency” to “product_currency”.
I have gone through all files in “com_virtuemart_IDnR_addon” but have unfortunately not been able to solve the problem myself.
I am deeply grateful if anyone can help me solve this problem with the currency!
I have gone through all files in “com_virtuemart_IDnR_addon” but have unfortunately not been able to solve the problem myself.
I am deeply grateful if anyone can help me solve this problem with the currency!
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error: Currency is not correct!
Hi, I will take a look at the currencies...
Font: it depens on you which font will be used, the "freesans" is a default pdf font in Joomla! But you can install your own (then you need to overwrite some Addon code, everwhere where "freesans" is you need to change it to e.g. "arial")
Vendor Currency - There is used this method for displaying currencies: $CURRENCY_DISPLAY->getFullValue ($CURRENCY_DISPLAY is a global variable)
Jan
Font: it depens on you which font will be used, the "freesans" is a default pdf font in Joomla! But you can install your own (then you need to overwrite some Addon code, everwhere where "freesans" is you need to change it to e.g. "arial")
Vendor Currency - There is used this method for displaying currencies: $CURRENCY_DISPLAY->getFullValue ($CURRENCY_DISPLAY is a global variable)
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 15 Mar 2009, 23:06
Re: Error: Currency is not correct!
Hi Jan!
Thank you very, very much for your reply!
I am unfortunately not a programmer, but I am usually able to fix minor problems!
It should not be that difficult to fix the problem, it is probably just me that is a bit stupid regarding programming…
However, I would really, really appreciate if you could help me with fixing this currency problem!
By the way, thank you for letting me know how to change FreeSans to Arial!
Thank you very, very much for your reply!
I am unfortunately not a programmer, but I am usually able to fix minor problems!
It should not be that difficult to fix the problem, it is probably just me that is a bit stupid regarding programming…
However, I would really, really appreciate if you could help me with fixing this currency problem!
By the way, thank you for letting me know how to change FreeSans to Arial!
-
- Phoca Newbie
- Posts: 4
- Joined: 15 Mar 2009, 23:06
Re: Error: Currency is not correct!
I have solved the problem - Finally!
The problem was really driving me nuts.
Anyhow, the solution is:
In the file administrator/components/com_virtuemart/pdf/delivery.pdf.php
Replace all code containing
($CURRENCY_DISPLAY->getFullValue($without_tax['shipping'])),0,0,'R');
($CURRENCY_DISPLAY->getFullValue($tax['shipping'])),0,0,'R');
($CURRENCY_DISPLAY->getFullValue($coupon_discount)),0,0,'R');
etc...
With
($CURRENCY_DISPLAY->getFullValue[/b]($without_tax['shipping'], '', $dbo->f('order_currency'))),0,0,'R');
($CURRENCY_DISPLAY->getFullValue($tax['shipping'], '', $dbo->f('order_currency'))),0,0,'R');
($CURRENCY_DISPLAY->getFullValue($coupon_discount, '', $dbo->f('order_currency'))),0,0,'R');
etc...
In other words, adding
within each
Next thing to solve on the list of problems, is to not add VAT when VAT is not calculated in the order.
For example, order value is 2000 SEK, no VAT is paid because the order is send outside of Sweden.
Order value in VirtueMart = 2000 SEK, VAT in VirtueMart = 0 SEK.
In the created PDF file, order value is 2500 SEK, VAT is 500 SEK.
If VAT is not calculated in the order, VAT shouldn't be added.
Anyone have a solution to this?
The same problem seems to be found here as well: viewtopic.php?f=27&t=1285&start=0
The problem was really driving me nuts.
Anyhow, the solution is:
In the file administrator/components/com_virtuemart/pdf/delivery.pdf.php
Replace all code containing
($CURRENCY_DISPLAY->getFullValue($without_tax['shipping'])),0,0,'R');
($CURRENCY_DISPLAY->getFullValue($tax['shipping'])),0,0,'R');
($CURRENCY_DISPLAY->getFullValue($coupon_discount)),0,0,'R');
etc...
With
($CURRENCY_DISPLAY->getFullValue[/b]($without_tax['shipping'], '', $dbo->f('order_currency'))),0,0,'R');
($CURRENCY_DISPLAY->getFullValue($tax['shipping'], '', $dbo->f('order_currency'))),0,0,'R');
($CURRENCY_DISPLAY->getFullValue($coupon_discount, '', $dbo->f('order_currency'))),0,0,'R');
etc...
In other words, adding
Code: Select all
, '', $dbo->f('order_currency')
Code: Select all
($CURRENCY_DISPLAY->getFullValue($without_tax['shipping'] [ADD NEW CODE HERE] )),0,0,'R');
Next thing to solve on the list of problems, is to not add VAT when VAT is not calculated in the order.
For example, order value is 2000 SEK, no VAT is paid because the order is send outside of Sweden.
Order value in VirtueMart = 2000 SEK, VAT in VirtueMart = 0 SEK.
In the created PDF file, order value is 2500 SEK, VAT is 500 SEK.
If VAT is not calculated in the order, VAT shouldn't be added.
Anyone have a solution to this?
The same problem seems to be found here as well: viewtopic.php?f=27&t=1285&start=0
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: [SOLVED] Error: Currency is not correct!
Hi, maybe somewhere there:
administrator\components\com_virtuemart\pdf\delivery.pdf.php
is missed some if clause in case there should not be VAT
Jan
administrator\components\com_virtuemart\pdf\delivery.pdf.php
is missed some if clause in case there should not be VAT
Jan
If you find Phoca extensions useful, please support the project