Even though there's only 1 payment method enabled
Automatic Selected Payment enabled
Radio button for authorize.net still shows
Can anyone tell me how to debug and or fix this?
Confirmed
If I enable only authorize.net
Cart still expects me to select a payment option
I see only payment option in the cart and an unchecked radio button.
Consequently the auto select payment option appears not to be functioning
If I enable only Paypal then auto selection works!?
VM 2.0.21C
Ok now that its been confirmed does anyone know where we might fix the code to repair it? Ive looks around but haven't found the correct place yet.
Here is what ive found
in the plugin for authorizenet.php line 146
$html = $this->getPluginHtml ($method, $selected, $methodSalesPrice);
this is what shows the radio button. so the function getPluginHtml I am assuming is the issue.
The other plugins are Using displayListFE to display where authorizenet is not using the same coding structure.
If i replace
$html = $this->getPluginHtml ($method, $selected, $methodSalesPrice);
WITH
$html = $this->displayListFE ($cart, $selected, $htmlIn);
it is showing a 1.
when i look at vmplugin.php function displayListFE
Line 166 has return TRUE which is why its showing a 1 in this current coding configuration for auth.net
if i comment it out it then the 1 goes away.
Is there a reason its returning TRUE? I am not sure that commenting it out is Okay yet.
It also still isnt autoselecting still so all of this may have been for nothing.
The only bandaid i can use as of this moment is in authorizenet.php line 122 right after the beginning of the function add
$selected=1;
then atleast it is selected.
I am not a coder so cannot really help in this.
WHere can I pass to to a coder to have it fixed?
I am a developer but i don't have the kind of time required to fix this.
advertise it on the commercial board? No, the correct board is here http://forum.virtuemart.net/index.php?board=136.0,
but the momentan board is also not really wrong. I sent the link to valerie, she will take a look.
Hello
At the moment, it is done like that:
when a payment requires some input (like in Authorize.net), the automatic selection of the payment does not work.
I am checking if it is possible to change that.
Thanks for helping on this!
Hello. I am having exactly the same issue and would like to get this resolved. Any updates so far? :)
Thanks.
Hello
To do this requires some change in the code.
Meanwhile you can use some OPCs that will solve this issue.
Quote from: alatak on June 14, 2013, 09:23:27 AM
Hello
To do this requires some change in the code.
Meanwhile you can use some OPCs that will solve this issue.
Hello.Thanks for getting back.
So why do we have an option of setting it to be automatically set in VM back end?
Quote from: romatvirtue on June 14, 2013, 15:06:26 PM
So why do we have an option of setting it to be automatically set in VM back end?
Because for all of us who use ship/payment plugins that require no user input the autoselection works perfectly.
Yep works fine for my Paypal Pro hosted iframe solution!
Well, this doesn't work with Authorize.net... :(
I auto check my with jquery
views/cart/select_payment.php
<?php
$document = JFactory::getDocument();
$document->addScriptDeclaration("
jQuery(document).ready(function($) {
$('input:radio:#payment_id_11').attr('checked',true);
});
");
?>
change payment_id_11 to your payment id
BUT!!! you still have to go to the payment page, because the card details have to be filled in.
Quote from: PRO on June 15, 2013, 16:08:01 PM
I auto check my with jquery
views/cart/select_payment.php
<?php
$document = JFactory::getDocument();
$document->addScriptDeclaration("
jQuery(document).ready(function($) {
$('input:radio:#payment_id_11').attr('checked',true);
});
");
?>
change payment_id_11 to your payment id
BUT!!! you still have to go to the payment page, because the card details have to be filled in.
Hey. Thanks for your reply. I tried you solution, but it didn't work. Does it matter where exactly I insert the code? I inserted it in the beginning of the file.
did you change the payment ID like I said?
Quote from: PRO on June 15, 2013, 17:56:11 PM
did you change the payment ID like I said?
I did. My ID is "1," so I changed it to
<?php
$document = JFactory::getDocument();
$document->addScriptDeclaration("
jQuery(document).ready(function($) {
$('input:radio:#1').attr('checked',true);
});
");
?>
Hey. It works. I did not do it properly. I removed "payment_id" and replaced it with the number. That's why it didn't work. It works now after I added back "payment_id."
Thank you so much.
Has this issue been solved yet?
None of the previously suggested solutions worked for me. I have only one checkout method "credit card" and customers were forgetting to check the radio button next to that option when filling in their credit card details. Then the payment would fail. I asked for help from the developer of the custom Virtuemart theme I'm using and they offered this solution (and it works perfectly for me...)
In administrator/components/com_virtuemart/plugins/vmpsplugin.php ~ line 760
look for
if ($selectedPlugin == $plugin->$pluginmethod_id) {
$checked = 'checked="checked"';
} else {
$checked = '';
}
and change this to
//if ($selectedPlugin == $plugin->$pluginmethod_id) {
$checked = 'checked="checked"';
//} else {
// $checked = '';
//}
Basically commenting out everything except making it checked. This works if you have only one checkout option available. I doesn't auto-select the payment method because customers must still enter their credit card details. It only checks the radio button by default - see attached screenshot.
Just remember to take out the hack if you ever add another payment method!
Full thread of this discussion at http://www.flexiblewebdesign.com/index.php?option=com_kunena&view=topic&catid=18&id=1105&Itemid=234#5225
good luck, Richard
[attachment cleanup by admin]
why hack the core when you can just do it with javascript in the select_payment template like I suggested?
Because the javascript solution didn't work for me. I tried it and the radio button remained unchecked. Not sure why it didn't work, it should... but it didn't. I suggest trying that option first and going with my solution only as a last resort.
Richard
Why cant we simply borrow code from the other payment plugins that ARE working? Is the auth.net plugin code THAT far removed from the others?
THANKS!
Hello
QuoteBecause the javascript solution didn't work for me. I tried it and the radio button remained unchecked. Not sure why it didn't work, it should... but it didn't. I suggest trying that option first and going with my solution only as a last resort.
hum..
please open a ticket here http://extensions.virtuemart.net/ticket
i will try to find out why.
Alatak,
I submitted a ticket as you requested. Thank you for looking into this issue.
Richard
Has anyone found a work around for this? I need it immediately. Please help...
Quote from: PRO on June 15, 2013, 16:08:01 PM
I auto check my with jquery
views/cart/select_payment.php
<?php
$document = JFactory::getDocument();
$document->addScriptDeclaration("
jQuery(document).ready(function($) {
$('input:radio:#payment_id_11').attr('checked',true);
});
");
?>
change payment_id_11 to your payment id
BUT!!! you still have to go to the payment page, because the card details have to be filled in.
^^^ this shopuld work for EVERYONE as long as you change
payment_id_11
to whatever payment id you have
for example, if its payment id #2
change it to
payment_id_2
It didn't work for me either, before I inserted the code in the very beginning of the the select_payment.php.
@ 2.0.22c
Enable Automatic Selected Payment set to Y
VM now asks for input when only one payment method (paypal) exists
2.0.22e and 2.0.24 worked fine on 2.0.22c (did not check on D)
Hello
Yes it is a problem with the new payments. If you do not use them, unpublish the sofort payment plugins in the list joomla plugins.
Alatak
Thanks for the super quick reply
Yes disbaling the (newly enabled by default) sofort payment plugins has fixed it!
Many thanks for the update.
Not sure that these plugins should have been enabled by default though ;)
If they aren't enabled new users complain that there are no payment options.........
hello
QuoteIf they aren't enabled new users complain that there are no payment options.........
Yes exactly
QuoteNot sure that these plugins should have been enabled by default though
and all payment methods should be disabled when not used for performance reasons
For version 2.1 we are going to think about about a better way to do that
LOL
2 replies 8)
I agree with the prob of no plugins enabled.
However this will be an upgrade for many people and we will (no doubt) get lots of people noticing that the auto select fails (if they only have one payment method) and that will be directly because the upgrade enabled the 2 new sofort payment methods in addition to whatever other plugin was enabled.
Upgraders will be unlikely to utilise these new methods immediately, but they will notice auto select failing.
Then Jenkin will be constantly pointing posts to this thread for the solution. ;)
Hello
It is a bug in the Sofort Ideal Payment plugin, that can be solved by unpublishing the payment in joomla.
I have myself more than 20 payment methods on my test site. i did not notice that problem.
THis worked for my by Commenting out.. But it created this email error You must provide at least one recipient email address
And The buyer will not get invoices or confirmations.
Wow its been over a year and i installed a new version of the cart TODAY and we still have the SAME ISSUE?
WHY??
My hack doesn't seem to work now either so really we are going backwards?
thanks for any help as to how to resolve this issue yet again. :(
VirtueMart 2.6.6
**UPDATE - 2014-06-02
Here is what i had to do UNTIL there is a more Permanent FIX.
Open the file: plugins/vmpayment/authorizenet/authorizenet.php
after the line
foreach ($this->methods as $this->_currentMethod) {
add
$selected = $this->_currentMethod->virtuemart_paymentmethod_id;
This will set selected to the ID of Auth.net payment method and make the radio be selected.
Ok i found a solution.
in virtuemart 2.6.6 using the jquery method to auto check the payment method,
the line
$('input:radio:#payment_id_3').attr('checked','true');
remove
input:radio:
I should look like this :
$document = JFactory::getDocument();
$document->addScriptDeclaration("
jQuery(document).ready(function($) {
$('#payment_id_11').attr('checked',true);
});
");
I know I just resurrected a year old post but I had to thank RAYGE! This worked for me..
Running latest VM3 with OnePage Checkout by PV and using Authorize.net as my only payment option. I was banging my head for hours over this. I couldn't get the radio button checked for anything.
THANK YOU
Quote from: rayge on June 03, 2014, 00:53:11 AM
Wow its been over a year and i installed a new version of the cart TODAY and we still have the SAME ISSUE?
WHY??
My hack doesn't seem to work now either so really we are going backwards?
thanks for any help as to how to resolve this issue yet again. :(
VirtueMart 2.6.6
**UPDATE - 2014-06-02
Here is what i had to do UNTIL there is a more Permanent FIX.
Open the file: plugins/vmpayment/authorizenet/authorizenet.php
after the line
foreach ($this->methods as $this->_currentMethod) {
add
$selected = $this->_currentMethod->virtuemart_paymentmethod_id;
This will set selected to the ID of Auth.net payment method and make the radio be selected.
Nice to hear this.