[Skip to main content](#vessel-content)

#   Button next and submit together is confusing

##

- **[joris85](/forum/user/28344-joris85 "View joris85's Profile")**
- [![joris85's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28344.jpg)](/forum/user/28344-joris85 "View joris85's Profile") Topic Author
- [ Offline](/forum/user/28344-joris85)

Less More

- Posts: 190
- Thank you received: 9
-
-

7 years 8 months ago [\#304530](#304530) by [joris85](/forum/user/28344-joris85 "View joris85's Profile")  *[Button next and submit together is confusing](/forum/27-checkout/897059-button-next-and-submit-together-is-confusing#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 &quot;checkout-address-submitted&quot; 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!")* was created by *[joris85](/forum/user/28344-joris85 "View joris85's Profile")*

-- url of the page with the problem -- : [ update.elsvansteijn.nl](http://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](https://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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzA1OS1idXR0b24tbmV4dC1hbmQtc3VibWl0LXRvZ2V0aGVyLWlzLWNvbmZ1c2luZz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

7 years 8 months ago [\#304531](#304531) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Button next and submit together is confusing](/forum/27-checkout/897059-button-next-and-submit-together-is-confusing#304531 "-- 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 &quot;checkout-address-submitted&quot; 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!")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzA1OS1idXR0b24tbmV4dC1hbmQtc3VibWl0LXRvZ2V0aGVyLWlzLWNvbmZ1c2luZz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[joris85](/forum/user/28344-joris85 "View joris85's Profile")**
- [![joris85's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28344.jpg)](/forum/user/28344-joris85 "View joris85's Profile") Topic Author
- [ Offline](/forum/user/28344-joris85)

Less More

- Posts: 190
- Thank you received: 9
-
-

7 years 8 months ago [\#304553](#304553) by [joris85](/forum/user/28344-joris85 "View joris85's Profile")  Replied by *[joris85](/forum/user/28344-joris85 "View joris85's Profile")* on topic *[Button next and submit together is confusing](/forum/27-checkout/897059-button-next-and-submit-together-is-confusing#304553 "-- 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 &quot;checkout-address-submitted&quot; 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!")*

Thanks Nicolas for your amazing thorough reply ![:-)](/media/kunena/emoticons/3.png ":-)")

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](https://www.dropbox.com/s/4rns09yoss16g1y/Schermafdruk%202019-03-08%2009.36.18.png?dl=0)

- Next step address
[ www.dropbox.com/s/q2431gyic3kmwbu/Scherm...%2009.50.38.png?dl=0](https://www.dropbox.com/s/q2431gyic3kmwbu/Schermafdruk%202019-03-08%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](/forum/user/34318-philip "View Philip's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NzA1OS1idXR0b24tbmV4dC1hbmQtc3VibWl0LXRvZ2V0aGVyLWlzLWNvbmZ1c2luZz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.048 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
