Selecting payment method submits the checkout page

  • Posts: 53
  • Thank you received: 2
10 years 7 months ago #177387

-- url of the page with the problem -- : dev.vitaking.ro/
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.10
-- Browser(s) name and version -- : Firefox 33

I have a strange problem with the checkout page. Currently I have two payment methodes, the default one is selected. If the user is already logged in and changes the payment method this ends the checkout process and the next page is the thank you page.
EDIT: The page gets submitted also if the user starts to add a new adress then cancels the operation.

If the user is logged out than the page behaves normally. I have allready deleted all my customizations, but the problem remains.

The "Auto submit shipping and payment methods selection" is ON, but if I disable, than I need to submit twice the page in order to arrive on the thank you page.

Please help, I have no idea where to look for solution.



Attachments:
Last edit: 10 years 7 months ago by otx.

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

  • Posts: 83995
  • Thank you received: 13605
  • MODERATOR
10 years 7 months ago #177431

Hi,

Keep that optino on and try to change the code:

if(($old_payment_id!=$payment_id || $old_payment_method!=$payment) && @$old_payment_data->payment_price!=$paymentData->payment_price && ($this->_getStep('cart',(int)$this->previous)===(int)$this->previous || $this->_getStep('confirm',(int)$this->previous)===(int)$this->previous)){
to:
if(($old_payment_id!=$payment_id || $old_payment_method!=$payment) && @$old_payment_data->payment_price!=$paymentData->payment_price){
in the file components/com_hikashop/controllers/checkout.php and see if that helps

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

  • Posts: 53
  • Thank you received: 2
10 years 7 months ago #177473

Dear Nicolas,

Thank you for your help! Unfortunately this doesn't solve my problem, the page gets submitted as soon as I select a payment method. I hope we can find a solution for this, as this is the only serious bug wich prevents us to going online with this version. I realy appreciate your help, I can give you full access to the site if you need.

EDIT: I have three versions of Hikashop in my install directory:
com_hikashop_business_2.2.0_2013-07-12
com_hikashop_business_2.3.1_2014-05-31
com_hikashop_business_v2.3.4_2014-10-29_19-29-48

Only the first one is working correctly, so the bug is somewhere between version 2.2.0 and 2.3.1.

So if I disable all the customizations and install the 2.2.0 everithing is fine. As soon as I install a bigger version the problem appears.

EDIT2: I have replaced the components/com_hikashop/controllers/checkout.php from the 2.2.0 version and it works! So I have narroved down the problem to one file, but it would take a lot of time to me to understand and find the exact problem. I guess for you is much easer. I hope you can come with a solution.

EDIT3: The page still gets submitted if I try to add a new delivery address or edit the existing one (drop-down list). Can you please give me some hint which file is causing this behavior? If I can't find other solution, at least I would try to replace this from the 2.2.0.

Regards,
Dezso

Last edit: 10 years 7 months ago by otx.

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

  • Posts: 83995
  • Thank you received: 13605
  • MODERATOR
10 years 7 months ago #177544

Hi,

Then please try to change the code:

if(($old_payment_id!=$payment_id || $old_payment_method!=$payment) && @$old_payment_data->payment_price!=$paymentData->payment_price && ($this->_getStep('cart',(int)$this->previous)===(int)$this->previous || $this->_getStep('confirm',(int)$this->previous)===(int)$this->previous)){
to:
if(($old_payment_id!=$payment_id || $old_payment_method!=$payment) || @$old_payment_data->payment_price!=$paymentData->payment_price){
in the file components/com_hikashop/controllers/checkout.php and see if that helps

The following user(s) said Thank You: otx

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

  • Posts: 53
  • Thank you received: 2
10 years 7 months ago #177597

Dear Nicolas,

Thank you for your quick fix, it works! This change will be implemented in the next version of Hikashop, or I have to take care of this myself on each upgrade?

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

  • Posts: 83995
  • Thank you received: 13605
  • MODERATOR
10 years 7 months ago #177690

Hi,

We'll add that for next release yes.

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

Time to create page: 0.049 seconds
Powered by Kunena Forum