Payment method: Purchase order unable to complete

  • Posts: 132
  • Thank you received: 2
9 years 2 months ago #213236

-- HikaShop version -- : 2.5.0 and 2.4.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.10
-- Error-message(debug-mod must be tuned on) -- : Please enter a Purchase Order Number

Hi!

I'm having a strange issue with the Purchase order payment method, I have managed to replicate the issue in the 2.4.0 and 2.5.0 version of hikashop.

We have a 1 page checkout and when a registered user attempts to buy a product using the "Purchase order" payment method the checkout page submits and throws the "Please enter a Purchase Order Number" error despite the number being entered, this keeps happening no matter how many times one try to submit the order (with the Purchase order number entered into the field).

I did some digging trying to figure it out and it seems that there is stored two of these on submit, one with the "purchase order number" and one without.

------WebKitFormBoundaryx4MchUHu0EoX8dYx
Content-Disposition: form-data; name="hikashop_purchase_order_number"

12355
------WebKitFormBoundaryx4MchUHu0EoX8dYx
Content-Disposition: form-data; name="hikashop_purchase_order_number"

Also when i turned Joomla's debugging on I can see a session called hikashop_purchase_order_number being set with no value (from what I can see).




I have tried to clear cache / cookies multiple different computers and browsers but no luck, I have no idea what is going on, because apart from the "Please enter a Purchase Order Number" There are no errors being thrown, at all.

Attachments:
Last edit: 9 years 2 months ago by earmaster.

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 2 months ago #213247

Hi,

If you have two input data field sent in a POST, only the last one will be taken into account.
So that's why you get the error message as the payment plugin still sees the purchase order number as empty because of the second one.
So what you want to do is actually look at the source code of the page with your browser and search for the name hikashop_purchase_order_number
Normally, you should have it only once in the input field of the plugin where you enter your purchase order number.
If you find a second one, it would be good if you could do a screenshot of the code around it so that we can see what is adding it.

It could happen for example if you had a second purchase order payment method which could be chosen as the system is only meant to be used with one payment method for the purchase order plugin.
It could also be that you have the payment view twice in your checkout workflow with the second one being hidden with CSS.
But it might be something else I didn't think about.

The following user(s) said Thank You: earmaster

Please Log in or Create an account to join the conversation.

  • Posts: 132
  • Thank you received: 2
9 years 2 months ago #213326

Hi Nicolas.

Seems it was the issue of having two "Purchase orders" methods at the same time :)

It makes sense that it would be a duplicate input field.

Thanks for the help!

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum