Guest user can check out without selecting any address

  • Posts: 200
  • Thank you received: 75
7 years 2 months ago #277996

-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.7.5

Hi,

we just noticed a big issue with guest checkout, we're not sure if this has always been like that or it has changed recently.
We use the new Ajax checkout and have the Address Selector set to List.

After a guest user fills in his e-mail and address information and clicks on Next, the billing and shipping address are shown. However, they are not selected by default, and the user can actually just click on Next again without selecting any address and finish his checkout. In the emails and in the backend order overview the user's address information will then be completely empty, and we have no idea who placed the order or where to send it to!

The system should not allow the user to continue to the next step without having selected a billing and shipping address. And preferably, since for a guest user there is only one address, it would be much better if it is automatically selected.

Can you reproduce this issue or help us with this?
Thanks in advance.

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

  • Posts: 200
  • Thank you received: 75
7 years 2 months ago #278008

We did some additional testing, and found this has changed after updating to 3.2.0.
In 3.1.1 the billing and shipping address would always be automatically selected, so no issues there, but now in 3.2.0 they're not selected and many users won't see that and just continue with the checkout.

We can note though that even in 3.1.1 a user could, through the browser inspector for instance, forcefully deselect the address input radio button and also continue without any address selected, without any errors popping up anywhere. It would be preferable if there are some more rigurous checks built in the checkout to make sure a billing and shipping address must always be selected.

Thanks again for any help.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 2 months ago #278014

Hello,

Can you please provide a screenshot to illustrate the issue or some screenshot about your configuration and a step-by-step to reproduce ?

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.

  • Posts: 200
  • Thank you received: 75
7 years 2 months ago #278074

Hi,

see attached screenshots of our configuration and the problem, though you should be able to reproduce it without any special instructions.
As you can see we use default Protostar template, no view overrides.
- We add a product to cart and go to checkout
- We select Guest checkout and fill in e-mail and address
- Click on Next to go to billing address and shipping address overview
- You will see the addresses are not selected, and the user can simply click Next and finish checkout without any address


If we change the Address Selector from List to Dropdown List it also does not work correctly, as you can see in the fourth screenshot. In this case the billing address will select the filled in address data, but the shipping shows an empty address.

Hope it is clearer now, thanks for looking into it.

Attachments:

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
7 years 2 months ago #278117

Hi,

I'm not sure what's going on. I'm not able to reproduce the problem on my end.
I've configured the checkout like you, with login/registration/guest, with "list" address selector, with only login and address on the first step, and when I test I don't get the issue. The address is correctly added for both billing and shipping address, and preselected:
monosnap.com/file/JHMN1SuV0YTJLd70B5uyidf3IlL9GQ
So there must be another parameter which leads to that situation that I'm not getting.

Could you provide a test website with precise instructions to reproduce the problem with a backend and FTP access so that we can debug the issue ?
www.hikashop.com/support/contact-us.html

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

  • Posts: 200
  • Thank you received: 75
7 years 2 months ago #278138

Hi Nicolas,

with a clean install of Joomla and Hikashop 3.2.0 everything does indeed work correctly and we are also unable to reproduce our own issue.
At the moment I can only test locally and am not able to upload a test website online, hopefully will be able to do that later today. Will continue testing here as well to try and figure out what exactly causes the addresses to go wrong.

Kind regards,

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 2 months ago #278139

Hello,

You're not the only person with an issue regarding the addresses (in guest checkout context).
CF : www.hikashop.com/forum/3-bug-report/8918...fferent-address.html
But unfortunately, we still do not have enough elements to understand the real nature of the issue or to reproduce it.

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.

  • Posts: 200
  • Thank you received: 75
7 years 2 months ago #278187

Hi Nicolas, Jerome,

sorry I'm unable to give you a live test website at this time, though I think I was able to trace the issue down.
In short: it's caused by addresses stored in the database with all values NULL and address_user_id equal to zero.
For guest users somehow the cart_billing_address_id and cart_shipping_address_id will get stuck at these NULL addresses, and doesn't handle the situation of address_user_id = 0 properly.


Longer explanation:
The reason why in the checkout the addresses are not automatically selected for guests, is because in the file show_block_address on line 151

if($cart->cart_billing_address_id == (int)$address->address_id)
apparently isn't true.

When printing the address_id's on the frontend I see for guests the $cart->cart_billing_address_id was for example 1643. When looking up this address_id 1643 in the database, I see it corresponds with an address with all values NULL and address_user_id = 0. Not sure why, but our database contains a few of these NULL addresses.

When the system retrieves the $cart->cart_billing_address_id, somehow it gets stuck at the most recent NULL address. Manually changing the address_user_id to anything other than zero and going back to the checkout, the $cart->cart_billing_address_id and cart_shipping_address_id will then take the next highest NULL address in the database (instead of 1643, will then be next NULL address, could be for example row 1259).

I haven't delved into all the code to figure out exactly why these address_user_id = 0 situations are not handled correctly, but would you be able to fix it with this information?
You can try manually inserting/modifying an address in the database (0, NULL, NULL, NULL, ...) to see/reproduce the issue.


For any other readers with the same problem of having orders without any address, a quick fix for now would be to remove all NULL addresses from your database table _hikashop_address.

Last edit: 7 years 2 months ago by GW.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 2 months ago #278257

Hello,

Can you please re-download HikaShop 3.2.0 to confirm us that the patch we made right fix the issue ?

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.

  • Posts: 200
  • Thank you received: 75
7 years 2 months ago #278261

Hi,

that seems to have fixed it, we've gone through the checkout a couple of times on our original website with the issue (containing empty addresses in the database) and the system is handling it correctly now.
All working well again as far as we can see, thanks!

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 2 months ago #278262

Good !

In the mean time, we will work on bigger modification regarding these addresses with a 0 user_id.
I can see that in some test websites we got some addresses with that glitch and I see some ways in the backend (or in the checkout legacy system) to generate some. It will require some time but we should improve these for the next release.
With the current patch, that issue won't be a problem in the frontend !

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.

Time to create page: 0.076 seconds
Powered by Kunena Forum