Ulti Clocks content

Wrong currency symbol shown in VirtueMart Paypal checkout

JOOMLABOTTOM sand Wrong currency symbol shown in VirtueMart Paypal checkout. How to fix the wrong currency symbol in the VirtueMart 1.1 Paypal checkout.
currency, virtuemart, currencysymbol, store, symbol, default, paypal, code, session, passed, product, payment, eur, gbp, change, vendor, add, tab, right, configuration, php, usd, elseif, line, tag, entry, opening, joomla, completely, ignored, module, multi, integration, actually, major, bug, solution, forums, components, list

Home Joomla - VirtueMart Joomla & VM How To's Wrong currency symbol shown in VirtueMart Paypal checkout

Jeu

10

Wrong currency symbol shown in VirtueMart Paypal checkout

  • VirtueMart 1.1

This is actually a major bug in the VirtueMart Paypal integration. In a multi-currency store the currency symbol is completely ignored by the Paypal payment module and is passed as the VirtueMart store default currency symbol
I found this solution in the VirtueMart Forums.



Joomla VirtueMart Euro Order Joomla VirtueMart Paypal Order Currency Symbol


In a multicurrency VirtueMart store, even if you are checking out in a non-default currency the currency symbol passed is always the default currency symbol.








From the backend of your Joomla installation go to Components-->VirtueMart then Store-->List Payment Methods.
Click on the Paypal entry and go to the Configuration tab. Add the code below right at the top just after the opening php tag.
$currencysymbol = "";
if ($_SESSION['product_currency'] == "EUR" )
{
$currencysymbol = "EUR";
}
elseif ($_SESSION['product_currency'] == "GBP" )
{
$currencysymbol = "GBP";
}
else
{$currencysymbol = "USD";}
and then find the line -->
"currency_code" => $_SESSION['vendor_currency'],
and change to -->
"currency_code" => $currencysymbol,


Joomla VirtueMart Paypal Order Correct Currency


Add this page to your favorite Social Bookmarking websites
Digg! Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! Slashdot! Technorati! StumbleUpon! Spurl! Newsvine! Furl! Fark! Yahoo! Netvouz! Mister-Wong! RawSugar! Ma.gnolia! Squidoo! DZone! Swik!
LAST_UPDATED2 Read : 2911 times
 
Comments (2)
Mr. Albert Yuen - your code is a pice of poop
2 Jeudi, 17 Juin 2010 15:12
Anonumous
I've got "Fatal error: Call to a member function f() on a non-object in public_html/components/com_virtuemart/themes/default/templates/pages/checkout.thankyou.tpl.php(61) : eval()'d code on line 34"
If you bother to give a suggestion, make it as clear as possible
Use vm_orders order_currency on your Paypal script
1 Mardi, 20 Avril 2010 11:36
Albert Yuen
Hi:

I had the same problem, but I have now fixed the Paypal script.

Use the following code:

$dbsi = new ps_DB;
$q_si = "SELECT order_currency FROM #__vm_orders ";
$q_si .= "WHERE #__vm_orders.order_id='$order_id'";
$dbsi->query($q_si);
$order_currency = $dbsi->f("order_currency");

then on the array, change the following code

"currency_code" => $order_currency,

Add your comment

BoldItalicUnderlineStrikethroughSubscriptSuperscriptEmailImageHyperlinkOrdered listUnordered listQuoteCodeHyperlink to the Article by its id
Very HappySmileWinkSadSurprisedShockedConfusedCoolLaughingMadRazzEmbarrassedCrying or Very SadEvil or Very MadTwisted EvilRolling EyesExclamationQuestionIdeaArrowNeutralMr. GreenGeekUber Geek
Your name:
Titre:
Comment:

Latest Articles

Paypal Donation

If you use this module on your site please donate a small amount.
Any donation amount appreciated.

VM Live Product Search

Recommended Reading

For those interested in extending there knowledge of Joomla! & VirtueMart Packt Publishing has an excellent range of help & how to books.
Listed below are some I can recommend.
Simply click on the images to be taken directly to their web shop.

Learning Joomla! 1.5 Extension Development Learning Joomla! 1.5 Extension Development
by Joseph L. LeBlanc.
Read the review
Joomla! E-Commerce with VirtueMart Joomla! E-Commerce with VirtueMart
by Suhreed Sarkar.
Read the review
Joomla! Web Security Joomla! Web Security
by Tom Canavan.

Mastering Joomla! 1.5 Extension and Framework Development Mastering Joomla! 1.5 Extension and Framework Development
by James Kennard.

Joomla! Template Design: Create your own professional-quality templates with this fast, friendly guide Joomla! Template Design: Create your own professional-quality templates with this fast, friendly guide
by Tessa Blakeley Silver.

JOOMLABOTTOM



Wrong currency symbol shown in VirtueMart Paypal checkout



Wrong currency symbol shown in VirtueMart Paypal checkout. How to fix the wrong currency symbol in the VirtueMart 1.1 Paypal checkout.


currency, virtuemart, currencysymbol, store, symbol, default, paypal, code, session, passed, product, payment, eur, gbp, change, vendor, add, tab, right, configuration, php, usd, elseif, line, tag, entry, opening, joomla, completely, ignored, module, multi, integration, actually, major, bug, solution, forums, components, list