Button next and submit together is confusing

  • Posts: 190
  • Thank you received: 9
5 years 1 month ago #304530

-- url of the page with the problem -- : update.elsvansteijn.nl
-- HikaShop version -- : 4.0.2
-- Joomla version -- : 3.9.1
-- PHP version -- : 5.6

Hi there,


i have 2 questions and i show them in this movie.
www.dropbox.com/s/c3x0k7ik6vfzgs4/checklout-buttonmov.mov?dl=0

1. How to fix first page next step button alone and second page submit button?
Can the css class of anything above changes after submitting the address "checkout-address-submitted"
The first time i want to call it next step, then buy book and i want the styles different so i can't use the option to hide one of the buttons.

2. When i choose a country for sending i would expect that sending cost will be calculated.
Is it not good to have that on ajax?

Thanks!

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 1 month ago #304531

Hi,

1. I think that you want to change your checkout into a two steps checkout: first, the login view. Then, the cart/address view.
That way, you would have two different buttons that you could style separately as they would really be on different steps. Right now you're always on the same step. It's only the login and address views displaying or not based on the current status of the user (already connected as guest, or not yet connected as guest).
Now, even with your current checkout, it would be possible. You would have to do a view override of the show_block_login view file and add custom javascript code based on whether the user is connected as guest or not to add a different class to the button on page load.

2. The shipping method selection / calculations as well as taxes, coupons, etc are based on addresses. For the system of shipping methods to give back a list of shipping methods, you need to give him an address.
Before you click on the button to validate the address, the server doesn't know about the address.
While we could send the information already provided in the address before you click on the validation button and refresh the shipping methods, this causes a lot of problematics:
- If some of the fields are not filled then you have an incomplete address and shipping methods might depend on these not only the country. You might have configured shipping methods based on countries, but others might use shipping methods which need the zip code, the city, the state. If these are not provided, then the shipping plugins would get an address with missing information and some might break or not be able to return anything.
- To be able to calculate the shipping methods, the shipping address needs to be linked to the cart in the database. This requires also adding the address in the database. So we would have an address (potentially) half-filled in the database, that the user might actually not validate. But then the cart would be linked with an invalid address and a shipping method that might not be correct and should be "unlinked".
- In fact, in your case, the user is not even created yet in HikaShop and thus the address cannot even be linked to the user. So it brings other problems as the system wasn't designed to work with temporary, potentially not complete addresses to begin with.

The only solution I could see would require some complex code modifications as a custom work. (it's a lot easier as a custom work as in that case, you don't have to handle all the possible ways the HikaShop checkout could be configured and only focus on the situation on your website).

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

  • Posts: 190
  • Thank you received: 9
5 years 1 month ago #304553

Thanks Nicolas for your amazing thorough reply :-)

1. This makes the checkout 3 steps.
- registration
- a confirmation with only the button to change quest information (i would expect that this would skip)
www.dropbox.com/s/4rns09yoss16g1y/Scherm...%2009.36.18.png?dl=0

- Next step address
www.dropbox.com/s/q2431gyic3kmwbu/Scherm...%2009.50.38.png?dl=0

2. I understand this and i am not interested in a custom code in this way at the moment.
But thanks for this super answer.

You are the best in your answers, really appreciated.

The following user(s) said Thank You: Philip

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

Time to create page: 0.060 seconds
Powered by Kunena Forum