Checkout starting from Chart (not logged in) - Buttons won't work

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
10 months 3 weeks ago #357835

-- url of the page with the problem -- : www.waffenmarti.ch
-- HikaShop version -- : 5.0.2
-- Joomla version -- : 4.4.1
-- PHP version -- : 8.2.8
-- Browser(s) name and version -- : Firefox 1.21 64-bit

It seems, that there is a problem with the program flow while Checkout without a login.

My settings in the configuration you'll find attached as a pictures. This makes the most sense since if the Login is disabled, that customer will be leaded to registration pages. This would confuse the customer if he already has a login.

Following the steps:
Precondition: You have a login but you are not logged in.

1.) Put some stuff in the cart (more than 75.- SFr.) e.g.
www.waffenmarti.ch/mainmenu-gross-muniti...grs-bthp-20-stk.html

2.) Press "Warenkorb" (Cart) in the upper navigation.
--> You come to the card.

3.) Press "Kasse" (Checkout) in the navigation on the right side to "checkout" the item.

4.) If you are not logged in you come to a page where you can either login or register yourself.

So far so god. But there are 2 Buttons on the "Login-Form":
- "Anmelden" (Login)
- "Weiter" (Proceed)

You can enter username and password. If you press "Enter" on the keyboard and the whole process will proceed to checkout.
If you enter username and password and click "Anmelden" or "Weiter" with the mouse, nothing happens.

If you do the following steps, the buttons will work:

Following the steps:
Precondition: You have a login but you are not logged in.

1.) Put some stuff in the cart (more than 75.- SFr.) e.g.
www.waffenmarti.ch/mainmenu-gross-muniti...grs-bthp-20-stk.html

2.) Press "Warenkorb" (Cart) in the upper navigation.
--> You come to the card.

3.) Press "Kasse" (Checkout) in the navigation on the right side to "checkout" the item.

4.) If you are not logged in you come to a page where you can either login or register yourself.

Click to the field "Username" or "Password" (without typing any information) and press enter. An error message appears that there cannot be no password.

5.) Enter username and password and click "Anmelden" with your mouse --> then the button magically starts to work. "Weiter" is still not working.

Also on the registration form are 2 buttons that are called "Registrieren" (Registration) and "Weiter" (Proceed). For what is "Weiter" (Proceed)?

You can register an account - to try - no problem.

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 months 3 weeks ago #357836

Hi,

Joomla 4.3 changed the way the form validator system works on their end. It's a javascript file which is responsible for hightlight the border of input fields in green or red when the user is filling them.
Before, it was possible to target a DIV and now it's only possible to target a form element.
Because of this, we had to change the line:

var container = document.getElementById('hikashop_checkout_login_<?php echo $this->step; ?>_<?php echo $this->module_position; ?>');
to:
var container = document.getElementById('hikashop_checkout_form');
in the file components/com_hikashop/views/checkout/tmpl/sub_block_login_registration.php

When I press the login or next button on your checkout while the login form is displayed, I can see these error messages in the console of my browser :
i.imgur.com/VeZpWEl.png
These error messages are specifically for the input fields of the registration form, so I'm feeling these are the reason why the form is not submitted on your website.
Now, when I try to reproduce the problem on my local test server, I do not get the error messages in the console and the login form is submitted, even though I still have the same change as you. So the problem is not just with this code change, and it might actually be unrelated.
And since it works on my end without changing anything, the first reason which comes to mind would be some kind of issue with the javascript of the template you're using, but looking at your pages code, it seems you're using Cassiopeia, the default template of Joomla, like me on my test server.

So basically, I'm not sure what's going on.
You could first try reverting the change I talked about above, to see if it helps.

Regarding the buttons question:
The login / register buttons are displayed by the "login" block you have in the step of your checkout workflow. There is actually a setting there to hide the "register" button.
The "next" / "finish" button at the bottom is the main button of the checkout system which allows the user to go from one step to the next one.
While both buttons can potentially do the same thing, it is not necessarily always the case. For example, if you have a step with only the "coupon" or "cart" block, you need that "next" / "finish" button to be able to go to the next step.

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

Time to create page: 0.059 seconds
Powered by Kunena Forum