How to redirect to onepagecheckout when cick checkout button

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
How to redirect to OnePageCheckout page when click the checkout button directly.


Currently we have to go to registration page and manually click as guest.
5 years ago
If current customer is registered then he/she directly redirect to Checkout page,

If current customer is Guest than system will ask for registration or checkout as guest.
5 years ago
You can use
this plugin.

This will automatic register guest customer to register customer during checkout.
This will help you in your case.
5 years ago
ezhilin wrote:




Currently we have to go to registration page and manually click as guest.



Hello,

yes you can directly navigate there by putting 3 line of js in view page.

I just tested this code with nopcommerce 4.1.

Go through:-

1) If you are using default clean.

~/Views/Shared/Component/OrderSummary/Default.cshtml page.


2) If you are using Third party.

 ~/Themes/ThemeName/Views/Shared/Component/OrderSummary/Default.cshtml page.




Here is the script you can put end of this page.




<script type="text/javascript">
$("#checkout").click(function(e) {if($('#termsofservice').prop('checked') == true){ $('#shopping-cart-form').attr('action', 'onepagecheckout'); }});
</script>




If you have old version than post here so i will tell you page in which you have to put this code.
5 years ago
Hi SK,

I am using default theme added the javascript. still redirecting to http://localhost:15536/login/checkoutasguest?returnUrl=%2Fcart

Please share your file.

thanks
5 years ago
Hi SK,

it is working. i am not using terms. so updated JS as below.

<script type="text/javascript">
$("#checkout").click(function(e) {$('#shopping-cart-form').attr('action', 'onepagecheckout'); });
</script>
5 years ago
ezhilin wrote:
Hi SK,

it is working. i am not using terms. so updated JS as below.

<script type="text/javascript">
$("#checkout").click(function(e) {$('#shopping-cart-form').attr('action', 'onepagecheckout'); });
</script>



Hello,

hope you found solution.

Thanks for your compliment.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.