Page 1 of 2

Checkout as Guest Issue on Step 2

Posted: Fri Aug 12, 2016 9:12 pm
by ocdesign
Hi,

Can anybody help. I have found an issue with Opencart 2.1.0.2 when you checkout as Guest and go to step 2 - Billing Details and fill in your details when you click the Continue button it doesn't take you to the next stage which should be Delivery Method if you have or haven't ticked the box for delivery and billing details the same. Instead it scrolls to the bottom of the page and takes you to the footer information.
If using a mobile then on some devices the Continue button doesn't work and you can't go any further with the checkout.

I have tested this on a complete new install of Opencart with no extensions installed and using the Opencart default theme so it's something to do with the coding in 2.1.0.2

It doesn't work on any of my clients sites using a different theme either.

Is there a hack I can use to fix this please or can anybody come up with a solution.

Many thanks
Sharron

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 9:31 am
by MarketInSG
I'm not sure if there's a bug on the default checkout (don't remember if there's any). Instead, are you using any other shipping modules, which may be the cause.

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 6:42 pm
by ocdesign
Hi,

I've found that it's nothing to do with any modules or plugins because it happens on the default Opencart installation with no modules or plugins except those that come with Opencart.

I isolated the issue to be with Opencart and not any themes, plugins or modules. I tested the Checkout with different themes, plugins etc and found it happened when I installed a plain default Opencart installation of 2.1.0.2 so it's an Opencart issue not a conflict of any modules/plugins.

I don't know how to fix it and my client would like to use Guest checkout. The issue doesn't happen when you have registered and login at checkout because all the customers details are already input. It's something to do with filling out the name and address details at checkout and then clicking continue so maybe it's a Javascript issue or something similar.

Regards
Sharron

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 6:58 pm
by artcore
I cannot reproduce that behavior on my demo store which is a default theme with custom css.
http://demo.ilithemes.com/oc2102

Do you have a link to your site?

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 7:05 pm
by ocdesign
Hi,

If you are testing it on your computer what you need to do is reduce your browser size as if you were viewing the screen on a mobile and go through the guest checkout procedure. You can't see it happen if you are testing it on a computer with a full open browser.

I can send you a link to my site but I prefer to send it via an email rather than post it on the forum.

Thanks

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 7:10 pm
by cyclops12
I have tested this on a fresh install 2.1.0.2 and works ok.
Site is on localhost viewing on chrome if that matters..

See here: http://screencast.com/t/IGi6F1iP1L

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 7:11 pm
by artcore
OK, will try that. Does it happen with my demo on your phone as well?

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 7:13 pm
by ocdesign
Hi,

I'll try it now

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 7:21 pm
by ocdesign
Hi,

Yes it does happen on your demo. I tested it on my computer and reduced the screen width and height to simulate a mobile and when I clicked continue it took me to the footer on the page.

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 7:23 pm
by ocdesign
Also forgot to say that this happens on all browsers ie: IE, Firefox, Safari

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 7:26 pm
by cyclops12
It does seem to take you to the footer but if you scroll up you are actually on the next section of checkout

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 7:34 pm
by artcore
Confirmed! Good find :)
I'll see what I can come up with.

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 7:50 pm
by ocdesign
Hi,

Thank you that would be great and I appreciate your help :)

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 8:38 pm
by artcore

Code: Select all

$('#accordion').on('shown.bs.collapse', function (e) {

			var offset = $(this).find('.panel-collapse.in').offset();
			if (offset) {
				$('html,body').animate({
					scrollTop: $('.panel-collapse.in').offset().top - 55
				}, 0);
			}
		});
A bit of a pain going through the pile of JS but this seems the best option. Let me know if it worked for you guys as well.
You can test it on my demo.

For an ocmod:
DEMO2102\catalog\view\theme\default\template\checkout\checkout.tpl
search <?php echo $footer; ?> and add before
<script>$('#accordion').on('shown.bs.collapse', function (e) { var offset = $(this).find('.panel-collapse.in').offset(); if (offset) {$('html,body').animate({scrollTop: $('.panel-collapse.in').offset().top - 55}, 0);}});</script>

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 8:53 pm
by cyclops12
That seems to work perfectly artcore..

Made into an ocmod

Re: Checkout as Guest Issue on Step 2

Posted: Sat Aug 13, 2016 9:45 pm
by artcore
Thanks cyclops :D
I like it too especially on mobile as it really focuses the customer for his task.

Re: Checkout as Guest Issue on Step 2

Posted: Sun Aug 14, 2016 12:20 am
by ocdesign
Hi,

I've installed it and it works a like charm. Thank you very much.

;D

Re: Checkout as Guest Issue on Step 2

Posted: Sun Aug 14, 2016 1:07 am
by cyclops12
Glad it is working for you, but credit goes to artcore for the script ;)

Re: Checkout as Guest Issue on Step 2

Posted: Sun Aug 14, 2016 1:55 am
by artcore
Glad to be of service ;D
@ocdesign, could you add 'SOLVED' to the topic title? This will help future quests for answers.
Cheers and have a good weekend!

Re: Checkout as Guest Issue on Step 2

Posted: Fri Jan 19, 2018 12:13 am
by harmonybrew
Just wanted to take the time to thank artcore and cyclops12 for their outstanding work!

For newbies like me I would like to add, once you install the mod, be sure to refresh the modifications cache by clicking on the refresh button at the top . Also, this will put your store in maintenance mode, so be sure to go to your store settings and switch this.

Many thanks again guys!