Payment Plugins - "Missing Arguments" Errors in shopping cart

Started by maurice_j, April 26, 2012, 13:04:13 PM

Previous topic - Next topic

maurice_j

I'm recieving 5 errors on the front-end of my shopping cart:

QuoteWarning: Missing argument 3 for plgVmPaymentStandard::plgVmOnCheckAutomaticSelectedPayment() in /home/content/64/8944164/html/plugins/vmpayment/standard/standard.php on line 317

Warning: Missing argument 3 for plgVMPaymentPayzen::plgVmOnCheckAutomaticSelectedPayment() in /home/content/64/8944164/html/plugins/vmpayment/payzen/payzen.php on line 714

Warning: Missing argument 3 for plgVMPaymentSystempay::plgVmOnCheckAutomaticSelectedPayment() in /home/content/64/8944164/html/plugins/vmpayment/systempay/systempay.php on line 200

Warning: Missing argument 3 for plgVmpaymentAuthorizenet::plgVmOnCheckAutomaticSelectedPayment() in /home/content/64/8944164/html/plugins/vmpayment/authorizenet/authorizenet.php on line 1018

Warning: Missing argument 3 for plgVmPaymentPaypal::plgVmOnCheckAutomaticSelectedPayment() in /home/content/64/8944164/html/plugins/vmpayment/paypal/paypal.php on line 826

Any suggestions what's gone wrong?

Im on Joomla! 2.5.1 with VM2

craftyweb

This is what I've just done to fix the warnings.

Remove the third parameter from these functions in the problem files:

function plgVmOnCheckAutomaticSelectedPayment(VirtueMartCart $cart, array $cart_prices = array(),   &$paymentCounter) {
return parent::onCheckAutomaticSelected($cart, $cart_prices, $paymentCounter);
    }


So the function reads:
function plgVmOnCheckAutomaticSelectedPayment(VirtueMartCart $cart, array $cart_prices = array()) {
    return $this->onCheckAutomaticSelected($cart, $cart_prices);
    }

   
I don't know if this breaks the plugin or not though, but it does get rid of the warning messages.

If you are not using all those payment methods just disable them in Joomla's plugin manager.

Also you should upgrade Joomla to 2.5.4

Hope this helps
Joomla: 2.5.20
VirtueMart 2.0.26d