Post by siamak_mu » Mon Oct 28, 2024 12:01 am

Hello,
I have a problem with OpenCart v4.0.2.3 that I never had with v3.xx or v2.xx. using default theme and extensions. php 8.1 and different browsers.
Everything is fresh install and default settings (not old install or upgrade from v3.xx) except when I disable "Guest Checkout" ( System>Settings>Option>Checkout) and start to checkout a physical product (not downloadable) after entering register account information I will get an error "Warning: Items in your shopping cart require you to register for an account!" when I click continue button.
Please note that if "Guest Checkout" just be enable and I don't choose "Register Account" in checkout page (not choose Guest Checkout) everything works fine. If you can check the attachments, you will understand what I mean better.

Attachments

image_2024-10-27_192951442.png

image_2024-10-27_192951442.png (189.04 KiB) Viewed 4158 times

image_2024-10-27_185630586.png

image_2024-10-27_185630586.png (212.86 KiB) Viewed 4158 times

image_2024-10-27_185302580.png

image_2024-10-27_185302580.png (218.67 KiB) Viewed 4158 times


Newbie

Posts

Joined
Thu Aug 30, 2018 2:28 am

Post by ADD Creative » Mon Oct 28, 2024 5:32 pm

It's been reported but closed with no solution. https://github.com/opencart/opencart/issues/12497

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by siamak_mu » Tue Oct 29, 2024 5:40 pm

So, it means, OpeanCart bugs doesn't matter for OpeanCart team?

Newbie

Posts

Joined
Thu Aug 30, 2018 2:28 am

Post by ADD Creative » Tue Oct 29, 2024 6:41 pm

Sadly they do close a lot of bug reports without fixing. You could try 3.0.4.0 which has less bugs.

Or try in upload/catalog/controller/checkout/register.php, change.

Code: Select all

if ($this->cart->hasDownload() || $this->cart->hasSubscription()) {
To.

Code: Select all

if ($this->cart->hasDownload() || $this->cart->hasSubscription() || !$this->config->get('config_checkout_guest')) {

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Tue Oct 29, 2024 10:09 pm

Yeah, this is a bug in the catalog/controller/checkout/register.php, in function save, around these lines which don't make sense to me:

Code: Select all

		if (!$json) {
			// If not guest checkout disabled, login require price or cart has downloads
			if (!$this->request->post['account'] && (!$this->config->get('config_checkout_guest') || $this->config->get('config_customer_price'))) {
				$json['error']['warning'] = $this->language->get('error_guest');
			}
I just reopened this as an issue to be addressed by Daniel on github.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by CartCoding » Wed Oct 30, 2024 11:46 am

Maybe your website requested setting from cache, you can try to close the cache or clean the cache.

Tracking Assiatant - Integrate Realtime Tracking Information on Website
OpenCart Extensions, Plugins Development, Themes Design and Website Optimization
FREE Guidance and Advice at https://www.cartcoding.com


User avatar
Newbie

Posts

Joined
Thu Aug 03, 2023 3:48 pm

Post by siamak_mu » Fri Nov 01, 2024 6:35 am

ADD Creative wrote:
Tue Oct 29, 2024 6:41 pm
Sadly they do close a lot of bug reports without fixing. You could try 3.0.4.0 which has less bugs.

Or try in upload/catalog/controller/checkout/register.php, change.

Code: Select all

if ($this->cart->hasDownload() || $this->cart->hasSubscription()) {
To.

Code: Select all

if ($this->cart->hasDownload() || $this->cart->hasSubscription() || !$this->config->get('config_checkout_guest')) {
Hello, Thank You so much. it works!
I had invented an unprincipled way myself, which was:
Enable "Guest Checkout" on "System>Settings>Option>Checkout"
Edit "extension/XXX/catalog/view/template/checkout/register.twig" and delete this part:

Code: Select all

          <div class="form-check radio form-check-inline">
            <input type="radio" name="account" value="0" id="input-guest" class="form-check-input"{% if not account %} checked{% endif %}/> <label for="input-guest" class="form-check-label">{{ text_guest }}</label>
          </div>
But it seems your way is better and more correct. Thanks again.

Newbie

Posts

Joined
Thu Aug 30, 2018 2:28 am
Who is online

Users browsing this forum: No registered users and 4 guests