- Posts: 45
- Thank you received: 0
Payment selection when additional information req.
- paulvanharen
-
Topic Author
- Offline
-- Joomla version -- : 3.3.6
Hi,
When the customer can choose from multiple payment methods, just clicking the icon of the method, or the bullet in front, will select the method. This can be seen in the status indicator. Pressing the completion button once, will take you to the next checkout steo.
However, some payment plugins require additional information, such as credit card details or order numbers (needCC()). In this case the behavior is different. On clicking the icon, the payment methods seems to be selected, but the status is not updated. It requires pressing the 'complete' for the selection to propagate to the status indicator. Pressing once more, takes you to the next check out stage.
I'm now developing a new payment plug-in. The data entered for the plug-in is reset on the first click, which is kind of annoying.
I did some experimentation with the contents of components/com_hikashop/views/checkout/tmpl/payment.php.
Replacing
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
The solution was probably to just set the "Auto submit shipping and payment methods selection" option to NO via "Hikashop->System->Configuration->Checkout".
Please Log in or Create an account to join the conversation.
- paulvanharen
-
Topic Author
- Offline
- Posts: 45
- Thank you received: 0
I'm sorry, but the results are the same.
Please Log in or Create an account to join the conversation.
Which data entered for the plugin are you talking about ?The data entered for the plug-in is reset on the first click, which is kind of annoying
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
- paulvanharen
-
Topic Author
- Offline
- Posts: 45
- Thank you received: 0
I configured a small demo site to show the issue. Please have a look at kaleidoscoop-web.nl/demo/ . Order a product, proceed to check out and try paying with a purchase order.
Best regards, Paul
Please Log in or Create an account to join the conversation.
I made a test account but I did not receive any email for his activation.
Please, explain which data entered for the plugin are you talking about...
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
- paulvanharen
-
Topic Author
- Offline
- Posts: 45
- Thank you received: 0
Your account has been enabled now. Sorry for the inconvenience.
A screenshot showing the plugin data is attached.
Thanks and regards, Paul
Please Log in or Create an account to join the conversation.
The code change you made will indeed activate the auto submit of the payment method selection, but it's it requires the credit card data, it will create an error.
We purposely deactivated the auto submit for payment methods requiring additional data to the user since the user has to input the data anyway and that way he won't try to start entering the credit card data and then get his data cleared in the middle by the refresh of the data.
But I understand that you might still prefer the behavior the way you have it.
I don't see why it would be a problem for something else so feel free to use that modification if you prefer it that way.
Note that I would recommend to do that modification via the menu Display>Views by editing the file "payment" of the view "checkout".
That way, you won't loose your modification when you update HikaShop.
Please Log in or Create an account to join the conversation.
- paulvanharen
-
Topic Author
- Offline
- Posts: 45
- Thank you received: 0
Thanks you for your reply.
I think I understand your concern that lead to the decision of disabling the auto submit. However, the current behavior is not particularly user friendly.
I play the following story:
- I select my product, which brings me to the checkout page.
- I log in or register myself
- I select Purchase order as payment method. Now, the radio button in front of Purchase order is selected, and the field for the Purchase Order Number appears. Note, that the status at the bottom still shows PayPalPro as payment method.
- I enter a Purchase Order Number and press the Finish button. I end up at the same screen (step-1), and the purchase order number is erased. However, the status at the bottom reports now that the payment method is now set to Purchase order.
- re-entering the Purchase Order Number allows me to finish the checkout
Thanks and regards, Paul
Please Log in or Create an account to join the conversation.
It's not the expected behavior.
The purchase order field should not be erased. That's a problem of the purchase order plugin which I didn't saw when putting it together as the checkout workflow I used (in several steps) wasn't displaying again the payment methods form a second time.
It can easily be fixed by changing the line:
But as you can see, it's not a problem for the credit card payment method for which you don't have to enter the credit card twice.
Please Log in or Create an account to join the conversation.
- paulvanharen
-
Topic Author
- Offline
- Posts: 45
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Posts: 76
- Thank you received: 2
Thanks for this thread, it's really helpful. I've made the proposed code change to the payment plug-in, and it does help. Just one further very related question...
Is there a relatively simple way to do away with having to press the "next" (or in my case "Finish" button) twice?
Presumably on the first click it accepts your choice of payment and then on the second click collects the PO Number you've entered?
I can't use auto-submit to replicate the first click of the button because the PO Number is a required field, so it throws an error saying no PO number has been entered. Obviously if if we could make the PO number not a required field when auto-submitting the payment option, and then make it a required field when clicking finish, that would be a perfectly acceptable solution.
I'm a relatively proficient with code, but any pointers to which part of the code to look at and how I might go about doing this would just be massively helpful.
Please Log in or Create an account to join the conversation.
You want to remove that code:
Please Log in or Create an account to join the conversation.