Is private $_numeric_code = 0; needed in currencydisplay.php?

Started by chinsen, February 25, 2014, 10:28:29 AM

Previous topic - Next topic

chinsen

Hi all,

For a while I've been having a problem with a payment plug-in I had made for a local bank (Sampath Bank) which worked fine on older versions of virtuemart. Every time the consumer tried to checkout with the selected payment option, I started getting the following error

QuoteFatal error: Cannot access private property CurrencyDisplay::$_numeric_code in /home/mumsinco/public_html/plugins/vmpayment/sampathpay/sampathpay.php on line 157

After looking around I discovered that the newer version of currencydisplay.php had a line on line 36 which the older version did not

private $_numeric_code = 0;

Upon deleting that line, everything works fine with the payment option plug-in.

I'm just wondering what reason that line was added for, and if by removing am I negatively affecting something else?

Thanks guys!

Milbo

Interesting, what do you mean by "older version of virtuemart?" Seems your plugin is using the $_numeric_code, which is set to private, because it belongs to the currency. Just remove this in your code to rely on the db data.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/