AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: MoeDawood15 on July 04, 2024, 02:20:41 AM

Title: Guest Checkout bypass province - uses "Please select" as an option (BUG_
Post by: MoeDawood15 on July 04, 2024, 02:20:41 AM
Hi

Hope all is well

I may have picked up a small bug on the Guest checkout with the other abantecart template (old one)

On guest checkout it allows me to checkout without selecting a Region/State and this causes issues when calculating tax

Please advise if there is a fix for this

Please see attached

Kind Regards

MoeDawood15
Title: Re: Guest Checkout bypass province - uses "Please select" as an option (BUG_
Post by: Basara on July 04, 2024, 06:37:35 AM
Hello.
What is your AbanteCart version and theme?
Title: Re: Guest Checkout bypass province - uses "Please select" as an option (BUG)
Post by: MoeDawood15 on July 04, 2024, 07:41:19 AM
Hi

I have v1.3.4

Default template enabled same as the demo site

Fast checkout is disabled

Steps to Reproduce

Add Item to cart
Click on checkout
Select guest checkout
Fill in details
Leave state/region as is
Click continue

I have replicated on the demo site
Title: Re: Guest Checkout bypass province - uses "Please select" as an option (BUG_
Post by: MoeDawood15 on July 08, 2024, 07:46:50 AM
Hi

Any feedback here ? Is there a fix currently ?
Title: Re: Guest Checkout bypass province - uses "Please select" as an option (BUG_
Post by: abolabo on July 26, 2024, 11:18:18 AM
to solve just open file public_html/storefront/controller/pages/checkout/guest_step_1.php
find method _validate ( line 632)
You need to replace
        if ($data['country_id'] == 'FALSE') {
            $this->error['country'] = $this->language->get('error_country');
        }

        if ($data['zone_id'] == 'FALSE') {
            $this->error['zone'] = $this->language->get('error_zone');
        }


with this

       if (!$data['country_id'] || $data['country_id'] == 'FALSE') {
            $this->error['country'] = $this->language->get('error_country');
        }

        if (!$data['zone_id'] || $data['zone_id'] == 'FALSE') {
            $this->error['zone'] = $this->language->get('error_zone');
        }