News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Paypal error: Email Currency?

Started by jvista, December 24, 2012, 22:37:06 PM

Previous topic - Next topic

jvista

Having issue with Paypal and checkout.

When I go to complete checkout process.. clicking on  "Confirm Purchase"

Fatal error: Call to undefined method plgVmPaymentPaypal::getEmailCurrency() in /home/totallyt/public_html/plugins/vmpayment/paypal/paypal.php on line 162

Any ideas?

Joomla! 2.5.7
VM: 2.0.10

Thanks
John

veeco

hi !
the function getEmailCurrency supposed to be in vmpsplugin not in plgVmPaymentPaypal... but i guess that's where old virtuemart version did... try to update your virtuemart to recent,

if update not an option, try to add this following function in plgVmPaymentPaypal
function getEmailCurrency (&$method) {

if (!isset($method->email_currency)  or $method->email_currency=='vendor') {
//     if (!class_exists('VirtueMartModelVendor')) require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'vendor.php');
$vendorId = 1; //VirtueMartModelVendor::getLoggedVendor();
$db = JFactory::getDBO ();

$q = 'SELECT   `vendor_currency` FROM `#__virtuemart_vendors` WHERE `virtuemart_vendor_id`=' . $vendorId;
$db->setQuery ($q);
return $db->loadResult ();
} else {
return $method->payment_currency; // either the vendor currency, either same currency as payment
}
}


OR if you like to have more quick hack (but i don't recommend), you can use change the statement to:
$email_currency = "USD" ; //or change to other supported currency that support by paypal and your cart

hope this help
Work On Doxa Web Developer Indonesia - http://doxadigital.com |