VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: maurice_j on April 26, 2012, 13:04:13 PM

Title: Payment Plugins - "Missing Arguments" Errors in shopping cart
Post by: maurice_j on April 26, 2012, 13:04:13 PM
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
Title: Re: Payment Plugins - "Missing Arguments" Errors in shopping cart
Post by: craftyweb on April 26, 2012, 14:04:46 PM
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
Title: Re: Payment Plugins - "Missing Arguments" Errors in shopping cart
Post by: maurice_j on April 28, 2012, 16:47:30 PM
Seems to work :)